From 4b95acc96ceb488273cfc71f5749a34f1b78f3c6 Mon Sep 17 00:00:00 2001 From: Ahmed Bilal Khalid Date: Wed, 4 Sep 2019 16:01:27 +0500 Subject: [PATCH] a --- main.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 03d16a7..12eb0ad 100755 --- a/main.py +++ b/main.py @@ -6,9 +6,9 @@ from config import logging, client, BASE_PATH, WITHOUT_CEPH # If you are using WITHOUT_CEPH FLAG in .env -# then please make sure that /var/vm directory +# then please make sure that /var/image directory # exists otherwise this script would fail -if WITHOUT_CEPH and not os.path.isdir("/var/vm"): +if WITHOUT_CEPH and not os.path.isdir("/var/image"): exit(1) @@ -42,7 +42,7 @@ for image in images_to_be_created: snapshot_protect_command = ["rbd", "snap", "protect", f"{image_store_pool}/{image_uuid}@protected"] if WITHOUT_CEPH: - image_import_command = ["mv", "image.raw", os.path.join("/var/vm", image_uuid)] + image_import_command = ["mv", "image.raw", os.path.join("/var/image", image_uuid)] snapshot_creation_command = ["true"] snapshot_protect_command = ["true"] @@ -75,7 +75,6 @@ for image in images_to_be_created: try: # Convert .qcow2 to .raw subprocess.check_output(qemu_img_convert_command) - print("converting") except Exception as e: logging.exception(e) else: