Merge "Remove 'lvrename' from rootwrap"
This commit is contained in:
commit
a97be2c848
@ -860,9 +860,7 @@ class LVM(executor.Executor):
|
||||
"""Change the name of an existing volume."""
|
||||
|
||||
try:
|
||||
self._execute('lvrename', self.vg_name, lv_name, new_name,
|
||||
root_helper=self._root_helper,
|
||||
run_as_root=True)
|
||||
cinder.privsep.lvm.lvrename(self.vg_name, lv_name, new_name)
|
||||
except putils.ProcessExecutionError as err:
|
||||
LOG.exception('Error renaming logical volume')
|
||||
LOG.error('Cmd :%s', err.cmd)
|
||||
|
@ -24,3 +24,9 @@ import cinder.privsep
|
||||
@cinder.privsep.sys_admin_pctxt.entrypoint
|
||||
def udevadm_settle():
|
||||
processutils.execute('udevadm', 'settle')
|
||||
|
||||
|
||||
@cinder.privsep.sys_admin_pctxt.entrypoint
|
||||
def lvrename(vg_name, lv_name, new_name):
|
||||
processutils.execute(
|
||||
'lvrename', vg_name, lv_name, new_name)
|
||||
|
@ -62,9 +62,6 @@ dd: CommandFilter, dd, root
|
||||
# cinder/volume/driver.py: 'lvremove', '-f', %s/%s % ...
|
||||
lvremove: CommandFilter, lvremove, root
|
||||
|
||||
# cinder/volume/driver.py: 'lvrename', '%(vg)s', '%(orig)s' '(new)s'...
|
||||
lvrename: CommandFilter, lvrename, root
|
||||
|
||||
# cinder/brick/local_dev/lvm.py: 'lvextend', '-L' '%(new_size)s', '%(lv_name)s' ...
|
||||
# cinder/brick/local_dev/lvm.py: 'lvextend', '-L' '%(new_size)s', '%(thin_pool)s' ...
|
||||
lvextend: EnvFilter, env, root, LC_ALL=C, lvextend
|
||||
|
Loading…
Reference in New Issue
Block a user