|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * scalability_and_performance/ztp_far_edge/ztp-talm-updating-managed-policies.adoc |
| 4 | + |
| 5 | +:_content-type: PROCEDURE |
| 6 | +[id="cnf-topology-aware-lifecycle-manager-operator-troubleshooting_{context}"] |
| 7 | += Troubleshooting missed Operator updates due to out-of-date policy compliance states |
| 8 | + |
| 9 | +In some scenarios, {cgu-operator-first} might miss Operator updates due to an out-of-date policy compliance state. |
| 10 | + |
| 11 | +After a catalog source update, it takes time for the Operator Lifecycle Manager (OLM) to update the subscription status. The status of the subscription policy might continue to show as compliant while {cgu-operator} decides whether remediation is needed. As a result, the Operator specified in the subscription policy does not get upgraded. |
| 12 | + |
| 13 | +To avoid this scenario, add another catalog source configuration to the `PolicyGenTemplate` and specify this configuration in the subscription for any Operators that require an update. |
| 14 | + |
| 15 | +.Procedure |
| 16 | + |
| 17 | +. Add a catalog source configuration in the `PolicyGenTemplate` resource: |
| 18 | ++ |
| 19 | +[source,yaml] |
| 20 | +---- |
| 21 | +- fileName: DefaultCatsrc.yaml |
| 22 | + remediationAction: inform |
| 23 | + policyName: "operator-catsrc-policy" |
| 24 | + metadata: |
| 25 | + name: redhat-operators |
| 26 | + spec: |
| 27 | + displayName: Red Hat Operators Catalog |
| 28 | + image: registry.example.com:5000/olm/redhat-operators:v{product-version} |
| 29 | + updateStrategy: |
| 30 | + registryPoll: |
| 31 | + interval: 1h |
| 32 | + status: |
| 33 | + connectionState: |
| 34 | + lastObservedState: READY |
| 35 | +- fileName: DefaultCatsrc.yaml |
| 36 | + remediationAction: inform |
| 37 | + policyName: "operator-catsrc-policy" |
| 38 | + metadata: |
| 39 | + name: redhat-operators-v2 <1> |
| 40 | + spec: |
| 41 | + displayName: Red Hat Operators Catalog v2 <2> |
| 42 | + image: registry.example.com:5000/olredhat-operators:<version> <3> |
| 43 | + updateStrategy: |
| 44 | + registryPoll: |
| 45 | + interval: 1h |
| 46 | + status: |
| 47 | + connectionState: |
| 48 | + lastObservedState: READY |
| 49 | +---- |
| 50 | +<1> Update the name for the new configuration. |
| 51 | +<2> Update the display name for the new configuration. |
| 52 | +<3> Update the index image URL. This `fileName.spec.image` field overrides any configuration in the `DefaultCatsrc.yaml` file. |
| 53 | +
|
| 54 | +. Update the `Subscription` resource to point to the new configuration for Operators that require an update: |
| 55 | ++ |
| 56 | +[source,yaml] |
| 57 | +---- |
| 58 | +apiVersion: operators.coreos.com/v1alpha1 |
| 59 | +kind: Subscription |
| 60 | +metadata: |
| 61 | + name: operator-subscription |
| 62 | + namespace: operator-namspace |
| 63 | +# ... |
| 64 | +spec: |
| 65 | + source: redhat-operators-v2 <1> |
| 66 | +# ... |
| 67 | +---- |
| 68 | +<1> Enter the name of the additional catalog source configuration that you defined in the `PolicyGenTemplate` resource. |
0 commit comments