enabling dumb-init for shovel
Change-Id: I6bb546c21866f4b6d8f1095079f288945080396d
diff --git a/common/utils/consulhelpers.py b/common/utils/consulhelpers.py
index 2f1efd8..a828b3f 100644
--- a/common/utils/consulhelpers.py
+++ b/common/utils/consulhelpers.py
@@ -40,6 +40,7 @@
if len(services) == 0:
raise Exception(
'Cannot find service {} in consul'.format(service_name))
+ os.exit(1)
# pick a random entry
# TODO should we prefer local IP addresses? Probably.
diff --git a/compose/docker-compose-system-test.yml b/compose/docker-compose-system-test.yml
index 344f6f9..84a8dd2 100644
--- a/compose/docker-compose-system-test.yml
+++ b/compose/docker-compose-system-test.yml
@@ -105,6 +105,7 @@
- consul
- kafka
- grafana
+ restart: unless-stopped
#
# Voltha server instance(s)
diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base
index ee20521..8e5c09b 100644
--- a/docker/Dockerfile.base
+++ b/docker/Dockerfile.base
@@ -23,14 +23,16 @@
# Update to have latest images
RUN apt-get update && \
- apt-get install -y python python-pip openssl iproute2 libpcap-dev
+ apt-get install -y python python-pip openssl iproute2 libpcap-dev wget
COPY requirements.txt /tmp/requirements.txt
# pip install cython enum34 six && \
# Install app dependencies
-RUN apt-get install -y wget build-essential make gcc binutils python-dev libffi-dev libssl-dev git && \
+RUN wget https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
+ dpkg -i *.deb && \
+ rm -f *.deb && \
+ apt-get install -y wget build-essential make gcc binutils python-dev libffi-dev libssl-dev git && \
pip install -r /tmp/requirements.txt && \
apt-get purge -y wget build-essential make gcc binutils python-dev libffi-dev libssl-dev git && \
apt-get autoremove -y
-
diff --git a/docker/Dockerfile.ofagent b/docker/Dockerfile.ofagent
index b5d49f0..875113e 100644
--- a/docker/Dockerfile.ofagent
+++ b/docker/Dockerfile.ofagent
@@ -30,7 +30,6 @@
wget http://ftp.us.debian.org/debian/pool/main/p/protobuf/libprotobuf-dev_3.0.0-9_amd64.deb && \
wget http://ftp.us.debian.org/debian/pool/main/p/protobuf/libprotobuf10_3.0.0-9_amd64.deb && \
wget http://ftp.us.debian.org/debian/pool/main/p/protobuf/protobuf-compiler_3.0.0-9_amd64.deb && \
- wget https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
dpkg -i *.deb && \
protoc --version && \
rm -f *.deb
diff --git a/docker/Dockerfile.shovel b/docker/Dockerfile.shovel
index 4ae1808..7270e20 100644
--- a/docker/Dockerfile.shovel
+++ b/docker/Dockerfile.shovel
@@ -27,5 +27,7 @@
COPY common /shovel/common
COPY shovel /shovel/shovel
+ENTRYPOINT ["/usr/bin/dumb-init", "--"]
+
# Exposing process and default entry point
CMD ["python", "shovel/shovel/main.py"]