From: Stephen Mulcahy Date: Thu, 21 Feb 2013 11:10:34 +0000 (+0000) Subject: Fixed cinder-backup start errors seen with devstack X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=b13848160698a89a46a8d59434a1aa7e173120f3;p=openstack-build%2Fcinder-build.git Fixed cinder-backup start errors seen with devstack Changes: - Added cinder-backup to scripts in setup.py - Added service_name to backup manager __init__ - Switched backup manager to using oslo.config - Modified cinder-backup to use ProcessLauncher Fixes bug: 1131147 Change-Id: I9b02d64def4ee892e9cfde4b4bcd50e5f9f9b707 --- diff --git a/bin/cinder-backup b/bin/cinder-backup index 60de59901..0ffadec9b 100755 --- a/bin/cinder-backup +++ b/bin/cinder-backup @@ -42,6 +42,7 @@ if __name__ == '__main__': flags.parse_args(sys.argv) logging.setup("cinder") utils.monkey_patch() + launcher = service.ProcessLauncher() server = service.Service.create(binary='cinder-backup') - service.serve(server) - service.wait() + launcher.launch_server(server) + launcher.wait() diff --git a/cinder/backup/manager.py b/cinder/backup/manager.py index 3c00e8478..96426f525 100755 --- a/cinder/backup/manager.py +++ b/cinder/backup/manager.py @@ -32,11 +32,12 @@ Volume backups can be created, restored, deleted and listed. """ +from oslo.config import cfg + from cinder import context from cinder import exception from cinder import flags from cinder import manager -from cinder.openstack.common import cfg from cinder.openstack.common import excutils from cinder.openstack.common import importutils from cinder.openstack.common import log as logging @@ -58,7 +59,7 @@ class BackupManager(manager.SchedulerDependentManager): RPC_API_VERSION = '1.0' - def __init__(self, *args, **kwargs): + def __init__(self, service_name=None, *args, **kwargs): self.service = importutils.import_module(FLAGS.backup_service) self.az = FLAGS.storage_availability_zone self.volume_manager = importutils.import_object(FLAGS.volume_manager) diff --git a/setup.py b/setup.py index 564c27881..0b9211b31 100644 --- a/setup.py +++ b/setup.py @@ -73,6 +73,7 @@ setuptools.setup( setup_requires=['setuptools_git>=0.4'], scripts=['bin/cinder-all', 'bin/cinder-api', + 'bin/cinder-backup', 'bin/cinder-clear-rabbit-queues', 'bin/cinder-manage', 'bin/cinder-rootwrap',