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

[ACM-16335] Reconcile MCO only when there is actual change in mch image manifest #1719

Merged
merged 4 commits into from
Dec 17, 2024

Conversation

coleenquadros
Copy link
Contributor

@coleenquadros coleenquadros commented Dec 11, 2024

MCO and Placement Controller react to creates/updates/deletes from MCH CR . But we only specifically care about the mch-image-manifest configmap changes. So if we continuously get mch updates, the current reconcile logic always returns true after reading the image configmap even if it didnt differ from the previous version.

The update to mch image configmap has to reflect on all spokes and in scale environment this is going to be a very expensive operation and if we dont check if an actual update is needed, then this is going to noisy in terms of logs and also unnecessary API calls

@coleenquadros coleenquadros changed the title Reconcile MCO only when there is actual change in mch image manifest [ACM-16335] Reconcile MCO only when there is actual change in mch image manifest Dec 11, 2024
@jacobbaungard
Copy link
Contributor

This generally makes sense to me. The only thing I wondered, was that I've seen past cases were we didn't reconcile/progress with MCO due to MCH being in a non-ok state, and I just wondered if this change might impact that logic.

Looking at the code, I don't see that this PR changes any such behavior though, so maybe this is done elsewhere?

Copy link
Contributor

@thibaultmg thibaultmg left a comment

Choose a reason for hiding this comment

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

Why don't we use a predicate on the configmap directly instead and remove the Update part of the MCH predicate?

@coleenquadros
Copy link
Contributor Author

Why don't we use a predicate on the configmap directly instead and remove the Update part of the MCH predicate?

I am not aware of the complete dependency on MCH with MCO. Previously we reacted to changes on MCH CR and then just read the mch image manifest configmap and returned true and now I have blocked the reconcile from happening unless image manifest spec changed. @subbarao-meduri are you aware of any other fields or resources on the MCH that we might have to reconcile on?

Copy link

sonarcloud bot commented Dec 16, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
11.8% Coverage on New Code (required ≥ 70%)

See analysis details on SonarQube Cloud

Copy link

openshift-ci bot commented Dec 16, 2024

@coleenquadros: 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/sonarcloud 32f0334 link false /test sonarcloud

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.

Copy link
Collaborator

@subbarao-meduri subbarao-meduri left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link

openshift-ci bot commented Dec 17, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: coleenquadros, subbarao-meduri

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:
  • OWNERS [coleenquadros,subbarao-meduri]

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

@coleenquadros
Copy link
Contributor Author

/cherrypick release-2.12

@openshift-cherrypick-robot
Copy link
Collaborator

@coleenquadros: once the present PR merges, I will cherry-pick it on top of release-2.12 in a new PR and assign it to you.

In response to this:

/cherrypick release-2.12

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.

@coleenquadros
Copy link
Contributor Author

/cherrypick release-2.12

@openshift-cherrypick-robot
Copy link
Collaborator

@coleenquadros: once the present PR merges, I will cherry-pick it on top of release-2.12 in a new PR and assign it to you.

In response to this:

/cherrypick release-2.12

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.

@coleenquadros
Copy link
Contributor Author

/cherrypick release-2.11

@openshift-cherrypick-robot
Copy link
Collaborator

@coleenquadros: once the present PR merges, I will cherry-pick it on top of release-2.11 in a new PR and assign it to you.

In response to this:

/cherrypick release-2.11

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.

@coleenquadros coleenquadros merged commit a3b803d into stolostron:main Dec 17, 2024
15 of 18 checks passed
@openshift-cherrypick-robot
Copy link
Collaborator

@coleenquadros: new pull request created: #1728

In response to this:

/cherrypick release-2.12

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.

@openshift-cherrypick-robot
Copy link
Collaborator

@coleenquadros: #1719 failed to apply on top of branch "release-2.11":

Applying: reconcile MCO only when there is actual chnage in mch image manifest
Using index info to reconstruct a base tree...
M	operators/multiclusterobservability/controllers/multiclusterobservability/predicate_func.go
M	operators/multiclusterobservability/pkg/config/config.go
M	operators/multiclusterobservability/pkg/config/config_test.go
Falling back to patching base and 3-way merge...
Auto-merging operators/multiclusterobservability/pkg/config/config_test.go
Auto-merging operators/multiclusterobservability/pkg/config/config.go
CONFLICT (content): Merge conflict in operators/multiclusterobservability/pkg/config/config.go
Auto-merging operators/multiclusterobservability/controllers/multiclusterobservability/predicate_func.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 reconcile MCO only when there is actual chnage in mch image manifest

In response to this:

/cherrypick release-2.11

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.

@coleenquadros
Copy link
Contributor Author

/cherrypick release-2.10

@openshift-cherrypick-robot
Copy link
Collaborator

@coleenquadros: #1719 failed to apply on top of branch "release-2.10":

Applying: reconcile MCO only when there is actual chnage in mch image manifest
Using index info to reconstruct a base tree...
M	operators/multiclusterobservability/controllers/multiclusterobservability/predicate_func.go
M	operators/multiclusterobservability/controllers/placementrule/placementrule_controller_test.go
M	operators/multiclusterobservability/pkg/config/config.go
M	operators/multiclusterobservability/pkg/config/config_test.go
Falling back to patching base and 3-way merge...
Auto-merging operators/multiclusterobservability/pkg/config/config_test.go
Auto-merging operators/multiclusterobservability/pkg/config/config.go
CONFLICT (content): Merge conflict in operators/multiclusterobservability/pkg/config/config.go
Auto-merging operators/multiclusterobservability/controllers/placementrule/placementrule_controller_test.go
Auto-merging operators/multiclusterobservability/controllers/multiclusterobservability/predicate_func.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 reconcile MCO only when there is actual chnage in mch image manifest

In response to this:

/cherrypick release-2.10

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.

5 participants