Change in vdsm[master]: BZ#856167 - Verify downloaded CA certificate

Alon Bar-Lev alonbl at redhat.com
Mon Sep 17 18:26:19 UTC 2012


Alon Bar-Lev has posted comments on this change.

Change subject: BZ#856167 - Verify downloaded CA certificate
......................................................................


Patch Set 2: (1 inline comment)

....................................................
File vdsm_reg/deployUtil.py.in
Line 1515:     if not os.path.exists(dirName):
Line 1516:         os.makedirs(dirName)
Line 1517:     crt = file(CACERT, "w+")
Line 1518:     try:
Line 1519:         crt.write(rhevmCert)
I don't like the two writes.
Better use move file.

If doing the above the use of tempfile is not good, as probably the new file should be written to the same path of destination, so we force same filesystem and move will be atomic.

Must be checked on node... if the persist mechanism works or need to be adjusted.
Line 1520:     finally:
Line 1521:         crt.close()
Line 1522: 
Line 1523:     # If we are here everything went fine:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib5d3b3aeca42e4bc4b621b1acb861bfb1ac383e6
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alonbl at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Michael Burns <mburns at redhat.com>
Gerrit-Reviewer: Ryan Harper <ryanh at us.ibm.com>


More information about the vdsm-patches mailing list