From eb321497ee790c7bbcd8b7a6bf41109d63e78a78 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Tue, 24 Aug 2021 11:40:22 -0400 Subject: [PATCH] Properly handle =-separated fsargs --- api-daemon/pvcapid/provisioner.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/api-daemon/pvcapid/provisioner.py b/api-daemon/pvcapid/provisioner.py index 88a0f69e..72985407 100755 --- a/api-daemon/pvcapid/provisioner.py +++ b/api-daemon/pvcapid/provisioner.py @@ -1510,15 +1510,17 @@ def create_vm(self, vm_name, vm_profile, define_vm=True, start_vm=True, script_r 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('=') + arg_entry, *arg_data = arg.split('=') + arg_data = '='.join(arg_data) filesystem_args_list.append(arg_entry) filesystem_args_list.append(arg_data) filesystem_args = ' '.join(filesystem_args_list) + print("Creating {} filesystem on {}".format(volume['filesystem'], dst_volume)) + print("Args: {}".format(filesystem_args)) + # Map the RBD device retcode, retmsg = pvc_ceph.map_volume(zkhandler, volume['pool'], dst_volume_name) if not retcode: @@ -1534,6 +1536,8 @@ def create_vm(self, vm_name, vm_profile, define_vm=True, start_vm=True, script_r if retcode: raise ProvisioningError('Failed to create {} filesystem on "{}": {}'.format(volume['filesystem'], dst_volume, stderr)) + print(stdout) + if is_script_install: # Create temporary directory retcode, stdout, stderr = pvc_common.run_os_command("mktemp -d")