Ofer Schreiber has uploaded a new change for review.

Change subject: packaging: Validate configuration directory exists before files 
creation
......................................................................

packaging: Validate configuration directory exists before files creation

Before this patch, engine-upgrade used to copy new files into his
configuration directory, without validating that is really exists, which
could cause a nasty IOError.

Change-Id: Ie4f9f0868568ce56fcfc9566a0adb2b07736b3af
Signed-off-by: Ofer Schreiber <[email protected]>
---
M packaging/fedora/setup/engine-upgrade.py
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/40/8340/1

diff --git a/packaging/fedora/setup/engine-upgrade.py 
b/packaging/fedora/setup/engine-upgrade.py
index 62d20e9..2177837 100755
--- a/packaging/fedora/setup/engine-upgrade.py
+++ b/packaging/fedora/setup/engine-upgrade.py
@@ -815,6 +815,7 @@
             sys.exit(1)
         else:
             logging.info("Info: Found .pgpass file at old location. Moving it 
to a new location.")
+            os.makedirs(os.path.dirname(basedefs.DB_PASS_FILE))
             shutil.copy(basedefs.ORIG_PASS_FILE, basedefs.DB_PASS_FILE)
 
             # File is copied/created by root, so no need to verify the owner.


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie4f9f0868568ce56fcfc9566a0adb2b07736b3af
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ofer Schreiber <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to