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

Cloud-init fails if metadata local-hostname is null #3492

Closed
ubuntu-server-builder opened this issue May 12, 2023 · 1 comment
Closed

Cloud-init fails if metadata local-hostname is null #3492

ubuntu-server-builder opened this issue May 12, 2023 · 1 comment
Labels
launchpad Migrated from Launchpad

Comments

@ubuntu-server-builder
Copy link
Collaborator

This bug was originally filed in Launchpad as LP: #1852100

Launchpad details
affected_projects = []
assignee = mgoddard
assignee_name = Mark Goddard
date_closed = 2019-12-18T17:55:34.709121+00:00
date_created = 2019-11-11T16:44:45.296606+00:00
date_fix_committed = 2019-12-18T17:55:34.709121+00:00
date_fix_released = 2019-12-18T17:55:34.709121+00:00
id = 1852100
importance = undecided
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1852100
milestone = None
owner = mgoddard
owner_name = Mark Goddard
private = False
status = fix_released
submitter = mgoddard
submitter_name = Mark Goddard
tags = []
duplicates = []

Launchpad user Mark Goddard(mgoddard) wrote on 2019-11-11T16:44:45.296606+00:00

If I run cloud-init with a config drive containing a metadata file which has local-hostname set to null, I get the following traceback:

Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/cloudinit/sources/init.py", line 447, in find_source
if s.get_data():
File "/usr/lib/python2.7/site-packages/cloudinit/sources/init.py", line 132, in get_data
self._get_standardized_metadata())
File "/usr/lib/python2.7/site-packages/cloudinit/sources/init.py", line 110, in _get_standardized_metadata
'local-hostname': self.get_hostname(),
File "/usr/lib/python2.7/site-packages/cloudinit/sources/init.py", line 317, in get_hostname
if util.is_ipv4(lhost):
File "/usr/lib/python2.7/site-packages/cloudinit/util.py", line 544, in is_ipv4
toks = instr.split('.')

Tested on CentOS 7.7, cloud-init 18.5.

@ubuntu-server-builder ubuntu-server-builder added the launchpad Migrated from Launchpad label May 12, 2023
@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Chad Smith(chad.smith) wrote on 2019-12-18T17:55:36.237612+00:00

This bug is believed to be fixed in cloud-init in version 19.4. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
launchpad Migrated from Launchpad
Projects
None yet
Development

No branches or pull requests

1 participant