[CI] Use ss instead of netstat

In case of rabbitmq container is unhealthy
let's use `ss` command instead of `netstat` as
``netstat`` is not present in distros anymore and
in containers we already have iproute2 [debian/ubuntu]
and iproute [rhel based] package installed.

[1] https://zuul.opendev.org/t/openstack/build/c70df1ecb52841579207c26cdc159327

+ echo 'rabbitmq - netstat -an'
rabbitmq - netstat -an
+ sudo docker exec rabbitmq netstat -an
OCI runtime exec failed: exec failed: unable to start container process: exec: "netstat": executable file not found in $PATH: unknown

Change-Id: I8417545735ea02d14dc1f83e18aa75b94213f814
This commit is contained in:
Michal Arbet 2025-04-09 16:18:34 +02:00
parent c08bd597ce
commit 6149799a6d

View File

@ -34,8 +34,8 @@ check_podman_unhealthies() {
echo "Discovered unhealthy container: $container"
echo "$container - ps axwuf"
sudo podman exec $container ps axwuf
echo "$container - netstat -an"
sudo podman exec $container netstat -an
echo "$container - ss -an"
sudo podman exec $container ss -an
done
}
@ -73,8 +73,8 @@ check_docker_unhealthies() {
echo "Discovered unhealthy container: $container"
echo "$container - ps axwuf"
sudo docker exec $container ps axwuf
echo "$container - netstat -an"
sudo docker exec $container netstat -an
echo "$container - ss -an"
sudo docker exec $container ss -an
done
}