From: Jay S. Bryant Date: Mon, 16 Sep 2013 18:21:34 +0000 (-0500) Subject: Set rootwrap_config path to rootwrap.conf X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=3394045316a113904fef510f2aff7305d2eb0826;p=openstack-build%2Fcinder-build.git Set rootwrap_config path to rootwrap.conf Other components set rootwrap_config = /etc//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 --- diff --git a/cinder/common/config.py b/cinder/common/config.py index 912705fcb..6fd9b1667 100644 --- a/cinder/common/config.py +++ b/cinder/common/config.py @@ -181,7 +181,7 @@ global_opts = [ 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', diff --git a/cinder/tests/test_coraid.py b/cinder/tests/test_coraid.py index 3affe9fdb..d646c0b9a 100644 --- a/cinder/tests/test_coraid.py +++ b/cinder/tests/test_coraid.py @@ -771,7 +771,7 @@ class CoraidDriverImageTestCases(CoraidDriverTestCase): 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).\ diff --git a/cinder/tests/test_volume.py b/cinder/tests/test_volume.py index 126b3d5be..004ce5e92 100644 --- a/cinder/tests/test_volume.py +++ b/cinder/tests/test_volume.py @@ -1955,7 +1955,7 @@ class GenericVolumeDriverTestCase(DriverTestCase): 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') @@ -1989,7 +1989,7 @@ class GenericVolumeDriverTestCase(DriverTestCase): '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') diff --git a/etc/cinder/cinder.conf.sample b/etc/cinder/cinder.conf.sample index 2e74ca2fc..ece7c406e 100644 --- a/etc/cinder/cinder.conf.sample +++ b/etc/cinder/cinder.conf.sample @@ -416,7 +416,7 @@ # Path to the rootwrap configuration file to use for running # commands as root (string value) -#rootwrap_config= +#rootwrap_config=/etc/cinder/rootwrap.conf # Whether to log monkey patching (boolean value) #monkey_patch=false