Fix ironic-rootwrap capability.
- Added ironic-rootwrap to setup.cfg/entry_points - Use ironic-rootwrap as root-helper for execute() Change-Id: I93f9f5fa60e456ce86f878e2a35c849d0ceeca14
This commit is contained in:
@@ -76,7 +76,7 @@ def execute(*cmd, **kwargs):
|
||||
"""Helper method to execute command with optional retry.
|
||||
|
||||
If you add a run_as_root=True command, don't forget to add the
|
||||
corresponding filter to etc/nova/rootwrap.d !
|
||||
corresponding filter to etc/ironic/rootwrap.d !
|
||||
|
||||
:param cmd: Passed to subprocess.Popen.
|
||||
:param process_input: Send to opened process.
|
||||
@@ -115,7 +115,7 @@ def execute(*cmd, **kwargs):
|
||||
'to utils.execute: %r') % kwargs)
|
||||
|
||||
if run_as_root and os.geteuid() != 0:
|
||||
cmd = ['sudo', 'nova-rootwrap', CONF.rootwrap_config] + list(cmd)
|
||||
cmd = ['sudo', 'ironic-rootwrap', CONF.rootwrap_config] + list(cmd)
|
||||
|
||||
cmd = map(str, cmd)
|
||||
|
||||
|
Reference in New Issue
Block a user