Bug 1837642 - GCP: the resources are created with identifier prefix that removes almost all context of cluster name
Summary: GCP: the resources are created with identifier prefix that removes almost all...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.5
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.5.0
Assignee: Abhinav Dahiya
QA Contact: Yang Yang
URL:
Whiteboard:
Depends On: 1809345
Blocks: 1838885
TreeView+ depends on / blocked
 
Reported: 2020-05-19 18:06 UTC by Abhinav Dahiya
Modified: 2020-07-13 17:40 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-13 17:40:02 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 3544 0 None closed Bug 1837642: installconfig: relax GCP cluster id restriction 2020-10-12 09:14:20 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:40:22 UTC

Description Abhinav Dahiya 2020-05-19 18:06:08 UTC
Description of problem:

On GCP all resources are prefixed with infra-id, which currently is 12 chars with 6 chars used by random bit, leaving only 6 chars from cluster name. This causes trouble associating the cluster to jobs in CI as most of the identifyable characters are dropped from the resource names in CI due to this restriction.

Also because of the previous restriction, only one char are used from pool's name, making is highly likely to collide in cases there are more.

Comment 3 Yang Yang 2020-05-22 09:42:20 UTC
Reproduced with 4.5.0-0.nightly-2020-05-20-211028

If cluster name is set to yangyang0522, the infra_id will be yangya-hmt7b.

Verifying with 4.5.0-0.nightly-2020-05-22-054554
I set cluster name to yangyang1837642, but get the infra-id "yangya-ndsf5" which still uses the first 6 characters of cluster name. And the node name still use the first character of machine pool name. 
# oc get node
NAME                                             STATUS   ROLES    AGE    VERSION
yangya-ndsf5-m-0.c.openshift-qe.internal         Ready    master   127m   v1.18.2
yangya-ndsf5-m-1.c.openshift-qe.internal         Ready    master   128m   v1.18.2
yangya-ndsf5-m-2.c.openshift-qe.internal         Ready    master   129m   v1.18.2
yangya-ndsf5-w-a-dvpjw.c.openshift-qe.internal   Ready    worker   100m   v1.18.2
yangya-ndsf5-w-b-x5sxr.c.openshift-qe.internal   Ready    worker   100m   v1.18.2
yangya-ndsf5-w-c-s9kpm.c.openshift-qe.internal   Ready    worker   101m   v1.18.2

If I understand correctly, with the PR merged, the infra-id should have maximum length 27 characters, and the node name should have the machine pool name. It seems it is not fixed. Did I miss anything?

Comment 4 Abhinav Dahiya 2020-05-22 15:30:30 UTC
> https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/origin-ci-test/pr-logs/pull/openshift_installer/3544/pull-ci-openshift-installer-master-e2e-gcp/345/artifacts/e2e-gcp/gather-extra/nodes/

```

ci-op-hmqstbi8-15937-9zz8h-master-0/
ci-op-hmqstbi8-15937-9zz8h-master-1/
ci-op-hmqstbi8-15937-9zz8h-master-2/
ci-op-hmqstbi8-15937-9zz8h-worker-b-c84fw/
ci-op-hmqstbi8-15937-9zz8h-worker-c-skcks/
ci-op-hmqstbi8-15937-9zz8h-worker-d-k8v46/
```

the CI run on that PR shows the latest wider names being used.

I think there is some problem with the installer version built in that nightly,

```
oc adm release info registry.svc.ci.openshift.org/ocp/release:4.5.0-0.nightly-2020-05-22-054554 --commits | grep installer
  baremetal-installer                            https://github.com/openshift/installer                                      e2367c4f2b868cd5968fd3859dae2aa00aa7bcc4
  installer                                      https://github.com/openshift/installer                                      e2367c4f2b868cd5968fd3859dae2aa00aa7bcc4
  installer-artifacts                            https://github.com/openshift/installer                                      8da3ffa23277b55b3ddbf53761063d22a30ce8a2

```
As you can see ^^ installer and installer-artifacts has different sha, and 8da3ffa23277b55b3ddbf53761063d22a30ce8a2 is the one you at least need, e2367c4f2b868cd5968fd3859dae2aa00aa7bcc4 doesn't have the change..


looking at newer builds, it seems like they are correct, so maybe try with new nightly.
```
oc adm release info registry.svc.ci.openshift.org/ocp/release:4.5.0-0.nightly-2020-05-22-111153 --commits | grep installer
  baremetal-installer                            https://github.com/openshift/installer                                      8da3ffa23277b55b3ddbf53761063d22a30ce8a2
  installer                                      https://github.com/openshift/installer                                      8da3ffa23277b55b3ddbf53761063d22a30ce8a2
  installer-artifacts                            https://github.com/openshift/installer                                      8da3ffa23277b55b3ddbf53761063d22a30ce8a2
```

make sure you check and include openshift-install version.

Comment 5 Yang Yang 2020-05-25 03:56:31 UTC
Thanks for the information. I saw the pr in that build change log so that I thought that build had included the change.

Verifying with 4.5.0-0.nightly-2020-05-24-223848

1. Set cluster name to yangyang1837642yangyangyangyang and install a cluster
2. Check the nodes name
# oc get node
NAME                                                           STATUS   ROLES    AGE   VERSION
yangyang1837642yangya-th9gc-master-0.c.openshift-qe.internal   Ready    master   76m   v1.18.2
yangyang1837642yangya-th9gc-master-1.c.openshift-qe.internal   Ready    master   76m   v1.18.2
yangyang1837642yangya-th9gc-master-2.c.openshift-qe.internal   Ready    master   76m   v1.18.2
yangyang1837642yangya-th9gc-worker-a-49swx                     Ready    worker   50m   v1.18.2
yangyang1837642yangya-th9gc-worker-b-kdxrt                     Ready    worker   49m   v1.18.2
yangyang1837642yangya-th9gc-worker-c-nb4qj                     Ready    worker   50m   v1.18.2

3. Set cluster name to yangyang1837642 and install a cluster 
4. Check the nodes name
# oc get node
NAME                                                           STATUS   ROLES    AGE   VERSION
yangyang1837642-dxzpm-master-0.c.openshift-qe.internal         Ready    master   78m   v1.18.2
yangyang1837642-dxzpm-master-1.c.openshift-qe.internal         Ready    master   78m   v1.18.2
yangyang1837642-dxzpm-master-2.c.openshift-qe.internal         Ready    master   78m   v1.18.2
yangyang1837642-dxzpm-worker-a-v9tbl.c.openshift-qe.internal   Ready    worker   52m   v1.18.2
yangyang1837642-dxzpm-worker-b-cmcpj.c.openshift-qe.internal   Ready    worker   52m   v1.18.2
yangyang1837642-dxzpm-worker-c-dmmcv.c.openshift-qe.internal   Ready    worker   52m   v1.18.2

The infra-id uses at most 21 characters from the cluster name.

Comment 6 errata-xmlrpc 2020-07-13 17:40:02 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, 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-2020:2409


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