Change in vdsm[master]: gluster: use socket.getfqdn instead of 'hostname' binary

osvoboda at redhat.com osvoboda at redhat.com
Wed May 27 11:42:29 UTC 2015


Ondřej Svoboda has posted comments on this change.

Change subject: gluster: use socket.getfqdn instead of 'hostname' binary
......................................................................


Patch Set 5: Verified+1

Verified again. I tested the try-except with a patched library function, raising herror manually in getfqdn(). The return value is still '', as expected.

>>> import gluster.cli
>>> gluster.cli._getGlusterHostName()
ERROR:root:getfqdn
Traceback (most recent call last):
  File "gluster/cli.py", line 132, in _getGlusterHostName
    return socket.getfqdn()
  File "/usr/lib64/python2.7/socket.py", line 136, in getfqdn
    raise herror('catch me!')
herror: catch me!
''

Without the manually raised exception the return value is again the same as $(hostname --fqdn) output.

-- 
To view, visit https://gerrit.ovirt.org/37621
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic4b4a0062bedc41bee6528c1d06d707b4f7547e6
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Bala.FA <barumuga at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Darshan N <dnarayan at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeyasin at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: No


More information about the vdsm-patches mailing list