OCPBUGS-90083: Fix NodePool reconciliation failure when updating mirrored immutable ConfigMaps#8811
Conversation
Mirrored ConfigMaps created by the NodePool NTO reconciler were set with immutable=true, which prevented Kubernetes from accepting in-place updates when the source ConfigMap data changed. This caused NodePools sharing the same kubelet ConfigMap to get stuck in UpdatingConfig=True with "field is immutable" errors. Remove the immutable flag from mutateMirroredConfig and add a migration helper that uses DeleteIfNeededWithPredicate to safely delete existing immutable mirrored ConfigMaps before CreateOrUpdate recreates them as mutable. The predicate guards deletion to only ConfigMaps with the nto-mirrored-config label belonging to the current NodePool. Signed-off-by: Vimal Solanki <vsolanki@redhat.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@vsolanki12: This pull request references Jira Issue OCPBUGS-85778, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release-4.22 #8811 +/- ##
================================================
+ Coverage 35.45% 35.46% +0.01%
================================================
Files 767 767
Lines 93724 93740 +16
================================================
+ Hits 33226 33246 +20
+ Misses 57785 57782 -3
+ Partials 2713 2712 -1
🚀 New features to boost your workflow:
|
|
@vsolanki12: This pull request references Jira Issue OCPBUGS-90083, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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. |
|
/jira refresh |
|
@vsolanki12: This pull request references Jira Issue OCPBUGS-90083, which is invalid:
Comment DetailsIn response to this:
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. |
|
/jira refresh |
|
@vsolanki12: This pull request references Jira Issue OCPBUGS-90083, which is invalid:
Comment DetailsIn response to this:
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. |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jparrill, vsolanki12 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/jira refresh |
|
@vsolanki12: This pull request references Jira Issue OCPBUGS-90083, which is valid. 7 validation(s) were run on this bug
DetailsIn response to this:
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. |
|
/lgtm |
|
/retest |
|
/test e2e-aks |
|
/test e2e-aks-4-21 |
Manual Verification on Live ClusterTested the immutable mirrored ConfigMap fix on a live AWS based HostedCluster. Setup:
Test: Marked the guest-side mirrored ConfigMap as immutable, then updated the source KubeletConfig data to trigger a reconcile: KUBECONFIG=/tmp/ocpbugs-90083-kubeconfig oc replace -f /tmp/cm-immutable.json Result: HCCO detected the immutable ConfigMap, deleted it, and recreated it as mutable with the updated data: Guest-side ConfigMap confirmed mutable with updated content (maxPods: 300 → maxPods: 500). Fix working as expected on release-4.22. |
|
/verified by @vsolanki12 |
|
@vsolanki12: This PR has been marked as verified by DetailsIn response to this:
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. |
|
/retest |
|
@vsolanki12: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
13ae391
into
openshift:release-4.22
|
@vsolanki12: Jira Issue Verification Checks: Jira Issue OCPBUGS-90083 Jira Issue OCPBUGS-90083 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 DetailsIn response to this:
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. |
Backport of #8543 to release-4.22.
Adapted cherry-pick to use
supportutil.DeleteIfNeededWithPredicateandsupportutil.ShortenNameinstead ofk8sutil/netutilwhich don't exist on the release branch (they were extracted fromsupport/utilin a later refactor on main).