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

OCPBUGS-19440: [release-4.14]: SriovNetwork, SriovIBNetwork, react on namespace creation #830

Merged
merged 2 commits into from
Nov 2, 2023

Conversation

zeeke
Copy link
Contributor

@zeeke zeeke commented Sep 20, 2023

If a user creates an SriovNetwork with a network namespace
that doesn't exist, retrying reconciling with an exponential
backoff is not efficient, as the routing will fail until the namespace
is created.

This patch makes the controller watch Namespace resource
creation and reconcile the related SriovNetworks if needed.

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
Apply the same namespace reaction as the SriovNetwork

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
@zeeke
Copy link
Contributor Author

zeeke commented Sep 20, 2023

/jira cherrypick OCPBUGS-8266

@openshift-ci-robot
Copy link
Contributor

@zeeke: Jira Issue OCPBUGS-8266 has been cloned as Jira Issue OCPBUGS-19440. Will retitle bug to link to clone.
/retitle OCPBUGS-19440: [release-4.14]: SriovNetwork, SriovIBNetwork, react on namespace creation

In response to this:

/jira cherrypick OCPBUGS-8266

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.

@openshift-ci openshift-ci bot changed the title [release-4.14]: SriovNetwork, SriovIBNetwork, react on namespace creation OCPBUGS-19440: [release-4.14]: SriovNetwork, SriovIBNetwork, react on namespace creation Sep 20, 2023
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Sep 20, 2023
@openshift-ci-robot
Copy link
Contributor

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

6 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • dependent bug Jira Issue OCPBUGS-8266 is in the state MODIFIED, which is one of the valid states (MODIFIED, ON_QA, VERIFIED)
  • dependent Jira Issue OCPBUGS-8266 targets the "4.15.0" version, which is one of the valid target versions: 4.15.0
  • bug has dependents

Requesting review from QA contact:
/cc @zhaozhanqi

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

In response to this:

Backport of:

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 20, 2023

@zeeke: 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/e2e-openstack-nfv 0f2e783 link false /test e2e-openstack-nfv
ci/prow/e2e-openstack-nfv-hwoffload 0f2e783 link false /test e2e-openstack-nfv-hwoffload

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.

@zeeke
Copy link
Contributor Author

zeeke commented Sep 26, 2023

@bn222 , @SchSeba Please take a look

@@ -173,8 +182,31 @@ func (r *SriovNetworkReconciler) Reconcile(ctx context.Context, req ctrl.Request

// SetupWithManager sets up the controller with the Manager.
func (r *SriovNetworkReconciler) SetupWithManager(mgr ctrl.Manager) error {
// Reconcile when the target namespace is created after the SriovNetwork object.
Copy link
Contributor

Choose a reason for hiding this comment

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

please also CC me next time on the upstream discussion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fine. Do you mean for every change in the operator? Or for controllers one?
Most of the discussions are held in upstream meetings on Monday and Tuesday

Copy link
Contributor

Choose a reason for hiding this comment

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

Every change

Name: network.Name,
}})
}
},
Copy link
Contributor

Choose a reason for hiding this comment

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

I would have been nicer if this wasn't defined inline.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess I can propose a refactor upstream

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wizhaoredhat
Copy link
Contributor

/approved

@bn222
Copy link
Contributor

bn222 commented Sep 28, 2023

/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 28, 2023
@zeeke
Copy link
Contributor Author

zeeke commented Oct 4, 2023

@SchSeba please take a look. We need backport-risk-assessed
@zhaozhanqi we also need cherry-pick-approved

@zhaozhanqi
Copy link

also cc @bn222 @wizhaoredhat for backport-risk-assessed
I will add cherry-pick-approved

@wizhaoredhat
Copy link
Contributor

/label backport-risk-assessed

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Nov 2, 2023
@wizhaoredhat
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 2, 2023
Copy link
Contributor

openshift-ci bot commented Nov 2, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bn222, wizhaoredhat, zeeke

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

@zhaozhanqi
Copy link

/label cherry-pick-approved

@openshift-ci openshift-ci bot added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Nov 2, 2023
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD aad6c5b and 2 for PR HEAD 0f2e783 in total

@openshift-ci openshift-ci bot merged commit 514df18 into openshift:release-4.14 Nov 2, 2023
9 of 11 checks passed
@openshift-ci-robot
Copy link
Contributor

@zeeke: Jira Issue OCPBUGS-19440: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-19440 has been moved to the MODIFIED state.

In response to this:

Backport of:

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.

@zeeke
Copy link
Contributor Author

zeeke commented Nov 2, 2023

/cherrypick release-4.13

@openshift-cherrypick-robot

@zeeke: #830 failed to apply on top of branch "release-4.13":

Applying: SriovNetwork: react on namespace creation
Using index info to reconstruct a base tree...
M	controllers/sriovnetwork_controller.go
M	controllers/sriovnetwork_controller_test.go
M	controllers/suite_test.go
M	main.go
Falling back to patching base and 3-way merge...
Auto-merging main.go
Auto-merging controllers/suite_test.go
Auto-merging controllers/sriovnetwork_controller_test.go
Auto-merging controllers/sriovnetwork_controller.go
CONFLICT (content): Merge conflict in controllers/sriovnetwork_controller.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 SriovNetwork: react on namespace creation
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-4.13

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.

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. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. 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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet