]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
task/internal/syslog: make kern.log and misc.log world-writable 1075/head
authorIlya Dryomov <idryomov@gmail.com>
Fri, 26 May 2017 19:37:52 +0000 (21:37 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 26 May 2017 20:01:14 +0000 (22:01 +0200)
kern.log and misc.log weren't getting written to on ubuntu machines.
On centos chcon is saving the day.

Fixes: http://tracker.ceph.com/issues/16835
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
teuthology/task/internal/syslog.py

index 63b8f77642c45072992fd5f88d3a0ff4a636800d..27abc8fe49de06fe9191e834c1ae14c33057ca23 100644 (file)
@@ -46,7 +46,7 @@ def syslog(ctx, config):
         for rem in ctx.cluster.remotes.iterkeys():
             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.run(args=['install', '-m', '666', '/dev/null', log_path])
                 rem.chcon(log_path, log_context)
             misc.sudo_write_file(
                 remote=rem,