]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Set rootwrap_config path to rootwrap.conf
authorJay S. Bryant <jsbryant@us.ibm.com>
Mon, 16 Sep 2013 18:21:34 +0000 (13:21 -0500)
committerJay S. Bryant <jsbryant@us.ibm.com>
Mon, 16 Sep 2013 18:31:56 +0000 (13:31 -0500)
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

cinder/common/config.py
cinder/tests/test_coraid.py
cinder/tests/test_volume.py
etc/cinder/cinder.conf.sample

index 912705fcb9d4dc69ea4417eb9c84cf057c2e70fc..6fd9b166746355c784a64c9bf03fa26573a5b0a7 100644 (file)
@@ -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',
index 3affe9fdbd784b880287f854b7798c552b9649c7..d646c0b9af3e4a4828a083160fbcb2df781be4ac 100644 (file)
@@ -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).\
index 126b3d5be7284ccbaff98a8f4803272cc22a47ca..004ce5e927181ef9e60d728102503799f2d9d8be 100644 (file)
@@ -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')
index 2e74ca2fc3a10c2269c2bef65fc771537b20555a..ece7c406eb4d3ba96f8b3d4adf54be91b4080cb7 100644 (file)
 
 # 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