]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fixed cinder-backup start errors seen with devstack
authorStephen Mulcahy <stephen.mulcahy@hp.com>
Thu, 21 Feb 2013 11:10:34 +0000 (11:10 +0000)
committerStephen Mulcahy <stephen.mulcahy@hp.com>
Thu, 21 Feb 2013 11:11:35 +0000 (11:11 +0000)
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

bin/cinder-backup
cinder/backup/manager.py
setup.py

index 60de5990177202e3c3a6dc09bb35be57d92df14a..0ffadec9beadf529acf32745cfe2324b068721e4 100755 (executable)
@@ -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()
index 3c00e8478e0ece30a7bf5bd801efc72c5a9f09b7..96426f52559d17612d89d36f79ef3d3b24662a3d 100755 (executable)
@@ -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)
index 564c27881cf7410ab2f67375812b91e1b2ebed6c..0b9211b316c947e613b3fcc2c635c26f22c28776 100644 (file)
--- 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',