Skip to content

Commit 65fbb03

Browse files
author
Dinko Dermendzhiev
committed
setup-policy-routes: disable refresh time and prevent restart using exit code 2 on timemout (ENI is invalid)
1 parent 097d289 commit 65fbb03

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

bin/setup-policy-routes.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ start)
5959
((counter++)) || true
6060
if ((counter >= max_wait)); then
6161
error "Timed out waiting for sysfs node for ${iface} after $((counter / 10)) seconds"
62-
exit 1
62+
/usr/bin/systemctl disable --now refresh-policy-routes@${iface}.timer 2>/dev/null || true
63+
exit 2
6364
fi
6465
done
6566
debug "Starting configuration for $iface"

systemd/system/policy-routes@.service

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ User=root
1717
ExecStart=/usr/bin/setup-policy-routes %i start
1818
Restart=on-failure
1919
RestartSec=1
20+
RestartPreventExitStatus=2
2021
KillMode=process

0 commit comments

Comments
 (0)