]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Use Remote.chcon() in task.internal.syslog() 590/head
authorZack Cerza <zack@redhat.com>
Wed, 5 Aug 2015 16:06:10 +0000 (10:06 -0600)
committerZack Cerza <zack@redhat.com>
Wed, 5 Aug 2015 16:39:39 +0000 (10:39 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/orchestra/remote.py
teuthology/task/internal.py

index 38004b0649acc02bfd4eaa394b6c99b43cf22bc1..f39cdf7ca203ae642064edd7e728df62bce68da3 100644 (file)
@@ -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
index 62f683a8285c08246dec6725e863874f6caa950d..a275f78707790dbce7e46b177323f306e9f7c7ac 100644 (file)
@@ -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,