Skip to content

Conversation

@ricky-rav
Copy link
Contributor

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.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 28, 2025
@openshift-ci-robot
Copy link
Contributor

@ricky-rav: This pull request references Jira Issue OCPBUGS-61487, which is invalid:

  • expected the bug to target the "4.21.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

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.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Nov 28, 2025
@openshift-ci openshift-ci bot requested a review from djoshy November 28, 2025 18:12
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 28, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ricky-rav
Once this PR has been reviewed and has the lgtm label, please assign djoshy for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ricky-rav
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Nov 28, 2025
@openshift-ci-robot
Copy link
Contributor

@ricky-rav: This pull request references Jira Issue OCPBUGS-61487, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@ricky-rav
Copy link
Contributor Author

/retest

1 similar comment
@ricky-rav
Copy link
Contributor Author

/retest

@ricky-rav
Copy link
Contributor Author

/retest
/test pull-ci-openshift-machine-config-operator-main-e2e-azure-ovn-upgrade

@ricky-rav
Copy link
Contributor Author

/test e2e-azure-ovn-upgrade

@ricky-rav
Copy link
Contributor Author

/hold
This generates logs in the journal every 30 seconds. I'll see how to limit the logging.

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.

Reduce logging so that we do not log when there are not routes to add.
This prevents the journal from getting clogged, since the service is now
triggered every 30 seconds.

Signed-off-by: Riccardo Ravaioli <[email protected]>
@ricky-rav
Copy link
Contributor Author

/test e2e-azure-ovn-upgrade

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 5, 2025

@ricky-rav: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/bootstrap-unit 878f96a link false /test bootstrap-unit

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@ricky-rav
Copy link
Contributor Author

ricky-rav commented Dec 5, 2025

This generates logs in the journal every 30 seconds. I'll see how to limit the logging.

I reduced the logs to a bare minimum, but systemd still logs to the journal every time the service is triggered:

