From: Patrick Donnelly Date: Wed, 10 Apr 2024 17:58:53 +0000 (-0400) Subject: teuthology/task/install: add daemon-rebooter X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=662036539819ab4dbdc3537984e566042816d6ef;p=teuthology.git teuthology/task/install: add daemon-rebooter A simple utility to restart a daemon/task if it returns success. Signed-off-by: Patrick Donnelly --- diff --git a/teuthology/task/install/bin/daemon-rebooter b/teuthology/task/install/bin/daemon-rebooter new file mode 100755 index 0000000000..635ccfbbdb --- /dev/null +++ b/teuthology/task/install/bin/daemon-rebooter @@ -0,0 +1,5 @@ +#!/bin/sh + +while "$@"; do + sleep 2 +done diff --git a/teuthology/task/install/util.py b/teuthology/task/install/util.py index 46fbde9c9c..c6711974bd 100644 --- a/teuthology/task/install/util.py +++ b/teuthology/task/install/util.py @@ -9,6 +9,14 @@ from teuthology.orchestra import run log = logging.getLogger(__name__) +TEUTHOLOGY_BIN_UTILITIES = [ + 'daemon-helper', + 'adjust-ulimits', + 'stdin-killer', + 'daemon-rebooter', +] + + def _get_builder_project(ctx, remote, config): return packaging.get_builder_project()( config.get('project', 'ceph'), @@ -81,9 +89,8 @@ def _ship_utilities(ctx): except IOError as e: log.info('Cannot ship supression file for valgrind: %s...', e.strerror) - FILES = ['daemon-helper', 'adjust-ulimits', 'stdin-killer'] destdir = '/usr/bin' - for filename in FILES: + for filename in TEUTHOLOGY_BIN_UTILITIES: log.info('Shipping %r...', filename) src = os.path.join(os.path.dirname(__file__), 'bin', filename) dst = os.path.join(destdir, filename)