Skip to content

Modify startup scripts for ovn-controller-ovs #434

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

averdagu
Copy link
Contributor

@averdagu averdagu commented Apr 24, 2025

Modify startup scripts for ovn-controller-ovs

In order to minimize the downtime during update of the
ovn-controller-ovs pods we're modifying the update strategy so
it doesn't accept any Unavailable pod. This means that it will
create new ovn-controller-ovs while the old one is running.

This commit enables that two ovn-controller-ovs pods can coexists.
It accomplish this by modifying the start-up scripts of all containers
so it checks if a pod is already running and slowly stops in a
controlled fashon the old pods while it starts the new ones.

The logic is done with a temporary file created during the init
container that will inform the ovsdb-server/ovs-vswitchd containers
if they're on an update scenario or a normal one. The temporary file
is deleted after the end of the ovs-vswitchd so when the ovnController
CR is deleted, the volumes won't have any leftovers.

Related: OSPRH-11636
Jira: OSPRH-10821
Depends-on: lib-common#611

This is an alternative to #423

TODO:

  • Kuttl test
  • Logic to change gateway chassis priority

Copy link
Contributor

openshift-ci bot commented Apr 24, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link
Contributor

openshift-ci bot commented Apr 24, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: averdagu

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

The pull request process is described 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

@averdagu
Copy link
Contributor Author

/test all

@averdagu averdagu force-pushed the ovs-restart-v2 branch 4 times, most recently from 483f6d7 to 5416cdf Compare April 25, 2025 13:35
@averdagu averdagu changed the title [wip] Modify startup scripts for ovn-controller-ovs Modify startup scripts for ovn-controller-ovs Apr 25, 2025
@averdagu averdagu marked this pull request as ready for review April 25, 2025 15:13
@openshift-ci openshift-ci bot requested review from lewisdenny and viroel April 25, 2025 15:14
@averdagu
Copy link
Contributor Author

/retest

1 similar comment
@averdagu
Copy link
Contributor Author

/retest

@averdagu
Copy link
Contributor Author

/test ovn-operator-build-deploy-kuttl

Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/d1d2c94318b74902b71c12dc025064ab

openstack-k8s-operators-content-provider FAILURE in 10m 00s
⚠️ ovn-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

In order to minimize the downtime during update of the
ovn-controller-ovs pods we're modifying the update strategy so
it doesn't accept any Unavailable pod. This means that it will
create new ovn-controller-ovs while the old one is running.

This commit enables that two ovn-controller-ovs pods can coexists.
It accomplish this by modifying the start-up scripts of all containers
so it checks if a pod is already running and slowly stops in a
controlled fashon the old pods while it starts the new ones.

The logic is done with a temporary file created during the init
container that will inform the ovsdb-server/ovs-vswitchd containers
if they're on an update scenario or a normal one. The temporary file
is deleted after the end of the ovs-vswitchd so when the ovnController
CR is deleted, the volumes won't have any leftovers.

Related: OSPRH-11636
Jira: OSPRH-10821
Depends-on: lib-common#611
@openshift-cherrypick-robot

@elvgarrui: only openstack-k8s-operators org members may request cherry picks. If you are already part of the org, make sure to change your membership to public. Otherwise you can still do the cherry-pick manually.

In response to this:

/cherry-pick 18.0-fr2

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.

Copy link
Contributor

openshift-ci bot commented Jul 18, 2025

@averdagu: The following tests 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/functional ebd0417 link true /test functional
ci/prow/precommit-check ebd0417 link true /test precommit-check
ci/prow/ovn-operator-build-deploy-kuttl ebd0417 link true /test ovn-operator-build-deploy-kuttl

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.

@openshift-merge-robot
Copy link
Collaborator

PR needs rebase.

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.

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

Successfully merging this pull request may close these issues.

3 participants