]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
containers/testnode: Manage a few items in /run/
authorZack Cerza <zack@redhat.com>
Thu, 4 Aug 2022 00:13:11 +0000 (18:13 -0600)
committerZack Cerza <zack@redhat.com>
Mon, 20 Feb 2023 20:17:49 +0000 (13:17 -0700)
bc of systemd

containers/testnode/Dockerfile
containers/testnode/run-fs.service [new file with mode: 0644]

index 4d61da2f8d1d722061d5fa9651973c2cad60ef16..0d3ec6e45f3e281fa388f151827b9b78b5846e50 100644 (file)
@@ -38,6 +38,8 @@ RUN dnf clean all && \
 COPY testnode_start.sh /
 COPY testnode_stop.sh /
 COPY testnode_sudoers /etc/sudoers.d/teuthology
+COPY run-fs.service /etc/systemd/system/
+RUN systemctl enable run-fs
 RUN \
     ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N '' && \
     sed -i 's/#PermitRootLogin yes/PermitRootLogin yes/' /etc/ssh/sshd_config && \
diff --git a/containers/testnode/run-fs.service b/containers/testnode/run-fs.service
new file mode 100644 (file)
index 0000000..f287e27
--- /dev/null
@@ -0,0 +1,13 @@
+[Unit]
+Description=Ensure required items in /run/ are present
+
+[Service]
+Type=oneshot
+RemainAfterExit=true
+ExecStartPre=mkdir -p run/udev
+ExecStartPre=mkdir -p run/sshd
+ExecStartPre=touch /run/.containerenv /.dockerenv
+ExecStart=true
+
+[Install]
+WantedBy=multi-user.target