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) NETNS=$(ip netns identify)
NAME=neutron-keepalived-${NETNS} NAME=neutron-keepalived-${NETNS}
<%- if $container_cli == 'docker' { -%> <%- if $container_cli == 'docker' { -%>
CLI='docker' CLI='docker exec --detach'
CMD="ip netns exec ${NETNS} /usr/bin/neutron-keepalived-state-change" CMD="ip netns exec ${NETNS} /usr/bin/neutron-keepalived-state-change exec"
<%- } elsif $container_cli == 'podman' { -%> <%- } 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' CMD='/usr/bin/neutron-keepalived-state-change'
<%- } else { -%> <%- } else { -%>
CLI='echo noop' CLI='echo noop'
@ -41,8 +41,7 @@ then
exit 0 exit 0
fi fi
$CLI exec --detach \ $CLI -u root \
-u root \
--privileged \ --privileged \
$NAME \ $NAME \
$CMD $ARGS $CMD $ARGS