]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
systemd test devstack-dispatcher
authorZack Cerza <zack@redhat.com>
Mon, 20 Feb 2023 21:31:48 +0000 (14:31 -0700)
committerZack Cerza <zack@redhat.com>
Mon, 20 Feb 2023 21:47:01 +0000 (14:47 -0700)
containers/teuthology-dev/Dockerfile
containers/teuthology-dev/teuthology-dispatcher@.service [new file with mode: 0644]
containers/teuthology-dev/teuthology.sh

index a486644d82b359d2fd6543bd1cf7c3127835c20f..e601654c5dfba0a531c90883221b142260cdd9a3 100644 (file)
@@ -9,6 +9,7 @@ RUN apt-get update && \
     ipmitool \
     python3-pip \
     python3-venv \
+    systemd \
     vim \
     libev-dev \
     libvirt-dev \
@@ -30,7 +31,9 @@ RUN \
 COPY containers/teuthology-dev/containerized_node.yaml /teuthology
 COPY containers/teuthology-dev/.teuthology.yaml /root
 COPY containers/teuthology-dev/teuthology.sh /
+COPY containers/teuthology-dev/teuthology-dispatcher@.service /etc/systemd/system/
 RUN \
+    systemctl enable teuthology-dispatcher@machinetype && \
     mkdir $HOME/.ssh && \
     touch $HOME/.ssh/id_rsa && \
     chmod 600 $HOME/.ssh/id_rsa && \
diff --git a/containers/teuthology-dev/teuthology-dispatcher@.service b/containers/teuthology-dev/teuthology-dispatcher@.service
new file mode 100644 (file)
index 0000000..b800e2d
--- /dev/null
@@ -0,0 +1,20 @@
+[Unit]
+Description=Teuthology Dispatcher
+
+Wants=network.target
+After=network.target
+
+[Install]
+WantedBy=multi-user.target
+
+[Service]
+Type=simple
+User=teuthworker
+ExecStart=~/src/git.ceph.com_git_teuthology_main/virtualenv/bin/teuthology-dispatcher \
+    -v \
+    --archive-dir ~/archive \
+    --log-dir ~/archive/worker-logs \
+    --tube %i
+ExecStop=touch /tmp/teuthology-stop-dispatcher
+Restart=on-failure
+TimeoutStopSec=infinity
index 66672bd8228b04a6a456ceb3f705b87746e7cfd8..50314f13da5c615b65af76c5625eec6261e49c4f 100755 (executable)
@@ -35,7 +35,4 @@ if [ "$TEUTHOLOGY_SUITE" != "none" ]; then
     teuthology-queue -m $MACHINE_TYPE -s | \
       python3 -c "import sys, json; assert json.loads(sys.stdin.read())['count'] > 0, 'queue is empty!'"
 fi
-teuthology-dispatcher -v \
-    --log-dir /teuthology/log \
-    --tube $MACHINE_TYPE \
-    $DISPATCHER_EXIT_FLAG
+exec /usr/lib/systemd/systemd --system