Skip to content

OpenStack cloud provider should register with instance id instead of instance name #57765

@bsnchan

Description

@bsnchan

Is this a BUG REPORT or FEATURE REQUEST?:

/kind bug

What happened:

The OpenStack cloud provider currently uses the name of the kubelet node to register with the API server. However the name is not guaranteed to conform to the DNS-1123 subdomain spec.

Given a node name of worker/925f11f3-80af-4844-a00e-f0af521779d1, the following message appears in the kubelet logs:

Unable to register node "worker/925f11f3-80af-4844-a00e-f0af521779d1" with API server: Node "worker/925f11f3-80af-4844-a00e-f0af521779d1" is invalid: metadata.name: Invalid value: "worker/925f11f3-80af-4844-a00e-f0af521779d1": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is 'a-z0-9?(.a-z0-9?)*')

What you expected to happen:

The OpenStack Cloud provider uses the instance id instead of the instance name. This will guarantee that the id conforms the DNS-1123 spec without making any assumptions on what the instance name may be.

How to reproduce it (as minimally and precisely as possible):

In the OpenStack console, rename a kubelet node to kubelet/1234 and attempt to register the kubelet node to the api server.

Anything else we need to know?:

Environment: OpenStack Newton

  • Kubernetes version (use kubectl version):
Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.4", GitCommit:"9befc2b8928a9426501d3bf62f72849d5cbcd5a3", GitTreeState:"clean", BuildDate:"2017-11-20T05:28:34Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.4", GitCommit:"9befc2b8928a9426501d3bf62f72849d5cbcd5a3", GitTreeState:"clean", BuildDate:"2017-11-20T05:17:43Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
  • Cloud provider or hardware configuration: OpenStack
  • OS (e.g. from /etc/os-release): Ubuntu 14.04.5
  • Kernel (e.g. uname -a): Linux b4fdd4bc-cab9-44ff-9c99-44e91ff5b414 4.4.0-103-generic Suggest people verify they can start a VM on GCE. #126~14.04.1-Ubuntu SMP Mon Dec 4 19:33:04 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools:
  • Others:

Metadata

Metadata

Assignees

Labels

area/provider/openstackIssues or PRs related to openstack providerkind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions