Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1809345: Add the machine's name as a known NodeInternalDNS #88

Merged

Conversation

abhinavdahiya
Copy link
Contributor

GCP platform provides search paths to resolve the virtual machine names by default. see https://cloud.google.com/compute/docs/internal-dns#resolv.conf

this also allows nodes in clusters to have node-names matching the virtual machine name instead of the fqdn be because fqdn is too long for RHCOS to accept as hostname
by default

GCP platform provides search paths to resolve the virtual machine names by default. see https://cloud.google.com/compute/docs/internal-dns#resolv.conf

this also allows nodes in clusters to have node-names matching the virtual machine name instead of the fqdn be because fqdn is too long for RHCOS to accept as hostname
by default
@abhinavdahiya abhinavdahiya changed the title Add the machine's name as a known NodeInternalDNS Bug 1809345: Add the machine's name as a known NodeInternalDNS May 5, 2020
@openshift-ci-robot
Copy link
Contributor

@abhinavdahiya: This pull request references Bugzilla bug 1809345, which is valid. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1809345: Add the machine's name as a known NodeInternalDNS

Instructions 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.

@openshift-ci-robot openshift-ci-robot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels May 5, 2020
// provides search paths to resolve those.
// https://cloud.google.com/compute/docs/internal-dns#resolv.conf
nodeAddresses = append(nodeAddresses, corev1.NodeAddress{
Type: corev1.NodeInternalDNS,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to also include this as NodeHostName?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, this VM name is resolvable internal DNS name for the machine on GCP. We can't say what the hostname will be.

@enxebre
Copy link
Member

enxebre commented May 6, 2020

Related PR for ref openshift/machine-config-operator#1711
This might be related and causing https://bugzilla.redhat.com/show_bug.cgi?id=1810674?
/approve

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enxebre

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 6, 2020
@michaelgugino
Copy link
Contributor

My only concern here is that the kubelet might be getting node name from the cloud provider (eg, metadata) rather than the output of 'hostname'. Though, worst case here we have an extra name appended to the machine-object that has no effect.

@abhinavdahiya
Copy link
Contributor Author

@michaelgugino well what the kubelet can pick a nodename based on various factors, but this change only adds the VM name as one of the internal DNS which is true orthogonal to nodename, kubelet based on https://cloud.google.com/compute/docs/internal-dns#resolv.conf

So on GCP, the kubelet uses the os hostname as node-name. And that can also be change by a flag on kubelet.
But I think for autoapproval we are using the matching or these today (very brittle) due to constraints we have. Could change in the future.

@darkmuggle
Copy link

I have limited understanding of the dynamics at play. However, in light of openshift/machine-config-operator#1711 this makes sense; 1711 provides for a truncated host name which will be used when the FQDN exceeds 63 characters.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 9, 2020
@openshift-merge-robot openshift-merge-robot merged commit 1a6d484 into openshift:master May 9, 2020
@openshift-ci-robot
Copy link
Contributor

@abhinavdahiya: All pull requests linked via external trackers have merged: openshift/cluster-api-provider-gcp#88, openshift/machine-config-operator#1711. Bugzilla bug 1809345 has been moved to the MODIFIED state.

In response to this:

Bug 1809345: Add the machine's name as a known NodeInternalDNS

Instructions 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.

@abhinavdahiya
Copy link
Contributor Author

/cherry-pick release-4.4
/cherry-pick release-4.3

@openshift-cherrypick-robot

@abhinavdahiya: new pull request created: #91

In response to this:

/cherry-pick release-4.4
/cherry-pick release-4.3

Instructions 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.

@abhinavdahiya
Copy link
Contributor Author

/cherry-pick release-4.3

@openshift-cherrypick-robot

@abhinavdahiya: new pull request created: #92

In response to this:

/cherry-pick release-4.3

Instructions 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.

abhinavdahiya added a commit to abhinavdahiya/installer that referenced this pull request May 19, 2020
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.
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/installer that referenced this pull request May 22, 2020
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.
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/installer that referenced this pull request May 22, 2020
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.
jstuever added a commit to jstuever/openshift-installer that referenced this pull request Jun 3, 2020
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.
patrickdillon pushed a commit to patrickdillon/installer that referenced this pull request Jun 17, 2020
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.
RadekManak pushed a commit to RadekManak/cluster-api-provider-gcp that referenced this pull request Apr 12, 2023
🌱 Rebase on cluster-api v1.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants