Properly handle =-separated fsargs
This commit is contained in:
parent
3b41beb0f3
commit
722fd0a65d
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue