Fix bug in snapshot rename

This commit is contained in:
Joshua Boniface 2021-06-14 00:55:26 -04:00
parent 49f4feb482
commit 20c773413c
1 changed files with 1 additions and 1 deletions

View File

@ -738,7 +738,7 @@ def rename_snapshot(zkhandler, pool, volume, name, new_name):
return False, 'ERROR: No snapshot with name "{}" is present for volume "{}" in pool "{}".'.format(name, volume, pool)
# 1. Rename the snapshot
retcode, stdout, stderr = common.run_os_command('rbd snap rename {}/{}@{} {}'.format(pool, volume, name, new_name))
retcode, stdout, stderr = common.run_os_command('rbd snap rename {pool}/{volume}@{name} {pool}/{volume}@{new_name}'.format(pool=pool, volume=volume, name=name, new_name=new_name))
if retcode:
return False, 'ERROR: Failed to rename RBD snapshot "{}" to "{}" for volume "{}" in pool "{}": {}'.format(name, new_name, volume, pool, stderr)