]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
tasks/internal: put kernel.core_pattern in sysctl.conf too 1395/head
authorSage Weil <sage@redhat.com>
Wed, 15 Jan 2020 19:59:32 +0000 (13:59 -0600)
committerSage Weil <sage@redhat.com>
Wed, 15 Jan 2020 20:00:05 +0000 (14:00 -0600)
This way if systemd restarts  or is reinstalled (as it is on el8 at the
moment) we won't lose this setting.

Signed-off-by: Sage Weil <sage@redhat.com>
teuthology/task/internal/__init__.py

index a539923039877160543a2ddcc59e55c76f7eb830..ad590e96a6064dc186c38af1c037849ede96be95 100644 (file)
@@ -416,6 +416,11 @@ def coredump(ctx, config):
                 '{adir}/coredump'.format(adir=archive_dir),
                 run.Raw('&&'),
                 'sudo', 'sysctl', '-w', 'kernel.core_pattern={adir}/coredump/%t.%p.core'.format(adir=archive_dir),
+               run.Raw('&&'),
+               'echo',
+               'kernel.core_pattern={adir}/coredump/%t.%p.core'.format(adir=archive_dir),
+               run.Raw('|'),
+               'sudo', 'tee', '-a', '/etc/sysctl.conf',
             ],
             wait=False,
         )