From 161cffca64a82d7b1c599839a8b7d7e164992d72 Mon Sep 17 00:00:00 2001 From: Helen Walsh Date: Fri, 3 Mar 2017 15:33:54 +0000 Subject: [PATCH] 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 b61bb0ac37e7699b72940eb69c072aca06ab4341) --- cinder/cmd/backup.py | 3 ++- cinder/tests/unit/test_cmd.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cinder/cmd/backup.py b/cinder/cmd/backup.py index 0472c3a5f4a..8c913053b35 100644 --- a/cinder/cmd/backup.py +++ b/cinder/cmd/backup.py @@ -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() diff --git a/cinder/tests/unit/test_cmd.py b/cinder/tests/unit/test_cmd.py index b002590175a..0556cbf494f 100644 --- a/cinder/tests/unit/test_cmd.py +++ b/cinder/tests/unit/test_cmd.py @@ -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()