Change in vdsm[master]: engine.py: fix nodeCleanup() call

danken at redhat.com danken at redhat.com
Thu Sep 6 19:10:02 UTC 2012


Dan Kenigsberg has posted comments on this change.

Change subject: engine.py: fix nodeCleanup() call
......................................................................


Patch Set 4: (1 inline comment)

....................................................
File vdsm_reg/deployUtil.py.in
Line 1420:     RHEVM_CERT_FILE = "/ca.crt"
Line 1421:     rhevmCert = getRemoteFile(str(IP), str(port), RHEVM_CERT_FILE)
Line 1422:     if rhevmCert:
Line 1423:         nodeCleanup()
Line 1424:         dirName = os.path.dirname(CACERT)
frankly, *I* was asking if you are fine with this problem... It does not mean the end-of-the-world to me.

But yes, in my opinion, this function is all wrong. The caller should receive the cert string, verify it, do the backups, and only finally persist the new cert. There is no point in writing down a cert that has the wrong fingerprint.
Line 1425:         if not os.path.exists(dirName):
Line 1426:             os.makedirs(dirName)
Line 1427:         crt = file(CACERT, "w+")
Line 1428:         try:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I62e86e354b3a588ce6113d7b308ece801af22917
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Barak Azulay <bazulay at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Michael Burns <mburns at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list