Skip to content

Commit 841e6c8

Browse files
committed
Add timer for Azure VIP routes reconciliation
During systemd daemon-reload (e.g., during MCO updates), the openshift-azure-routes.path unit may miss file change events from apiserver-watcher. This leaves the azure-vips nftables table empty even when the API server is back up. Fix by adding a periodic timer that triggers reconciliation every 30 seconds as a fallback. The path unit still provides immediate response to file changes. Also wrap the service ExecStart with flock to prevent concurrent executions when both triggers fire simultaneously. Signed-off-by: Riccardo Ravaioli <[email protected]>
1 parent efc86f6 commit 841e6c8

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

templates/master/00-master/azure/units/openshift-azure-routes.service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ contents: |
88
99
[Service]
1010
Type=simple
11-
ExecStart=/bin/bash /opt/libexec/openshift-azure-routes.sh start
11+
ExecStart=/usr/bin/flock --exclusive --nonblock /run/azure-routes.lock /bin/bash /opt/libexec/openshift-azure-routes.sh start
1212
User=root
1313
SyslogIdentifier=openshift-azure-routes
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: openshift-azure-routes.timer
2+
enabled: true
3+
contents: |
4+
[Unit]
5+
Description=Periodic reconciliation of Azure VIP routes
6+
7+
[Timer]
8+
OnBootSec=30
9+
OnUnitActiveSec=30
10+
11+
[Install]
12+
WantedBy=timers.target

0 commit comments

Comments
 (0)