Change in vdsm[master]: utils.py: Add hostUUID retrieval support for KVM on PPC64

vitor.lima at eldorado.org.br vitor.lima at eldorado.org.br
Thu Oct 31 16:16:13 UTC 2013


Vitor de Lima has posted comments on this change.

Change subject: utils.py: Add hostUUID retrieval support for KVM on PPC64
......................................................................


Patch Set 1:

(2 comments)

....................................................
File vdsm/utils.py
Line 702:             with open(constants.P_VDSM_NODE_ID) as f:
Line 703:                 __hostUUID = f.readline().replace("\n", "")
Line 704:         else:
Line 705:             arch = platform.machine()
Line 706:             if arch == 'x86_64':
In another review it was suggested that an Enum could be used instead of the explict platform name.
Line 707:                 p = subprocess.Popen([constants.EXT_SUDO,
Line 708:                                   constants.EXT_DMIDECODE, "-s", "system-uuid"],
Line 709:                                   close_fds=True, stdin=subprocess.PIPE,
Line 710:                                   stdout=subprocess.PIPE, stderr=subprocess.PIPE)


Line 717:                     __hostUUID = out.strip()
Line 718:             elif arch == 'ppc64':
Line 719:                 if os.path.exists('/proc/device-tree/system-id'):
Line 720:                     #eg. output IBM,03061C14A
Line 721:                     __hostUUID = file('/proc/device-tree/system-id').readline().replace(",", "")
In the system-id file there is a null character in the end of the string, in other situations this can break the oVirt engine. I think this character should be removed after the readline().
Line 722: 
Line 723:             try:
Line 724:                 mac = sorted(_getAllMacs())[0]
Line 725:             except:


-- 
To view, visit http://gerrit.ovirt.org/8637
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7a557b096550631e340fcc61bcb3fa4c3ae73837
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Pradipta Banerjee <bpradip at in.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Gustavo Frederico Temple Pedrosa <gustavo.pedrosa at eldorado.org.br>
Gerrit-Reviewer: Leonardo Bianconi <leonardo.bianconi at eldorado.org.br>
Gerrit-Reviewer: Pradipta Banerjee <bpradip at in.ibm.com>
Gerrit-Reviewer: Ryan Harper <ryanh at us.ibm.com>
Gerrit-Reviewer: Vitor de Lima <vitor.lima at eldorado.org.br>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list