From: Zack Cerza Date: Tue, 28 Nov 2017 17:37:43 +0000 (-0700) Subject: task/console_log: Allow specifying remotes X-Git-Tag: 1.1.0~375^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d27d610afd4699d55985286eb51788da694600fc;p=teuthology.git task/console_log: Allow specifying remotes For use with reimaging; allow passing remotes directly instead of relying on the ctx.cluster object, which won't exist at that time. Signed-off-by: Zack Cerza --- diff --git a/teuthology/task/console_log.py b/teuthology/task/console_log.py index c352e7ca9..ab94ed2ab 100644 --- a/teuthology/task/console_log.py +++ b/teuthology/task/console_log.py @@ -22,6 +22,8 @@ class ConsoleLog(Task): self.enabled = False if 'logfile_name' in self.config: self.logfile_name = self.config['logfile_name'] + if 'remotes' in self.config: + self.remotes = self.config['remotes'] def filter_hosts(self): super(ConsoleLog, self).filter_hosts() @@ -40,6 +42,7 @@ class ConsoleLog(Task): else: new_cluster.add(remote, roles) self.cluster = new_cluster + self.remotes = self.cluster.remotes.keys() return self.cluster def setup(self): @@ -65,7 +68,7 @@ class ConsoleLog(Task): self.start_logging() def start_logging(self): - for remote in self.cluster.remotes.keys(): + for remote in self.remotes: log_path = os.path.join( self.archive_dir, self.logfile_name.format(shortname=remote.shortname),