Skip to content

Commit 009eee9

Browse files
author
Wei Tie
committed
Remove restart flag from contivNet.sh
Remove restart flag from contivNet.sh, the container should be restarted by k8s when it failed. Also updated compose to copy contivk8s binary Signed-off-by: Wei Tie <wtie@cisco.com>
1 parent 7bd4809 commit 009eee9

2 files changed

Lines changed: 7 additions & 9 deletions

File tree

install/k8s/contiv/contiv-compose

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ class ContivComposer(object):
3030
'CONTIV_NETMASTER_ETCD_ENDPOINTS')
3131
]
3232
# make the container idle
33-
container['command'] = ['tail', '-f', '/dev/null']
33+
container['command'] = ["/bin/sh", "-c"]
34+
container['args'] = [
35+
'cp /contiv/bin/contivk8s /opt/cni/bin/contivk8s && tail -f /dev/null'
36+
]
3437
# add binary mount points to run tests
3538
container['volumeMounts'].append({
3639
'mountPath': '/contiv/bin',

scripts/netContain/scripts/contivNet.sh

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,11 @@ mkdir -p /opt/contiv/
5555
set +e
5656
if [ "$CONTIV_ROLE" = "netmaster" ]; then
5757
echo "INFO: Starting contiv netmaster"
58-
if [ -f /tmp/restart_netmaster ]; then
59-
/contiv/bin/netmaster $@
60-
echo "ERROR: Contiv netmaster exited with $?"
61-
fi
58+
/contiv/bin/netmaster $@
6259
elif [ "$CONTIV_ROLE" = "netplugin" ]; then
6360
mkdir -p /opt/cni/bin
6461
cp /contiv/bin/contivk8s /opt/cni/bin/
6562
echo "INFO: Starting contiv netplugin"
66-
if [ -f /tmp/restart_netplugin ]; then
67-
/contiv/bin/netplugin $@
68-
echo "ERROR: Contiv netplugin has exited with $?"
69-
fi
63+
/contiv/bin/netplugin $@
64+
echo "ERROR: Contiv netplugin has exited with $?"
7065
fi

0 commit comments

Comments
 (0)