Skip to content

Commit

Permalink
Remove restart flag from contivNet.sh
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
tiewei committed Jan 9, 2018
1 parent 7bd4809 commit 009eee9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
5 changes: 4 additions & 1 deletion install/k8s/contiv/contiv-compose
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ class ContivComposer(object):
'CONTIV_NETMASTER_ETCD_ENDPOINTS')
]
# make the container idle
container['command'] = ['tail', '-f', '/dev/null']
container['command'] = ["/bin/sh", "-c"]
container['args'] = [
'cp /contiv/bin/contivk8s /opt/cni/bin/contivk8s && tail -f /dev/null'
]
# add binary mount points to run tests
container['volumeMounts'].append({
'mountPath': '/contiv/bin',
Expand Down
11 changes: 3 additions & 8 deletions scripts/netContain/scripts/contivNet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,11 @@ mkdir -p /opt/contiv/
set +e
if [ "$CONTIV_ROLE" = "netmaster" ]; then
echo "INFO: Starting contiv netmaster"
if [ -f /tmp/restart_netmaster ]; then
/contiv/bin/netmaster $@
echo "ERROR: Contiv netmaster exited with $?"
fi
/contiv/bin/netmaster $@
elif [ "$CONTIV_ROLE" = "netplugin" ]; then
mkdir -p /opt/cni/bin
cp /contiv/bin/contivk8s /opt/cni/bin/
echo "INFO: Starting contiv netplugin"
if [ -f /tmp/restart_netplugin ]; then
/contiv/bin/netplugin $@
echo "ERROR: Contiv netplugin has exited with $?"
fi
/contiv/bin/netplugin $@
echo "ERROR: Contiv netplugin has exited with $?"
fi

0 comments on commit 009eee9

Please sign in to comment.