Francesco Romani has posted comments on this change.

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


Patch Set 4:

(1 comment)

....................................................
File lib/vdsm/utils.py
Line 705:                 else:
Line 706:                     logging.warning('Could not find host UUID.')
Line 707:             elif arch in ('ppc', 'ppc64'):
Line 708:                 #eg. output IBM,03061C14A
Line 709:                 if os.path.exists('/proc/device-tree/system-id'):
There still an -admittedly, tiny- window right here between those two lines.
Maybe is simpler and safer something like

try:
  with open('/proc/device-tree/system-id') as f:
    systemId = f.readline()
    __hostUUID = systemId.rstrip('\0').replace(',', '')
except IOError:
  logging.warning(...)

However, even if we acknowledge this as flaw, all the code all around is 
similar, so this is probably better addressed in a different change.
Line 710:                     with open('/proc/device-tree/system-id') as f:
Line 711:                         systemId = f.readline()
Line 712:                         __hostUUID = 
systemId.rstrip('\0').replace(',', '')
Line 713: 


-- 
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: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Pradipta Banerjee <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Better Saggi <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Gustavo Frederico Temple Pedrosa 
<[email protected]>
Gerrit-Reviewer: Itamar Heim <[email protected]>
Gerrit-Reviewer: Leonardo Bianconi <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Pradipta Banerjee <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: Vitor de Lima <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: Zhou Zheng Sheng <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to