diff --git a/devstack/components/horizon.py b/devstack/components/horizon.py index 9bc87b76..cd4e7514 100644 --- a/devstack/components/horizon.py +++ b/devstack/components/horizon.py @@ -210,11 +210,13 @@ class HorizonInstaller(comp.PythonInstallComponent): def _fix_quantum(self): if not (utils.service_enabled(settings.QUANTUM_CLIENT, self.instances, False)): - #Make the fake quantum + #make the fake quantum (apparently needed so imports don't fail???) + #TODO remove this... quantum_dir = sh.joinpths(self.dash_dir, 'quantum') - self.tracewriter.make_dir(quantum_dir) - self.tracewriter.touch_file(sh.joinpths(quantum_dir, '__init__.py')) - self.tracewriter.touch_file(sh.joinpths(quantum_dir, 'client.py')) + if not sh.isdir(quantum_dir): + self.tracewriter.make_dir(quantum_dir) + self.tracewriter.touch_file(sh.joinpths(quantum_dir, '__init__.py')) + self.tracewriter.touch_file(sh.joinpths(quantum_dir, 'client.py')) def post_install(self): comp.PythonInstallComponent.post_install(self) diff --git a/devstack/env_rc.py b/devstack/env_rc.py index 66507559..cb03c9fc 100644 --- a/devstack/env_rc.py +++ b/devstack/env_rc.py @@ -28,6 +28,9 @@ from devstack.components import keystone #general extraction cfg keys CFG_MAKE = { 'ADMIN_PASSWORD': ('passwords', 'horizon_keystone_admin'), + 'ADMIN_USER': ('keystone', 'admin_user'), + 'DEMO_USER': ('keystone', 'demo_user'), + 'INVISIBLE_USER': ('keystone', 'invisible_user'), 'MYSQL_PASSWORD': ('passwords', 'sql'), 'RABBIT_PASSWORD': ('passwords', 'rabbit'), 'SERVICE_TOKEN': ('passwords', 'service_token'), diff --git a/devstack/opts.py b/devstack/opts.py index 3ef95952..011e46da 100644 --- a/devstack/opts.py +++ b/devstack/opts.py @@ -14,6 +14,8 @@ # License for the specific language governing permissions and limitations # under the License. +import tempfile + from optparse import IndentedHelpFormatter from optparse import OptionParser, OptionGroup @@ -49,13 +51,13 @@ def parse(): dest="action", metavar="ACTION", help="required action to perform: %s" % (_format_list(settings.ACTIONS))) - def_os_dir = sh.joinpths(sh.gethomedir(), DEF_OS_DIR) + default_dir = sh.joinpths(tempfile.gettempdir(), DEF_OS_DIR) base_group.add_option("-d", "--directory", action="store", type="string", dest="dir", metavar="DIR", - default=def_os_dir, + default=default_dir, help=("empty root DIR for install or " "DIR with existing components for start/stop/uninstall " "(default: %default)")) diff --git a/devstack/shell.py b/devstack/shell.py index d143afc4..b994e735 100644 --- a/devstack/shell.py +++ b/devstack/shell.py @@ -307,12 +307,12 @@ def write_file(fn, text, flush=True, quiet=False): def touch_file(fn, die_if_there=True, quiet=False, file_size=0): if not isfile(fn): if not quiet: - LOG.debug("Touching and truncating file %s", fn) + LOG.debug("Touching and truncating file %s (%s)", fn, file_size) with open(fn, "w") as f: f.truncate(file_size) else: if die_if_there: - msg = "Can not touch file %s since it already exists" % (fn) + msg = "Can not touch & truncate file %s since it already exists" % (fn) raise excp.FileException(msg)