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

when create cluster, node hostname could not be set to purely numeric #10987

Closed
KubeKyrie opened this issue Mar 7, 2024 · 1 comment
Closed
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@KubeKyrie
Copy link
Contributor

KubeKyrie commented Mar 7, 2024

What happened?

When I set node hostname to purely numeric, such as 666, an error occured.

"stderr": "W0307 17:02:39.206901   14325 initconfiguration.go:306] error unmarshaling configuration schema.GroupVersionKind{Group:\"kubeadm.k8s.io\", Version:\"v1beta3\", Kind:\"InitConfiguration\"}: json: cannot unmarshal number into Go struct field NodeRegistrationOptions.nodeRegistration.name of type string\njson: cannot unmarshal number into Go struct field NodeRegistrationOptions.nodeRegistration.name of type string\nTo see the stack trace of this error execute with --v=5 or higher",
    "stderr_lines": [
        "W0307 17:02:39.206901   14325 initconfiguration.go:306] error unmarshaling configuration schema.GroupVersionKind{Group:\"kubeadm.k8s.io\", Version:\"v1beta3\", Kind:\"InitConfiguration\"}: json: cannot unmarshal number into Go struct field NodeRegistrationOptions.nodeRegistration.name of type string",
        "json: cannot unmarshal number into Go struct field NodeRegistrationOptions.nodeRegistration.name of type string",
        "To see the stack trace of this error execute with --v=5 or higher"
    ],

And the InitConfiguration of kubeadm-config.yaml shows below. Name should be string rather than int.

image

What did you expect to happen?

The cluster could be created successfully.

How can we reproduce it (as minimally and precisely as possible)?

Just set node hostname to purely numeric.

OS

centos 7.9

Version of Ansible

No

Version of Python

Python 2.7.5

Version of Kubespray (commit)

release-2.24

Network plugin used

calico

Full inventory with variables

none

Command used to invoke ansible

none

Output of ansible run

none

Anything else we need to know

No response

@KubeKyrie KubeKyrie added the kind/bug Categorizes issue or PR as related to a bug. label Mar 7, 2024
@KubeKyrie
Copy link
Contributor Author

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant