maintenance: make titan-22 link keeper passive

This commit is contained in:
jenkins 2026-05-22 15:56:50 -03:00
parent 5bce6c4c04
commit 46c3e97688

View File

@ -59,29 +59,32 @@ spec:
while true; do
nsenter -t 1 -m -u -i -n -p -- /bin/sh -lc '
date -Is
if ethtool enp5s0 | grep -q "Link detected: yes"; then
ethtool enp5s0 | sed -n "1,25p" || true
ip -br addr show enp5s0 || true
exit 0
fi
echo "link down; attempting recovery"
ip link set enp5s0 up || true
ethtool --set-eee enp5s0 eee off || true
if ! ethtool enp5s0 | grep -q "Link detected: yes"; then
ethtool -s enp5s0 advertise 0x80000000002f autoneg on || ethtool -s enp5s0 autoneg on || true
sleep 3
fi
ethtool -s enp5s0 advertise 0x80000000002f autoneg on || ethtool -s enp5s0 autoneg on || true
sleep 5
if ! ethtool enp5s0 | grep -q "Link detected: yes"; then
echo "link still down after autoneg; trying forced 2.5G"
ethtool -s enp5s0 speed 2500 duplex full autoneg off || true
sleep 4
sleep 3
fi
if ! ethtool enp5s0 | grep -q "Link detected: yes"; then
echo "link still down after 2.5G; trying forced 1G"
ethtool -s enp5s0 speed 1000 duplex full autoneg off || true
sleep 4
sleep 3
fi
ethtool --show-eee enp5s0 || true
ethtool enp5s0 | sed -n "1,45p" || true
ip -br addr show enp5s0 || true
'
sleep 15
sleep 60
done