Skip to content

Commit

Permalink
Set rootwrap_config path to rootwrap.conf
Browse files Browse the repository at this point in the history
Other components set
rootwrap_config = /etc/<component>/rootwrap.conf by default.
This commit brings cinder up-to-date with what other
components are doing by setting
rootwrap_config = /etc/cinder/rootwrap.conf by default.

A couple of test cases needed to be updated to handle the change
from 'None'.

Not counting this as a documentation impact as the documentation I
can find already lists /etc/cinder/rootwrap.conf as the default.

Closes-Bug 1226074

Change-Id: I68dd5fea1895a6365d6c69db0535d081c4a3460e
  • Loading branch information
Jay S. Bryant committed Sep 16, 2013
1 parent e34ab12 commit 3394045
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cinder/common/config.py
Expand Up @@ -181,7 +181,7 @@ def _get_my_ip():
default='sudo',
help='Deprecated: command to use for running commands as root'),
cfg.StrOpt('rootwrap_config',
default=None,
default='/etc/cinder/rootwrap.conf',
help='Path to the rootwrap configuration file to use for '
'running commands as root'),
cfg.BoolOpt('monkey_patch',
Expand Down
2 changes: 1 addition & 1 deletion cinder/tests/test_coraid.py
Expand Up @@ -771,7 +771,7 @@ def setUp(self):
self.driver.terminate_connection(fake_volume, mox.IgnoreArg())\
.AndReturn(None)

root_helper = 'sudo cinder-rootwrap None'
root_helper = 'sudo cinder-rootwrap /etc/cinder/rootwrap.conf'

self.mox.StubOutWithMock(connector, 'get_connector_properties')
connector.get_connector_properties(root_helper).\
Expand Down
4 changes: 2 additions & 2 deletions cinder/tests/test_volume.py
Expand Up @@ -1955,7 +1955,7 @@ def test_backup_volume(self):
properties = {}
attach_info = {'device': {'path': '/dev/null'}}
backup_service = self.mox.CreateMock(backup_driver.BackupDriver)
root_helper = 'sudo cinder-rootwrap None'
root_helper = 'sudo cinder-rootwrap /etc/cinder/rootwrap.conf'
self.mox.StubOutWithMock(self.volume.driver.db, 'volume_get')
self.mox.StubOutWithMock(cinder.brick.initiator.connector,
'get_connector_properties')
Expand Down Expand Up @@ -1989,7 +1989,7 @@ def test_restore_backup(self):
'id': 'backup-for-%s' % vol['id']}
properties = {}
attach_info = {'device': {'path': '/dev/null'}}
root_helper = 'sudo cinder-rootwrap None'
root_helper = 'sudo cinder-rootwrap /etc/cinder/rootwrap.conf'
backup_service = self.mox.CreateMock(backup_driver.BackupDriver)
self.mox.StubOutWithMock(cinder.brick.initiator.connector,
'get_connector_properties')
Expand Down
2 changes: 1 addition & 1 deletion etc/cinder/cinder.conf.sample
Expand Up @@ -416,7 +416,7 @@

# Path to the rootwrap configuration file to use for running
# commands as root (string value)
#rootwrap_config=<None>
#rootwrap_config=/etc/cinder/rootwrap.conf

# Whether to log monkey patching (boolean value)
#monkey_patch=false
Expand Down

0 comments on commit 3394045

Please sign in to comment.