Filter out wrapper commands from the ps output
This patch is filtering out the wrapper execution from the ps output in the sync script. By doing this, it'll effectively detect when the target process is not running and start it. Otherwise, there might be cases where the process start is postponed until next iteration of the sync script (1 minute) and it may be already too late. This is causing tests to fail as the metadata service is not provisioned in time for instances to fetch their SSH keys. Change-Id: I530e257f343ffc551db9e984f9a27b20c397bfb1 Co-Authored-By: Jakub Libosvar <jlibosva@redhat.com> Closes-Bug: #1868082 Signed-off-by: Daniel Alvarez <dalvarez@redhat.com>
This commit is contained in:
parent
3bfa92d751
commit
0df3ebd759
|
@ -41,7 +41,7 @@ for LINE in $(cat {{ tripleo_systemd_wrapper_service_dir }}/{{ tripleo_systemd_w
|
|||
NETNS=$(echo $LINE | awk '{ print $1 }')
|
||||
IFS=$' ' ARGS=$(echo $LINE | sed -e "s|$NETNS ||" | xargs)
|
||||
# TODO(emilien) investigate if we should rather run docker/podman ps instead of ps on the host
|
||||
if ! ps -e -o pid,command | grep "$(echo $NETNS | sed 's|^[^-]*\-||')" | grep -v grep &> /dev/null; then
|
||||
if ! ps -e -o pid,command | grep "$(echo $NETNS | sed 's|^[^-]*\-||')" | egrep -v "grep | netns exec" &> /dev/null; then
|
||||
start_service $NETNS $ARGS
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue