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

This commit is contained in:
Zuul 2019-04-18 11:06:51 +00:00 committed by Gerrit Code Review
commit a149a85cfb

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