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

If FQDN is number, cloud-config.service fails #5989

Open
EHPS-Oliver opened this issue Jan 27, 2025 · 0 comments · May be fixed by #5993
Open

If FQDN is number, cloud-config.service fails #5989

EHPS-Oliver opened this issue Jan 27, 2025 · 0 comments · May be fixed by #5993
Labels
bug Something isn't working correctly good first issue

Comments

@EHPS-Oliver
Copy link

EHPS-Oliver commented Jan 27, 2025

Bug report

When the fqdn is a number, python treats it as a literal number 123 instead of "123". This causes the following issue

[    7.913699] cloud-init[652]:   File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1207, in get_hostname_fqdn
[    7.914904] cloud-init[652]:     hostname = get_cfg_option_str(cfg, "hostname", fqdn.split(".")[0])
[    7.915941] cloud-init[652]:                                                    ^^^^^^^^^^
[    7.916898] cloud-init[652]: AttributeError: 'int' object has no attribute 'split'

Steps to reproduce the problem

(Using proxmox with cloud init guests.)

  1. Set vm "name" to a number
  2. Start vm
  3. "Failed to start cloud-init.service"

Environment details

  • Cloud-init v. 24.4-0ubuntu1~24.04.2
  • On proxmox

cloud-init logs

Can't currently log in to check those - troubleshooting another issue preventing me from logging in :)

@EHPS-Oliver EHPS-Oliver added bug Something isn't working correctly new An issue that still needs triage labels Jan 27, 2025
@holmanb holmanb added good first issue and removed new An issue that still needs triage labels Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly good first issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants