gcp: reduce the length of the names of machines #2088
gcp: reduce the length of the names of machines #2088openshift-merge-robot merged 2 commits intoopenshift:masterfrom
Conversation
The GCE kubelet uses the `os.Hostname()` to create node names and there's a har limit on hostnames to be 64 characters. based on [1] On GCP, the hostnames are `<instance name>.c.<project-id>.internal` and since the project ids on GCP can be of max 30 characters, an instance name can be max 22 characters. The instances created by a machineset have the `6` character of randomness added to machineset's name, therefore the max length of machineset's name can be 16 characters. Therefore to accomodate the pool's name and zone (as we create machineset per zone) : the mastes machines are now `<infra-id>-m-<idx>` and the worker machinesets are now `<infra-is>-w-<zone>`, where the infra-id can be max 12 characters on GCP. [1]: https://tools.ietf.org/html/rfc2181#section-11
|
Awesome, I'm thinking that with the lower max size I can remove the need for a separate ingress-uid for service load balancers. I can do that in follow-up PR. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, csrwng 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 |
|
@abhinavdahiya: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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/test-infra repository. I understand the commands that are listed here. |
The infra id of the clusters on GCP was reduced to 12 in openshift#2088 because we couldn't handle the hostname seen by rhcos machine to be greater than 64. More details on this are available in https://bugzilla.redhat.com/show_bug.cgi?id=1809345 now since BZ 1809345 is fixed by openshift/machine-config-operator#1711 and openshift/cluster-api-provider-gcp#88 the installer can relax the restriction on the infra-id to match the other platforms. Why is it important? 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 higly likely to collide in cases there are more.
The infra id of the clusters on GCP was reduced to 12 in openshift#2088 because we couldn't handle the hostname seen by rhcos machine to be greater than 64. More details on this are available in https://bugzilla.redhat.com/show_bug.cgi?id=1809345 now since BZ 1809345 is fixed by openshift/machine-config-operator#1711 and openshift/cluster-api-provider-gcp#88 the installer can relax the restriction on the infra-id to match the other platforms. Why is it important? 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 higly likely to collide in cases there are more.
The infra id of the clusters on GCP was reduced to 12 in openshift#2088 because we couldn't handle the hostname seen by rhcos machine to be greater than 64. More details on this are available in https://bugzilla.redhat.com/show_bug.cgi?id=1809345 now since BZ 1809345 is fixed by openshift/machine-config-operator#1711 and openshift/cluster-api-provider-gcp#88 the installer can relax the restriction on the infra-id to match the other platforms. Why is it important? 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 higly likely to collide in cases there are more.
This mirrors changes to GCP IPI in openshift#3544 The infra id of the clusters on GCP was reduced to 12 in openshift#2088 because we couldn't handle the hostname seen by rhcos machine to be greater than 64. More details on this are available in https://bugzilla.redhat.com/show_bug.cgi?id=1809345 now since BZ 1809345 is fixed by openshift/machine-config-operator#1711 and openshift/cluster-api-provider-gcp#88 the installer can relax the restriction on the infra-id to match the other platforms. Why is it important? 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 higly likely to collide in cases there are more.
The GCE kubelet uses the
os.Hostname()to create node names and there's a har limit on hostnames to be 64 characters. based on 1On GCP, the hostnames are
<instance name>.c.<project-id>.internaland since the project ids on GCP can be of max 30 characters, an instance name can be max 22 characters.The instances created by a machineset have the
6character of randomness added to machineset's name, therefore the max length of machineset's name can be 16 characters. Therefore to accomodate the pool's name and zone (as we create machineset per zone) :the mastes machines are now
<infra-id>-m-<idx>andthe worker machinesets are now
<infra-is>-w-<zone>, where the infra-id can be max 12 characters on GCP./cc @csrwng @jstuever