cinder-backup - coordination not initialized

Fix is based on a previous fix to initialize coordination in
cinder-backup. https://review.openstack.org/#/c/332925/

Change-Id: Ib9cb968a3e4d7fcd9b9777202fb9d85487f573cf
Closes-Bug: #1669521
(cherry picked from commit b61bb0ac37)
This commit is contained in:
Helen Walsh 2017-03-03 15:33:54 +00:00
parent ca6e7b4974
commit 161cffca64
2 changed files with 4 additions and 2 deletions

View File

@ -54,6 +54,7 @@ def main():
priv_context.init(root_helper=shlex.split(utils.get_root_helper()))
utils.monkey_patch()
gmr.TextGuruMeditation.setup_autorun(version, conf=CONF)
server = service.Service.create(binary='cinder-backup')
server = service.Service.create(binary='cinder-backup',
coordination=True)
service.serve(server)
service.wait()

View File

@ -107,7 +107,8 @@ class TestCinderBackupCmd(test.TestCase):
self.assertEqual(CONF.version, version.version_string())
log_setup.assert_called_once_with(CONF, "cinder")
monkey_patch.assert_called_once_with()
service_create.assert_called_once_with(binary='cinder-backup')
service_create.assert_called_once_with(binary='cinder-backup',
coordination=True)
service_serve.assert_called_once_with(server)
service_wait.assert_called_once_with()