]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
containers/testnode: Write /scratch_devs
authorZack Cerza <zack@redhat.com>
Thu, 4 Aug 2022 21:14:32 +0000 (15:14 -0600)
committerZack Cerza <zack@redhat.com>
Mon, 8 Aug 2022 22:23:06 +0000 (16:23 -0600)
containers/testnode/Dockerfile
containers/testnode/scratch-devs.service [new file with mode: 0644]

index 0d3ec6e45f3e281fa388f151827b9b78b5846e50..2562bf041094a9fc2fcf8dc59fb6de70f3dbb4c0 100644 (file)
@@ -38,8 +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
+COPY run-fs.service scratch-devs.service /etc/systemd/system/
+RUN systemctl enable run-fs scratch-devs
 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/scratch-devs.service b/containers/testnode/scratch-devs.service
new file mode 100644 (file)
index 0000000..26e2e52
--- /dev/null
@@ -0,0 +1,10 @@
+[Unit]
+Description=Write /scratch_devs
+
+[Service]
+Type=oneshot
+RemainAfterExit=true
+ExecStart=/bin/bash -c "ls -1 /dev/loop[0-9]* > /scratch_devs"
+
+[Install]
+WantedBy=multi-user.target