ipmitool \
python3-pip \
python3-venv \
+ systemd \
vim \
libev-dev \
libvirt-dev \
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 && \
--- /dev/null
+[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
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