Correct how podman exec is called for the neutron-keepalived-state-change

Podman exec doesn't have the "--detach" flag, so this one didn't work at
all until now.

Change-Id: Ibf18056dc1ed0168b3aa467e7034af7e59c98cb7
This commit is contained in:
Cédric Jeanneret 2019-04-16 14:12:17 +02:00
parent be1c9e1f85
commit f5a7ca6fb5
1 changed files with 4 additions and 5 deletions

View File

@ -19,10 +19,10 @@ ARGS="$@"
NETNS=$(ip netns identify)
NAME=neutron-keepalived-${NETNS}
<%- if $container_cli == 'docker' { -%>
CLI='docker'
CMD="ip netns exec ${NETNS} /usr/bin/neutron-keepalived-state-change"
CLI='docker exec --detach'
CMD="ip netns exec ${NETNS} /usr/bin/neutron-keepalived-state-change exec"
<%- } elsif $container_cli == 'podman' { -%>
CLI="nsenter --net=/run/netns/${NETNS} --preserve-credentials -m -t 1 podman"
CLI="nsenter --net=/run/netns/${NETNS} --preserve-credentials -m -t 1 podman exec"
CMD='/usr/bin/neutron-keepalived-state-change'
<%- } else { -%>
CLI='echo noop'
@ -41,8 +41,7 @@ then
exit 0
fi
$CLI exec --detach \
-u root \
$CLI -u root \
--privileged \
$NAME \
$CMD $ARGS