From 3b7160232e79bb079674b11837565be38d1937e0 Mon Sep 17 00:00:00 2001 From: Gunther Hagleitner Date: Sat, 4 Feb 2012 17:01:22 -0800 Subject: [PATCH] swift fixes --- conf/logging.ini | 2 +- devstack/components/swift.py | 8 +++++++- devstack/progs/actions.py | 3 ++- devstack/progs/common.py | 4 ++-- devstack/settings.py | 4 ++-- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/conf/logging.ini b/conf/logging.ini index 67b26345..04459fa8 100644 --- a/conf/logging.ini +++ b/conf/logging.ini @@ -6,7 +6,7 @@ keys=root [logger_root] -level=INFO +level=DEBUG handlers=hand01 formatter=form01 diff --git a/devstack/components/swift.py b/devstack/components/swift.py index 30808896..7712b3d1 100644 --- a/devstack/components/swift.py +++ b/devstack/components/swift.py @@ -120,7 +120,8 @@ class SwiftInstaller(comp.PythonInstallComponent): def __create_node_config(self, node_number, port): for type_ in ['object', 'container', 'account']: sh.copy_replace_file(sh.joinpths(self.cfgdir, '%s-server.conf' % type_), - sh.joinpths(self.cfgdir, '%s-server/%d' % (type_, node_number)), + sh.joinpths(self.cfgdir, '%s-server/%d.conf' \ + % (type_, node_number)), { '%NODE_PATH%': sh.joinpths(self.datadir, str(node_number)), '%BIND_PORT%': str(port), @@ -128,12 +129,17 @@ class SwiftInstaller(comp.PythonInstallComponent): }) port += 1 + def __delete_templates(self): + for type_ in ['object', 'container', 'account']: + sh.unlink(sh.joinpths(self.cfgdir, '%s-server.conf' % type_)) + def __create_nodes(self): for i in range(1, 5): sh.mkdirslist(sh.joinpths(self.fs_dev, '%d/node' % i)) sh.symlink(sh.joinpths(self.fs_dev, str(i)), sh.joinpths(self.datadir, str(i))) self.__create_node_config(i, 6010 + (i - 1) * 5) + self.__delete_templates() def __turn_on_rsync(self): sh.symlink(sh.joinpths(self.cfgdir, RSYNC_CONF), diff --git a/devstack/progs/actions.py b/devstack/progs/actions.py index d583119b..251cc473 100644 --- a/devstack/progs/actions.py +++ b/devstack/progs/actions.py @@ -388,7 +388,8 @@ def _run_action(args): all_components_deps = common.get_components_deps(action, components) component_diff = set(all_components_deps.keys()).difference(components.keys()) if component_diff: - LOG.info("Having to activate dependent components: [%s]" % (", ".join(sorted(component_diff)))) + LOG.info("Having to activate dependent components: [%s]" \ + % (", ".join(sorted(component_diff)))) for new_component in component_diff: components[new_component] = list() component_order = utils.get_components_order(all_components_deps) diff --git a/devstack/progs/common.py b/devstack/progs/common.py index 97934487..73646b39 100644 --- a/devstack/progs/common.py +++ b/devstack/progs/common.py @@ -71,7 +71,7 @@ ACTION_CLASSES = { settings.GLANCE: glance.GlanceRuntime, settings.QUANTUM: quantum.QuantumRuntime, settings.SWIFT: swift.SwiftRuntime, - settings.SWIFT: swift_keystone.SwiftKeystoneRuntime, + settings.SWIFT_KEYSTONE: swift_keystone.SwiftKeystoneRuntime, settings.HORIZON: horizon.HorizonRuntime, settings.KEYSTONE: keystone.KeystoneRuntime, settings.DB: db.DBRuntime, @@ -86,7 +86,7 @@ ACTION_CLASSES = { settings.GLANCE: glance.GlanceRuntime, settings.QUANTUM: quantum.QuantumRuntime, settings.SWIFT: swift.SwiftRuntime, - settings.SWIFT: swift_keystone.SwiftKeystoneRuntime, + settings.SWIFT_KEYSTONE: swift_keystone.SwiftKeystoneRuntime, settings.HORIZON: horizon.HorizonRuntime, settings.KEYSTONE: keystone.KeystoneRuntime, settings.DB: db.DBRuntime, diff --git a/devstack/settings.py b/devstack/settings.py index e962eebc..52b118b5 100644 --- a/devstack/settings.py +++ b/devstack/settings.py @@ -70,8 +70,8 @@ COMPONENT_DEPENDENCIES = { GLANCE: [KEYSTONE, DB], KEYSTONE: [DB], NOVA: [KEYSTONE, GLANCE, DB, RABBIT, NOVA_CLIENT], - SWIFT: [], - SWIFT_KEYSTONE: [SWIFT], + SWIFT_KEYSTONE: [KEYSTONE_CLIENT], + SWIFT: [SWIFT_KEYSTONE], NOVA_CLIENT: [], HORIZON: [KEYSTONE_CLIENT, GLANCE, NOVA_CLIENT], #the db isn't always a dependency (depending on the quantum component to be activated)