Skip to content
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

NO-JIRA: delete all active jobs during restart #920

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

tremes
Copy link
Contributor

@tremes tremes commented Mar 15, 2024

This is adding logic (in techpreview) that after start removes all the active Jobs with periodic-gathering- prefix (I think it's not very nice to kill job spawned by user). This is to prevent potential race condition for the future remote configuration (rapid recommendations) based on the OCP version. What can theoretically happen is the following:

  • operator creates a job with OCP version 1.2.3 (so the remote configuration is in version 1.2.3 too)
  • CVO updates the operator to OCP version 1.2.4 (which leads to re-redeployment), but the job still uses the older OCP version

Categories

  • Bugfix
  • Data Enhancement
  • Feature
  • Backporting
  • Others (CI, Infrastructure, Documentation)

Sample Archive

Documentation

Unit Tests

Privacy

Yes. There are no sensitive data in the newly collected information.

Changelog

Breaking Changes

No

References

https://issues.redhat.com/browse/???
https://access.redhat.com/solutions/???

@openshift-ci openshift-ci bot requested review from ncaak and rluders March 15, 2024 08:05
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 15, 2024
@@ -124,6 +124,10 @@ func (j *JobController) WaitForJobCompletion(ctx context.Context, jobName string
return fmt.Errorf("watcher channel was closed unexpectedly")
}

if event.Type == watch.Deleted {
return nil
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also pretty import, because one can delete the job and in that case it would end up in infinite loop (never ending watch)

@ncaak
Copy link
Contributor

ncaak commented Mar 15, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 15, 2024
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 15, 2024
@ncaak
Copy link
Contributor

ncaak commented Mar 15, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 15, 2024
@tremes
Copy link
Contributor Author

tremes commented Mar 18, 2024

/test e2e-gcp-ovn-techpreview

2 similar comments
@tremes
Copy link
Contributor Author

tremes commented Mar 19, 2024

/test e2e-gcp-ovn-techpreview

@tremes
Copy link
Contributor Author

tremes commented Mar 20, 2024

/test e2e-gcp-ovn-techpreview

@tremes tremes changed the title delete all active jobs during restart NO-JIRA: delete all active jobs during restart Mar 21, 2024
@openshift-ci-robot
Copy link
Contributor

@tremes: This pull request explicitly references no jira issue.

In response to this:

This is adding logic (in techpreview) that after start removes all the active Jobs with periodic-gathering- prefix (I think it's not very nice to kill job spawned by user). This is to prevent potential race condition for the future remote configuration (rapid recommendations) based on the OCP version. What can theoretically happen is the following:

  • operator creates a job with OCP version 1.2.3 (so the remote configuration is in version 1.2.3 too)
  • CVO updates the operator to OCP version 1.2.4 (which leads to re-redeployment), but the job still uses the older OCP version

Categories

  • Bugfix
  • Data Enhancement
  • Feature
  • Backporting
  • Others (CI, Infrastructure, Documentation)

Sample Archive

Documentation

Unit Tests

Privacy

Yes. There are no sensitive data in the newly collected information.

Changelog

Breaking Changes

No

References

https://issues.redhat.com/browse/???
https://access.redhat.com/solutions/???

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/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 21, 2024
@tremes
Copy link
Contributor Author

tremes commented Mar 21, 2024

/test e2e-gcp-ovn-techpreview

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 25, 2024
Copy link
Contributor

@ncaak ncaak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 25, 2024
Copy link

openshift-ci bot commented Mar 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ncaak, tremes

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

@ncaak
Copy link
Contributor

ncaak commented Mar 25, 2024

/retest

@JoaoFula
Copy link
Contributor

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Mar 26, 2024
@tremes
Copy link
Contributor Author

tremes commented Mar 26, 2024

/test e2e-gcp-ovn-techpreview

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 636bb48 and 2 for PR HEAD 47e3361 in total

Copy link

openshift-ci bot commented Mar 26, 2024

@tremes: all tests passed!

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/test-infra repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 2bb7e46 into openshift:master Mar 26, 2024
9 checks passed
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-insights-operator-container-v4.16.0-202403261317.p0.g2bb7e46.assembly.stream.el9 for distgit ose-insights-operator.
All builds following this will include this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants