Seems even nova-compute needs webob + more color fixups
This commit is contained in:
parent
f0e9bf5cc8
commit
a74e3c2991
@ -356,6 +356,9 @@ components:
|
||||
running: devstack.components.nova:NovaRuntime
|
||||
uninstall: devstack.components.nova:NovaUninstaller
|
||||
packages:
|
||||
- name: python-webob
|
||||
removable: true
|
||||
version: 1.0*
|
||||
- name: MySQL-python
|
||||
removable: true
|
||||
version: 1.2*
|
||||
|
@ -301,6 +301,11 @@ components:
|
||||
- name: python-webob1.0
|
||||
removable: true
|
||||
version: 1.0*
|
||||
packager_name: devstack.distros.rhel6:YumPackagerWithRelinks
|
||||
packager_options:
|
||||
links:
|
||||
- source: /usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/
|
||||
target: /usr/lib/python2.6/site-packages/webob
|
||||
- name: sqlite
|
||||
removable: false
|
||||
version: 3.6*
|
||||
@ -353,6 +358,14 @@ components:
|
||||
running: devstack.components.nova:NovaRuntime
|
||||
uninstall: devstack.components.nova:NovaUninstaller
|
||||
packages:
|
||||
- name: python-webob1.0
|
||||
removable: true
|
||||
version: 1.0*
|
||||
packager_name: devstack.distros.rhel6:YumPackagerWithRelinks
|
||||
packager_options:
|
||||
links:
|
||||
- source: /usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/
|
||||
target: /usr/lib/python2.6/site-packages/webob
|
||||
- name: MySQL-python
|
||||
removable: true
|
||||
version: 1.2*
|
||||
|
@ -400,6 +400,9 @@ components:
|
||||
running: devstack.components.nova:NovaRuntime
|
||||
uninstall: devstack.components.nova:NovaUninstaller
|
||||
packages:
|
||||
- name: python-webob
|
||||
removable: true
|
||||
version: 1.0*
|
||||
- name: dnsmasq-base
|
||||
removable: true
|
||||
version: 2.57*
|
||||
|
@ -486,6 +486,9 @@ components:
|
||||
- name: python-iso8601
|
||||
removable: true
|
||||
version: 0.1*
|
||||
pips:
|
||||
- name: webob
|
||||
version: 1.0.8
|
||||
subsystems:
|
||||
api:
|
||||
packages:
|
||||
|
@ -178,13 +178,13 @@ class ActionRunner(object):
|
||||
else:
|
||||
try:
|
||||
if functors.start:
|
||||
functors.start(c)
|
||||
functors.start(instance)
|
||||
result = None
|
||||
if functors.run:
|
||||
result = functors.run(instance)
|
||||
if functors.end:
|
||||
functors.end(c, result)
|
||||
component_results[c] = result
|
||||
functors.end(instance, result)
|
||||
component_results[instance] = result
|
||||
self._mark_phase(instance, phase_name)
|
||||
except (excp.NoTraceException) as e:
|
||||
if self.force:
|
||||
@ -252,11 +252,11 @@ class InstallRunner(ActionRunner):
|
||||
|
||||
def _run(self, persona, component_order, instances):
|
||||
self._write_rc_file()
|
||||
results = self._run_phase(
|
||||
self._run_phase(
|
||||
PhaseFunctors(
|
||||
start=lambda name: LOG.info('Downloading %s.', colorizer.quote(name)),
|
||||
start=lambda i: LOG.info('Downloading %s.', colorizer.quote(i.component_name)),
|
||||
run=lambda i: i.download(),
|
||||
end=lambda name, result: LOG.info("Performed %s downloads.", result),
|
||||
end=lambda i, result: LOG.info("Performed %s downloads.", result),
|
||||
),
|
||||
component_order,
|
||||
instances,
|
||||
@ -264,9 +264,9 @@ class InstallRunner(ActionRunner):
|
||||
)
|
||||
self._run_phase(
|
||||
PhaseFunctors(
|
||||
start=lambda name: LOG.info('Configuring %s.', colorizer.quote(name)),
|
||||
start=lambda i: LOG.info('Configuring %s.', colorizer.quote(i.component_name)),
|
||||
run=lambda i: i.configure(),
|
||||
end=lambda name, result: LOG.info("Configured %s items.", colorizer.quote(result)),
|
||||
end=lambda i, result: LOG.info("Configured %s items.", colorizer.quote(result)),
|
||||
),
|
||||
component_order,
|
||||
instances,
|
||||
@ -282,12 +282,18 @@ class InstallRunner(ActionRunner):
|
||||
instances,
|
||||
"Pre-install"
|
||||
)
|
||||
|
||||
def install_start(instance):
|
||||
subsystems = set(list(instance.desired_subsystems))
|
||||
utils.log_iterable(subsystems, logger=LOG,
|
||||
header='Installing %s using subsystems' % colorizer.quote(instance.component_name))
|
||||
|
||||
self._run_phase(
|
||||
PhaseFunctors(
|
||||
start=lambda name: LOG.info('Installing %s.', colorizer.quote(name)),
|
||||
start=install_start,
|
||||
run=lambda i: i.install(),
|
||||
end=(lambda name, result: LOG.info("Finished install of %s items - check %s for information on what was done.",
|
||||
colorizer.quote(name), colorizer.quote(result))),
|
||||
end=(lambda i, result: LOG.info("Finished install of %s items - check %s for information on what was done.",
|
||||
colorizer.quote(i.component_name), colorizer.quote(result))),
|
||||
),
|
||||
component_order,
|
||||
instances,
|
||||
@ -295,7 +301,7 @@ class InstallRunner(ActionRunner):
|
||||
)
|
||||
self._run_phase(
|
||||
PhaseFunctors(
|
||||
start=lambda name: LOG.info('Post-installing %s.', colorizer.quote(name)),
|
||||
start=lambda i: LOG.info('Post-installing %s.', colorizer.quote(i.component_name)),
|
||||
run=lambda i: i.post_install(),
|
||||
end=None
|
||||
),
|
||||
@ -338,9 +344,9 @@ class StartRunner(ActionRunner):
|
||||
)
|
||||
self._run_phase(
|
||||
PhaseFunctors(
|
||||
start=lambda name: LOG.info('Starting %s.', name),
|
||||
start=lambda i: LOG.info('Starting %s.', i.component_name),
|
||||
run=lambda i: i.start(),
|
||||
end=lambda name, result: LOG.info("Start %s applications", colorizer.quote(result)),
|
||||
end=lambda i, result: LOG.info("Start %s applications", colorizer.quote(result)),
|
||||
),
|
||||
component_order,
|
||||
instances,
|
||||
@ -348,7 +354,7 @@ class StartRunner(ActionRunner):
|
||||
)
|
||||
self._run_phase(
|
||||
PhaseFunctors(
|
||||
start=lambda name: LOG.info('Post-starting %s.', colorizer.quote(name)),
|
||||
start=lambda i: LOG.info('Post-starting %s.', colorizer.quote(i.component_name)),
|
||||
run=lambda i: i.post_start(),
|
||||
end=None,
|
||||
),
|
||||
@ -373,9 +379,9 @@ class StopRunner(ActionRunner):
|
||||
def _run(self, persona, component_order, instances):
|
||||
self._run_phase(
|
||||
PhaseFunctors(
|
||||
start=lambda name: LOG.info('Stopping %s.', colorizer.quote(name)),
|
||||
start=lambda i: LOG.info('Stopping %s.', colorizer.quote(i.component_name)),
|
||||
run=lambda i: i.stop(),
|
||||
end=lambda name, result: LOG.info("Stopped %s items", colorizer.quote(result)),
|
||||
end=lambda i, result: LOG.info("Stopped %s items.", colorizer.quote(result)),
|
||||
),
|
||||
component_order,
|
||||
instances,
|
||||
@ -402,7 +408,7 @@ class UninstallRunner(ActionRunner):
|
||||
def _run(self, persona, component_order, instances):
|
||||
self._run_phase(
|
||||
PhaseFunctors(
|
||||
start=lambda name: LOG.info('Unconfiguring %s.', colorizer.quote(name)),
|
||||
start=lambda i: LOG.info('Unconfiguring %s.', colorizer.quote(i.component_name)),
|
||||
run=lambda i: i.unconfigure(),
|
||||
end=None,
|
||||
),
|
||||
@ -422,7 +428,7 @@ class UninstallRunner(ActionRunner):
|
||||
)
|
||||
self._run_phase(
|
||||
PhaseFunctors(
|
||||
start=lambda name: LOG.info('Uninstalling %s.', colorizer.quote(name)),
|
||||
start=lambda i: LOG.info('Uninstalling %s.', colorizer.quote(i.component_name)),
|
||||
run=lambda i: i.uninstall(),
|
||||
end=None,
|
||||
),
|
||||
@ -432,7 +438,7 @@ class UninstallRunner(ActionRunner):
|
||||
)
|
||||
self._run_phase(
|
||||
PhaseFunctors(
|
||||
start=lambda name: LOG.info('Post-uninstalling %s.', colorizer.quote(name)),
|
||||
start=lambda i: LOG.info('Post-uninstalling %s.', colorizer.quote(i.component_name)),
|
||||
run=lambda i: i.post_uninstall(),
|
||||
end=None,
|
||||
),
|
||||
|
@ -17,6 +17,7 @@
|
||||
import re
|
||||
import weakref
|
||||
|
||||
from devstack import colorizer
|
||||
from devstack import downloader as down
|
||||
from devstack import exceptions as excp
|
||||
from devstack import importer
|
||||
@ -253,13 +254,13 @@ class PkgInstallComponent(ComponentBase):
|
||||
for fn in config_fns:
|
||||
tgt_fn = self._get_target_config_name(fn)
|
||||
self.tracewriter.dirs_made(*sh.mkdirslist(sh.dirname(tgt_fn)))
|
||||
LOG.info("Configuring file %r", fn)
|
||||
LOG.info("Configuring file %s.", colorizer.quote(fn))
|
||||
(source_fn, contents) = self._get_source_config(fn)
|
||||
LOG.debug("Replacing parameters in file %r", source_fn)
|
||||
contents = self._config_param_replace(fn, contents, self._get_param_map(fn))
|
||||
LOG.debug("Applying final adjustments in file %r", source_fn)
|
||||
contents = self._config_adjust(contents, fn)
|
||||
LOG.info("Writing configuration file %r => %r", source_fn, tgt_fn)
|
||||
LOG.info("Writing configuration file %s to %s.", colorizer.quote(source_fn), colorizer.quote(tgt_fn))
|
||||
self.tracewriter.cfg_file_written(sh.write_file(tgt_fn, contents))
|
||||
return len(config_fns)
|
||||
|
||||
@ -273,11 +274,11 @@ class PkgInstallComponent(ComponentBase):
|
||||
for source in link_srcs:
|
||||
link = links.get(source)
|
||||
try:
|
||||
LOG.info("Symlinking %r => %r", link, source)
|
||||
LOG.info("Symlinking %s to %s.", colorizer.quote(link), colorizer.quote(source))
|
||||
self.tracewriter.dirs_made(*sh.symlink(source, link))
|
||||
self.tracewriter.symlink_made(link)
|
||||
except OSError as e:
|
||||
LOG.warn("Symlink (%r => %r) error (%s)", link, source, e)
|
||||
LOG.warn("Symlinking %s to %s failed: %s", colorizer.quote(link), colorizer.quote(source), e)
|
||||
return len(links)
|
||||
|
||||
def configure(self):
|
||||
@ -550,7 +551,7 @@ class ProgramRuntime(ComponentBase):
|
||||
LOG.debug("Starting %r using %r", app_name, run_type)
|
||||
details_fn = instance.start(app_name,
|
||||
app_pth=app_pth, app_dir=app_dir, opts=program_opts)
|
||||
LOG.info("Started %r details are in %r", app_name, details_fn)
|
||||
LOG.info("Started %s details are in %s", colorizer.quote(app_name), colorizer.quote(details_fn))
|
||||
# This trace is used to locate details about what to stop
|
||||
self.tracewriter.app_started(app_name, details_fn, run_type)
|
||||
am_started += 1
|
||||
@ -565,7 +566,7 @@ class ProgramRuntime(ComponentBase):
|
||||
killcls = importer.import_entry_point(how)
|
||||
LOG.debug("Stopping %r using %r", app_name, how)
|
||||
except RuntimeError as e:
|
||||
LOG.warn("Could not load class %r which should be used to stop %r: %s", how, app_name, e)
|
||||
LOG.warn("Could not load class %s which should be used to stop %s: %s", colorizer.quote(how), colorizer.quote(app_name), e)
|
||||
continue
|
||||
if killcls in killer_instances:
|
||||
killer = killer_instances[killcls]
|
||||
|
@ -17,7 +17,6 @@
|
||||
import io
|
||||
|
||||
from devstack import cfg
|
||||
from devstack import colorizer
|
||||
from devstack import component as comp
|
||||
from devstack import log as logging
|
||||
from devstack import shell as sh
|
||||
|
@ -172,7 +172,7 @@ class YumPackagerWithRelinks(yum.YumPackager):
|
||||
return response
|
||||
|
||||
def _install(self, pkg):
|
||||
yum.YumPackager.install(self, pkg)
|
||||
yum.YumPackager._install(self, pkg)
|
||||
options = pkg.get('packager_options', {})
|
||||
links = options.get('links', [])
|
||||
for src, tgt in links:
|
||||
|
@ -19,6 +19,7 @@ import urllib
|
||||
|
||||
import progressbar
|
||||
|
||||
from devstack import colorizer
|
||||
from devstack import log as logging
|
||||
from devstack import shell as sh
|
||||
|
||||
@ -48,15 +49,15 @@ class GitDownloader(Downloader):
|
||||
def download(self):
|
||||
dirsmade = list()
|
||||
if sh.isdir(self.store_where):
|
||||
LOG.info("Existing directory located at %r, leaving it alone." % (self.store_where))
|
||||
LOG.info("Existing directory located at %s, leaving it alone.", colorizer.quote(self.store_where))
|
||||
else:
|
||||
LOG.info("Downloading %r to %r" % (self.uri, self.store_where))
|
||||
LOG.info("Downloading %s to %s.", colorizer.quote(self.uri), colorizer.quote(self.store_where))
|
||||
dirsmade.extend(sh.mkdirslist(self.store_where))
|
||||
cmd = list(self.distro.get_command('git', 'clone'))
|
||||
cmd += [self.uri, self.store_where]
|
||||
sh.execute(*cmd)
|
||||
if self.branch and self.branch != GIT_MASTER_BRANCH:
|
||||
LOG.info("Adjusting branch to %r" % (self.branch))
|
||||
LOG.info("Adjusting branch to %s.", colorizer.quote(self.branch))
|
||||
cmd = list(self.distro.get_command('git', 'checkout'))
|
||||
cmd += [self.branch]
|
||||
sh.execute(*cmd, cwd=self.store_where)
|
||||
@ -93,7 +94,7 @@ class UrlLibDownloader(Downloader):
|
||||
self.p_bar.update(byte_down)
|
||||
|
||||
def download(self):
|
||||
LOG.info('Downloading using urllib: %r to %r', self.uri, self.store_where)
|
||||
LOG.info('Downloading using urllib: %s to %s.', colorizer.quote(self.uri), colorizer.quote(self.store_where))
|
||||
try:
|
||||
urllib.urlretrieve(self.uri, self.store_where, self._report)
|
||||
finally:
|
||||
|
@ -21,7 +21,6 @@ import os
|
||||
import pwd
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
|
||||
from devstack import env
|
||||
|
@ -22,7 +22,6 @@ import os
|
||||
import random
|
||||
import re
|
||||
import socket
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
import distutils.version
|
||||
|
4
stack
4
stack
@ -177,7 +177,7 @@ def run(args):
|
||||
|
||||
action = args.pop("action", '').strip().lower()
|
||||
if action not in actions.get_action_names():
|
||||
print(colorizer.color_text("No valid action specified!", "red"))
|
||||
print(colorizer.color("No valid action specified!", "red"))
|
||||
return False
|
||||
|
||||
loaded_rcs = False
|
||||
@ -193,7 +193,7 @@ def run(args):
|
||||
|
||||
persona_fn = args.pop('persona_fn')
|
||||
if not persona_fn or not sh.isfile(persona_fn):
|
||||
print(colorizer.color_text("No valid persona file name specified!", "red"))
|
||||
print(colorizer.color("No valid persona file name specified!", "red"))
|
||||
return False
|
||||
persona_fn = sh.abspth(persona_fn)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user