Bug 2057566
| Summary: | Changes made in tuned config creates additional entry instead of overriding existing config because of musthave compliance type | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | yliu1 |
| Component: | Telco Edge | Assignee: | Nahian <npathan> |
| Telco Edge sub component: | ZTP | QA Contact: | yliu1 |
| Status: | CLOSED WONTFIX | Docs Contact: | |
| Severity: | low | ||
| Priority: | unspecified | CC: | imiller, jramsay, keyoung, npathan |
| Version: | 4.9 | Flags: | npathan:
needinfo+
npathan: needinfo+ |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Release Note | |
| Doc Text: |
When updating content contained in lists within CRs managed by Policy, such as the Tuned configuration included in the source CR TunedPerformancePatch.yaml, the updated values will create a new list entry rather than overwriting the existing list entry. If the intent is to update the existing list entry rather than creating an additional list entry the complianceType for that CR must be set to 'mustonlyhave' instead of the default 'musthave'.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2024-04-30 18:04:53 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Same issue observed with ptp config update. @npathan can you update the examples for all applicable configs? Why not just changing the examples instead of adding a issue readme? The readme is a bit confusing to users, also this issue also happens with ptp config. @yliu1 agreed the docs are confusing. Instead of updating though, I'll delete the doc once this (https://bugzilla.redhat.com/show_bug.cgi?id=2117728) fix is available from ACM. It should be in ACM 2.5.2 (merged upstream now waiting for downstream) Just to summarize the problem and expected fix(since it's been a while): We need to keep `musthave` and not `mustonlyhave` because of `mustonlyhave`'s all-encompassing power of overriding everything which cause issues like infinite loops when other operators try to change even the smallest thing (destroying and recreating CRs). But `musthave` currently appends to a list instead of updating/replacing the content of an array entry (reason for this ticket). With fix from ACM, users can now update the object in an array as long they have the key `name` and same value. ACM 2.6 is now in OperatorHub Hi Nahian, could you please provide an example ptp or tuned config using PGT? Hi Yang, example wise I would say maybe try change you made in `tuned` (from the description). So maybe changing `cmdline_crash=nohz_full=4-7` to `cmdline_crash=nohz_full=4-9` in PGT and see if you're getting the expected behaviour? Basically as long as you have the latest ACM (2.6.0 in this case) and keep everything else the same (i.e no extra CRs to install or configs to change)...you shouldn't see any more appending. Verified ACM 2.6.2 handles this properly. OCP is no longer using Bugzilla and this bug appears to have been left in an orphaned state. If the bug is still relevant, please open a new issue in the OCPBUGS Jira project: https://issues.redhat.com/projects/OCPBUGS/summary |
Description of problem: Since we now have musthave a default policy complianceType, any changes made in tuned config will result in additionally data entry that is in conflict with existing config. There are probably other configs having similar issue. Version-Release number of selected component (if applicable): 4.9 (Likely in 4.10 as well) How reproducible: Always Steps to Reproduce: 1. Deploy a cluster viz ZTP 2. Update tuned config 3. Observe changes on spoke Actual results: - Additional entry added to tuned profile on spoke like below [kni@provisionhost-0-0 ~]$ oc get tuned -n openshift-cluster-node-tuning-operator performance-patch -o yaml .... spec: profile: - data: | [main] summary=Configuration changes profile inherited from performance created tuned include=openshift-node-performance-openshift-node-performance-profile [bootloader] cmdline_crash=nohz_full=4-7 [sysctl] kernel.timer_migration=1 [service] service.stalld=start,enable name: performance-patch - data: | [main] summary=Configuration changes profile inherited from performance created tuned include=openshift-node-performance-openshift-node-performance-profile [bootloader] cmdline_crash=nohz_full=4-15 [sysctl] kernel.timer_migration=1 [service] service.stalld=start,enable name: performance-patch recommend: - machineConfigLabels: machineconfiguration.openshift.io/role: master priority: 19 profile: performance-patch Expected results: tuned config change should override the existing config. Additional info: Workaround is to set complianceType to mustonlyhave in PGT. - fileName: TunedPerformancePatch.yaml complianceType: mustonlyhave