summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2017-11-29 17:09:41 -0500
committerTim Rozet <trozet@redhat.com>2017-11-29 17:09:41 -0500
commit971d5b95682c23367c6411932fefee99ced036fb (patch)
tree18375869cbbfcb133f52df11ae35d481ab17dbac
parent33aebc3b51ce4bc816499a8b68a7feca77a12c6c (diff)
Fixes permissions and owner for undercloud.qcow2
The undercloud storage disk is copied during our deployment from modified underloud from upstream. We copy it as owner root with wrong permissions. This changes the owner to qemu and sets the permissions the same as the other storage disks that virsh creates for overcloud nodes. Change-Id: Ie884a586f91be3461e4b511e224d061639f04c69 Signed-off-by: Tim Rozet <trozet@redhat.com>
-rw-r--r--apex/undercloud/undercloud.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/apex/undercloud/undercloud.py b/apex/undercloud/undercloud.py
index 5d73dd4..14be440 100644
--- a/apex/undercloud/undercloud.py
+++ b/apex/undercloud/undercloud.py
@@ -150,7 +150,8 @@ class Undercloud:
if os.path.exists(dest_img):
os.remove(dest_img)
shutil.copyfile(src_img, dest_img)
-
+ shutil.chown(dest_img, user='qemu', group='qemu')
+ os.chmod(dest_img, 0o0744)
# TODO(trozet):check if resize needed right now size is 50gb
# there is a lib called vminspect which has some dependencies and is
# not yet available in pip. Consider switching to this lib later.