diff --git a/conf/personas/devstack.sh.yaml b/conf/personas/devstack.sh.yaml index cb28547b..ed299ec7 100644 --- a/conf/personas/devstack.sh.yaml +++ b/conf/personas/devstack.sh.yaml @@ -5,8 +5,6 @@ supports: - ubuntu-oneiric - fedora-16 options: - glance: - - load-images components: - db - rabbit-mq diff --git a/devstack/components/glance.py b/devstack/components/glance.py index cb31cc3c..539b64ba 100644 --- a/devstack/components/glance.py +++ b/devstack/components/glance.py @@ -187,6 +187,7 @@ class GlanceRuntime(comp.PythonRuntime): comp.PythonRuntime.__init__(self, *args, **kargs) self.cfg_dir = sh.joinpths(self.app_dir, CONFIG_DIR) self.bin_dir = sh.joinpths(self.app_dir, BIN_DIR) + self.options = kargs.get('options', set()) def known_subsystems(self): return SUB_TO_APP.keys() @@ -205,8 +206,11 @@ class GlanceRuntime(comp.PythonRuntime): def post_start(self): comp.PythonRuntime.post_start(self) - # Install any images that need activating... - # TODO: make this less cheesy - need to wait till glance goes online - LOG.info("Waiting %s seconds so that glance can start up before image install." % (WAIT_ONLINE_TO)) - sh.sleep(WAIT_ONLINE_TO) - creator.ImageCreationService(self.cfg, self.pw_gen).install() + if 'no-load-images' in self.options: + pass + else: + # Install any images that need activating... + # TODO: make this less cheesy - need to wait till glance goes online + LOG.info("Waiting %s seconds so that glance can start up before image install." % (WAIT_ONLINE_TO)) + sh.sleep(WAIT_ONLINE_TO) + creator.ImageCreationService(self.cfg, self.pw_gen).install() diff --git a/devstack/components/pkglist.py b/devstack/components/pkglist.py index 95581592..b2548a97 100644 --- a/devstack/components/pkglist.py +++ b/devstack/components/pkglist.py @@ -1,3 +1,20 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Copyright (C) 2012 Yahoo! Inc. All Rights Reserved. +# Copyright (C) 2012 New Dream Network, LLC (DreamHost) All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + from devstack import component diff --git a/devstack/progs/actions.py b/devstack/progs/actions.py index a4bcd242..1bf6d543 100644 --- a/devstack/progs/actions.py +++ b/devstack/progs/actions.py @@ -155,6 +155,7 @@ class ActionRunner(object): def _construct_instances(self, persona, action, root_dir): components = persona.wanted_components desired_subsystems = persona.wanted_subsystems or dict() + component_opts = persona.component_options or dict() instances = dict() for c in components: (cls, my_info) = self.distro.extract_component(c, action) @@ -167,6 +168,7 @@ class ActionRunner(object): cls_kvs['name'] = c cls_kvs['keep_old'] = self.keep_old cls_kvs['desired_subsystems'] = set(desired_subsystems.get(c, list())) + cls_kvs['options'] = set(component_opts.get(c, list())) # The above is not overrideable... for (k, v) in my_info.items(): if k not in cls_kvs: