summaryrefslogtreecommitdiffstats
path: root/lava-slave
diff options
context:
space:
mode:
Diffstat (limited to 'lava-slave')
-rw-r--r--lava-slave/Dockerfile11
-rwxr-xr-xlava-slave/scripts/start.sh14
2 files changed, 15 insertions, 10 deletions
diff --git a/lava-slave/Dockerfile b/lava-slave/Dockerfile
index 6f2181e..b5e6385 100644
--- a/lava-slave/Dockerfile
+++ b/lava-slave/Dockerfile
@@ -2,10 +2,6 @@ FROM bitnami/minideb:stretch
RUN apt-get update
-# Add services helper utilities to start and stop LAVA
-COPY scripts/stop.sh .
-COPY scripts/start.sh .
-
# e2fsprogs is for libguestfs
RUN \
echo 'lava-server lava-server/instance-name string lava-slave-instance' | debconf-set-selections && \
@@ -24,10 +20,11 @@ RUN \
qemu-system \
qemu-system-arm \
qemu-system-i386 \
- qemu-kvm \
xnbd-server \
e2fsprogs
+RUN if [ "$(uname -m)" = "x86_64" -o "$(uname -m)" = "x86" ] ;then apt-get -y install qemu-kvm ; fi
+
# Uncomment the following for having the latest package (you need to comment all build-lava below)
#RUN DEBIAN_FRONTEND=noninteractive apt-get -y install wget gnupg \
# && wget http://images.validation.linaro.org/production-repo/production-repo.key.asc \
@@ -56,6 +53,10 @@ RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install cu
RUN rm /etc/apt/sources.list.d/testing.list
+# Add services helper utilities to start and stop LAVA
+COPY scripts/stop.sh .
+COPY scripts/start.sh .
+
EXPOSE 69/udp 80
CMD /start.sh
diff --git a/lava-slave/scripts/start.sh b/lava-slave/scripts/start.sh
index dcbbcd7..92e76bb 100755
--- a/lava-slave/scripts/start.sh
+++ b/lava-slave/scripts/start.sh
@@ -6,18 +6,22 @@ fi
service tftpd-hpa start || exit 4
-# FIXME lava-slave does not run if old pid is present
-rm -f /var/run/lava-slave.pid
-service lava-slave start || exit 5
-
touch /var/run/conmux-registry
/usr/sbin/conmux-registry 63000 /var/run/conmux-registry&
sleep 2
for item in $(ls /etc/conmux/*cf)
do
echo "Add $item"
+ # On some OS, the rights/user from host are not duplicated on guest
+ grep -o '/dev/[a-zA-Z0-9_-]*' $item | xargs chown uucp
/usr/sbin/conmux $item &
done
# start an http file server for boot/transfer_overlay support
-(cd /var/lib/lava/dispatcher; python -m SimpleHTTPServer 80)
+(cd /var/lib/lava/dispatcher; python -m SimpleHTTPServer 80) &
+
+# FIXME lava-slave does not run if old pid is present
+rm -f /var/run/lava-slave.pid
+service lava-slave start || exit 5
+
+sleep 3650d