Bug 2094413 - Excessive Policy Name Length Will Prevent Child Policy Creation
Summary: Excessive Policy Name Length Will Prevent Child Policy Creation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Telco Edge
Version: 4.10
Hardware: All
OS: All
high
high
Target Milestone: ---
: 4.10.z
Assignee: jun
QA Contact: yliu1
URL:
Whiteboard:
Depends On: 2057209
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-07 14:23 UTC by jun
Modified: 2022-07-25 07:07 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2057209
Environment:
Last Closed: 2022-07-25 07:07:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift-kni cluster-group-upgrades-operator pull 210 0 None open Bug 2094413: Random suffix for TALO created object names 2022-06-09 14:29:27 UTC
Red Hat Product Errata RHBA-2022:5665 0 None None None 2022-07-25 07:07:09 UTC

Description jun 2022-06-07 14:23:24 UTC
+++ This bug was initially created as a clone of Bug #2057209 +++

Description of problem:

Kubernetes limits object names to 63 characters. If a policy name defined in a PolicyGenTemplate approaches this limit the Topology Aware Life-cycle Operator (TALO)cannot create child policies. When this occurs, the parent policy will remain in a "NonCompliant" state.

Version-Release number of selected component (if applicable):
4.10

How reproducible:


100%

Steps to Reproduce:
1. Install OCP with TALO and GitOps operators
2. Create a PolicyGenTemplate with a policy name and cluster name near the 63 character limit
3. Install a cluster via ZTP using GitOps and TALO
4. Verify that the parent policy remains in NonCompliant state and child policy is never created.

Actual results:

Child policy is not created.

Expected results:

TALO created child policy which eventually goes into "Compliant" state.

Additional info:

Kubernetes character limit documented here: https://access.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes/2.3/html/governance/governance

--- Additional comment from  on 2022-04-20 14:40:19 UTC ---

https://github.com/openshift-kni/cluster-group-upgrades-operator/pull/145

Comment 7 yliu1 2022-07-19 17:54:51 UTC
Verified with latest 4.10 TALM build. When the composed policy name exceeds 64 chars, the name will be cut as designed.

$ oc get policies -A
NAMESPACE    NAME                                                              REMEDIATION ACTION   COMPLIANCE STATE   AGE
default      test-cgu-longlonglonglonglonglonglonglonglonglong-w6r4r           enforce              NonCompliant       20s
worker-2     default.test-cgu-longlonglonglonglonglonglonglonglonglong-w6r4r   enforce              NonCompliant       19s

Comment 10 errata-xmlrpc 2022-07-25 07:07:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.10.24 extras update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:5665


Note You need to log in before you can comment on or make changes to this bug.