sh-5.1# journalctl -u openshift-azure-routes
Dec 05 07:09:05 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: Started Work around Azure load balancer hairpin.
Dec 05 07:09:05 ci-ln-q64r0qb-1d09d-srt7k-master-0 openshift-azure-routes[2668]: time="2025-12-05T07:09:05Z" level=fatal msg="validate service connection: validate CRI v1 runtime API for endpoint \"unix:///var/run/crio/crio.sock\": rpc error: code = Unavailable desc = con>
Dec 05 07:09:05 ci-ln-q64r0qb-1d09d-srt7k-master-0 openshift-azure-routes[2681]: time="2025-12-05T07:09:05Z" level=fatal msg="validate service connection: validate CRI v1 runtime API for endpoint \"unix:///var/run/crio/crio.sock\": rpc error: code = Unavailable desc = con>
Dec 05 07:09:05 ci-ln-q64r0qb-1d09d-srt7k-master-0 openshift-azure-routes[2660]: OVN-Kubernetes is not running; no routes to add.
Dec 05 07:09:05 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: openshift-azure-routes.service: Deactivated successfully.
Dec 05 07:09:12 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: Started Work around Azure load balancer hairpin.
Dec 05 07:09:12 ci-ln-q64r0qb-1d09d-srt7k-master-0 openshift-azure-routes[2879]: OVN-Kubernetes is not running; no routes to add.
Dec 05 07:09:12 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: openshift-azure-routes.service: Deactivated successfully.
Dec 05 07:09:26 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: Started Work around Azure load balancer hairpin.
Dec 05 07:09:26 ci-ln-q64r0qb-1d09d-srt7k-master-0 openshift-azure-routes[2991]: OVN-Kubernetes is not running; no routes to add.
Dec 05 07:09:26 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: openshift-azure-routes.service: Deactivated successfully.
Dec 05 07:09:59 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: Started Work around Azure load balancer hairpin.
Dec 05 07:10:00 ci-ln-q64r0qb-1d09d-srt7k-master-0 openshift-azure-routes[3137]: OVN-Kubernetes is not running; no routes to add.
Dec 05 07:10:00 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: openshift-azure-routes.service: Deactivated successfully.
Dec 05 07:10:30 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: Started Work around Azure load balancer hairpin.
Dec 05 07:10:30 ci-ln-q64r0qb-1d09d-srt7k-master-0 openshift-azure-routes[3218]: OVN-Kubernetes is not running; no routes to add.
Dec 05 07:10:30 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: openshift-azure-routes.service: Deactivated successfully.
Dec 05 07:11:00 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: Started Work around Azure load balancer hairpin.
Dec 05 07:11:00 ci-ln-q64r0qb-1d09d-srt7k-master-0 openshift-azure-routes[3355]: OVN-Kubernetes is not running; no routes to add.
Dec 05 07:11:00 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: openshift-azure-routes.service: Deactivated successfully.
Dec 05 07:11:32 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: Started Work around Azure load balancer hairpin.
Dec 05 07:11:32 ci-ln-q64r0qb-1d09d-srt7k-master-0 openshift-azure-routes[3954]: OVN-Kubernetes is not running; no routes to add.
[...]
Dec 05 07:16:59 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: Started Work around Azure load balancer hairpin.
Dec 05 07:17:00 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: openshift-azure-routes.service: Deactivated successfully.
Dec 05 07:17:37 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: Started Work around Azure load balancer hairpin.
Dec 05 07:17:37 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: openshift-azure-routes.service: Deactivated successfully.
Dec 05 07:18:04 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: Started Work around Azure load balancer hairpin.
Dec 05 07:18:05 ci-ln-q64r0qb-1d09d-srt7k-master-0 openshift-azure-routes[11988]: adding route: ovn-nbctl lr-policy-add ovn_cluster_router 1010 inport == rtos-ci-ln-q64r0qb-1d09d-srt7k-master-0 && ip4.dst == 10.0.0.100 reroute 10.130.0.2
Dec 05 07:18:05 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: openshift-azure-routes.service: Deactivated successfully.
Dec 05 07:18:48 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: Started Work around Azure load balancer hairpin.
Dec 05 07:18:48 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: openshift-azure-routes.service: Deactivated successfully.
[...]
Dec 05 07:31:38 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: Started Work around Azure load balancer hairpin.
Dec 05 07:31:38 ci-ln-q64r0qb-1d09d-srt7k-master-0 openshift-azure-routes[25688]: removing stale route: ovn-nbctl lr-policy-del ovn_cluster_router 1010 inport == rtos-ci-ln-q64r0qb-1d09d-srt7k-master-0 && ip4.dst == 10.0.0.100
Dec 05 07:31:39 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: openshift-azure-routes.service: Deactivated successfully.
Dec 05 07:32:18 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: Started Work around Azure load balancer hairpin.
Dec 05 07:32:18 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: openshift-azure-routes.service: Deactivated successfully.
Dec 05 07:32:48 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: Started Work around Azure load balancer hairpin.
Dec 05 07:32:49 ci-ln-q64r0qb-1d09d-srt7k-master-0 openshift-azure-routes[26512]: adding route: ovn-nbctl lr-policy-add ovn_cluster_router 1010 inport == rtos-ci-ln-q64r0qb-1d09d-srt7k-master-0 && ip4.dst == 10.0.0.100 reroute 10.130.0.2
Dec 05 07:32:49 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: openshift-azure-routes.service: Deactivated successfully.
Dec 05 07:33:59 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: Started Work around Azure load balancer hairpin.
Dec 05 07:34:00 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: openshift-azure-routes.service: Deactivated successfully.
Dec 05 07:34:37 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: Started Work around Azure load balancer hairpin.
Dec 05 07:34:37 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: openshift-azure-routes.service: Deactivated successfully.
Dec 05 07:35:08 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: Started Work around Azure load balancer hairpin.
Dec 05 07:35:08 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: openshift-azure-routes.service: Deactivated successfully.
Dec 05 07:35:40 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: Started Work around Azure load balancer hairpin.
Dec 05 07:35:40 ci-ln-q64r0qb-1d09d-srt7k-master-0 systemd[1]: openshift-azure-routes.service: Deactivated successfully.

I'm still wondering what a better solution might be...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants