Alon Bar-Lev has uploaded a new change for review.

Change subject: pki: upgrade: do not overwrite apache certificate and key
......................................................................

pki: upgrade: do not overwrite apache certificate and key

Fix missing existence condition before duplicate the apache certificate
and key.

This will overwrite 3rd party certificate (if installed) at upgrade from
3.2 to more recent 3.2.

Change-Id: I638e9193fdda7ca9a88313ba1890e9c1a76179af
Signed-off-by: Alon Bar-Lev <[email protected]>
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=969755
---
M packaging/fedora/setup/engine-upgrade.py
1 file changed, 8 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/67/15267/1

diff --git a/packaging/fedora/setup/engine-upgrade.py 
b/packaging/fedora/setup/engine-upgrade.py
index 1dbb814..446401c 100755
--- a/packaging/fedora/setup/engine-upgrade.py
+++ b/packaging/fedora/setup/engine-upgrade.py
@@ -524,13 +524,14 @@
         ):
             logging.debug("PKI: dup cert for apache")
             try:
-                utils.copyFile(
-                    src,
-                    dst,
-                    utils.getUsernameId("root"),
-                    utils.getGroupId("root"),
-                    0640
-                )
+                if not os.path.exists(dst):
+                    utils.copyFile(
+                        src,
+                        dst,
+                        utils.getUsernameId("root"),
+                        utils.getGroupId("root"),
+                        0640
+                    )
             except OSError:
                 logging.error("PKI: Cannot dup cert for apache")
                 raise


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I638e9193fdda7ca9a88313ba1890e9c1a76179af
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: engine_3.2
Gerrit-Owner: Alon Bar-Lev <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to