From 804328b6ecb64a471f58a227b0c864f220e6115d Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Wed, 5 Aug 2015 10:06:10 -0600 Subject: [PATCH] Use Remote.chcon() in task.internal.syslog() Signed-off-by: Zack Cerza --- teuthology/orchestra/remote.py | 1 - teuthology/task/internal.py | 12 ++++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/teuthology/orchestra/remote.py b/teuthology/orchestra/remote.py index 38004b0649..f39cdf7ca2 100644 --- a/teuthology/orchestra/remote.py +++ b/teuthology/orchestra/remote.py @@ -11,7 +11,6 @@ import re import logging from cStringIO import StringIO from teuthology import lockstatus as ls -from teuthology import misc import os import pwd import tempfile diff --git a/teuthology/task/internal.py b/teuthology/task/internal.py index 62f683a828..a275f78707 100644 --- a/teuthology/task/internal.py +++ b/teuthology/task/internal.py @@ -598,14 +598,10 @@ def syslog(ctx, config): conf_fp = StringIO('\n'.join(conf_lines)) try: for rem in ctx.cluster.remotes.iterkeys(): - # Exclude downburst VMs for now; they have SELinux disabled - if rem.os.package_type == 'rpm' and not misc.is_vm(rem.shortname): - log_context = 'system_u:object_r:var_log_t:s0' - for log_path in (kern_log, misc_log): - rem.run( - args="touch {log} && sudo chcon {con} {log}".format( - log=log_path, con=log_context), - ) + log_context = 'system_u:object_r:var_log_t:s0' + for log_path in (kern_log, misc_log): + rem.run(args='touch %s' % log_path) + rem.chcon(log_path, log_context) misc.sudo_write_file( remote=rem, path=CONF, -- 2.39.5