From b91923735c1cc236e9f4e9b2b9f2d21caec18589 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Tue, 5 May 2020 16:19:18 -0400 Subject: [PATCH] Move some messages around --- api-daemon/pvcapid/provisioner.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/api-daemon/pvcapid/provisioner.py b/api-daemon/pvcapid/provisioner.py index 52ca2d33..2ab7af24 100755 --- a/api-daemon/pvcapid/provisioner.py +++ b/api-daemon/pvcapid/provisioner.py @@ -1439,6 +1439,8 @@ def create_vm(self, vm_name, vm_profile, define_vm=True, start_vm=True): src_volume_name = volume['volume_name'] src_volume = "{}/{}".format(volume['pool'], src_volume_name) + print('Converting {} source volume {} to raw format on {}'.format(volume['volume_format'], src_volume, dst_volume)) + # Map the target RBD device retcode, retmsg = pvc_ceph.map_volume(zk_conn, volume['pool'], dst_volume_name) if not retcode: @@ -1466,7 +1468,6 @@ def create_vm(self, vm_name, vm_profile, define_vm=True, start_vm=True): retcode, retmsg = pvc_ceph.unmap_volume(zk_conn, volume['pool'], dst_volume_name) if not retcode: raise ProvisioningError('Failed to unmap destination volume "{}": {}'.format(dst_volume_name, retmsg)) - print('Converted {} source volume {} to raw format on {}'.format(volume['volume_format'], src_volume, dst_volume)) else: if volume.get('source_volume') is not None: continue @@ -1474,6 +1475,8 @@ def create_vm(self, vm_name, vm_profile, define_vm=True, start_vm=True): if volume.get('filesystem') is None: continue + print("Creating {} filesystem on {}:\n{}".format(volume['filesystem'], dst_volume, stdout)) + filesystem_args_list = list() for arg in volume['filesystem_args'].split(): arg_entry, arg_data = arg.split('=') @@ -1496,8 +1499,6 @@ def create_vm(self, vm_name, vm_profile, define_vm=True, start_vm=True): if retcode: raise ProvisioningError('Failed to create {} filesystem on "{}": {}'.format(volume['filesystem'], dst_volume, stderr)) - print("Created {} filesystem on {}:\n{}".format(volume['filesystem'], dst_volume, stdout)) - if is_script_install: # Create temporary directory retcode, stdout, stderr = pvc_common.run_os_command("mktemp -d")