Alon Bar-Lev has posted comments on this change.

Change subject: vdsm_config: move download certificate
......................................................................


Patch Set 16:

(4 comments)

http://gerrit.ovirt.org/#/c/26718/16/vdsm_reg/vdsm-reg-setup.in
File vdsm_reg/vdsm-reg-setup.in:

Line 181
Line 182
Line 183
Line 184
Line 185
you should run you code after this I guess

please review the entire vdsm-reg code to know the exact location.


Line 202:                 ovirtfunctions.ovirt_safe_delete_config(CACert)
Line 203:                 os.remove(CACert)
Line 204: 
Line 205:         if not os.path.exists(CACert) and self.cfg_fprint != "None":
Line 206:             fd_tmp, file_tmp = tempfile.mkstemp()
here you should close.
Line 207:             try:
Line 208:                 if not deployUtil.getRhevmCert(
Line 209:                     IP=self.vdcName,
Line 210:                     port=self.vdcPORT,


Line 211:                     output=file_tmp
Line 212:                 ):
Line 213:                     log.error("Cannot download Engine certificate 
file")
Line 214:             finally:
Line 215:                 os.close(fd_tmp)
finally should be for the entire block, so this should be removed
Line 216: 
Line 217:             engine_fprint = deployUtil.generateFingerPrint(file_tmp)
Line 218:             if self.cfg_fprint.upper() != engine_fprint:
Line 219:                 log.error(


Line 225:                 os.remove(file_tmp)
Line 226:                 sys.exit(1)
Line 227: 
Line 228:             shutil.move(file_tmp, CACert)
Line 229:             ovirtfunctions.ovirt_store_config(CACert)
here you should add finally:

 if os.path.exists(file_tmp):
     os.unlink(file_tmp)
Line 230: 
Line 231:         if deployUtil.preventDuplicate():
Line 232:             logging.debug("execute: found existing management bridge. 
Skipping rename.")
Line 233:         else:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia2c025eedd2be92b9418ddbe01efc02c913af2a7
Gerrit-PatchSet: 16
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsl...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsl...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to