diff --git a/devstack/cfg.py b/devstack/cfg.py index 0aa489c5..e881a3e5 100644 --- a/devstack/cfg.py +++ b/devstack/cfg.py @@ -84,7 +84,6 @@ class StackConfigParser(IgnoreMissingConfigParser): self.db_dsns = dict() def _resolve_value(self, section, option, value_gotten): - key = make_id(section, option) if section == 'host' and option == 'ip': LOG.debug("Host ip from configuration/environment was empty, programatically attempting to determine it.") value_gotten = utils.get_host_ip() diff --git a/devstack/log.py b/devstack/log.py index 8e140c8e..1dfc6e48 100644 --- a/devstack/log.py +++ b/devstack/log.py @@ -64,6 +64,7 @@ class AuditAdapter(logging.LoggerAdapter): warn = logging.LoggerAdapter.warning def __init__(self, logger): + logging.LoggerAdapter.__init__(self) self.logger = logger def audit(self, msg, *args, **kwargs): diff --git a/devstack/shell.py b/devstack/shell.py index e5018421..c6d9627d 100644 --- a/devstack/shell.py +++ b/devstack/shell.py @@ -255,7 +255,6 @@ def chown_r(path, uid, gid, run_as_root=True): LOG.audit("Changing ownership of %s to %s:%s" % (joinpths(root, f), uid, gid)) - def _explode_path(path): parts = list() while path != ROOT_PATH: @@ -308,7 +307,8 @@ def mkdirslist(path): dirs_possible.add(path) while True: (base, _) = os.path.split(path) - if not base: break + if not base: + break dirs_possible.add(base) path = base if path == ROOT_PATH: @@ -403,8 +403,8 @@ def rmdir(path, quiet=True, run_as_root=False): if not isdir(path): return try: - with audit(run_as_root): - LOG.debug("Deleting directory \"%s\" with the cavet that we will fail if it's not empty." % (path)) + with Rooted(run_as_root): + LOG.audit("Deleting directory \"%s\" with the cavet that we will fail if it's not empty." % (path)) if not DRYRUN_MODE: os.rmdir(path) LOG.audit("Deleted directory \"%s\"" % (path)) diff --git a/stack b/stack index c474f790..a9ef39ce 100755 --- a/stack +++ b/stack @@ -122,7 +122,7 @@ def configure_logging(args): else: console_logger.setFormatter(logging.Formatter(console_format)) root_logger.addHandler(console_logger) - + # Adjust logging verbose level based on the command line switch. log_level = logging.INFO if args['verbosity'] >= 2: