TypeError: get_hostname() got an unexpected keyword argument 'metadata_only' on GCE bionic boot

Bug #1757176 reported by Dan Watkins on 2018-03-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init (Ubuntu)
High
Chad Smith

Bug Description

I'm seeing this in syslog via the serial port:

Mar 20 15:02:42 ubuntu cloud-init[817]: Traceback (most recent call last):
Mar 20 15:02:42 ubuntu cloud-init[817]: File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 655, in status_wrapper
Mar 20 15:02:42 ubuntu cloud-init[817]: ret = functor(name, args)
Mar 20 15:02:42 ubuntu cloud-init[817]: File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 377, in main_init
Mar 20 15:02:42 ubuntu cloud-init[817]: _maybe_set_hostname(init, stage='init-net', retry_stage='modules:config')
Mar 20 15:02:42 ubuntu cloud-init[817]: File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 699, in _maybe_set_hostname
Mar 20 15:02:42 ubuntu cloud-init[817]: init.cfg, cloud, metadata_only=True)
Mar 20 15:02:42 ubuntu cloud-init[817]: File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1051, in get_hostname_fqdn
Mar 20 15:02:42 ubuntu cloud-init[817]: fqdn = cloud.get_hostname(fqdn=True, metadata_only=metadata_only)
Mar 20 15:02:42 ubuntu cloud-init[817]: File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 83, in get_hostname
Mar 20 15:02:42 ubuntu cloud-init[817]: fqdn=fqdn, metadata_only=metadata_only)
Mar 20 15:02:42 ubuntu cloud-init[817]: TypeError: get_hostname() got an unexpected keyword argument 'metadata_only'

This prevents SSH host keys from being generated, so I can't SSH in to get further information.

Related branches

description: updated
Chad Smith (chad.smith) wrote :

looks to affect CloudSigma AliYun, OpenNebula too. Will post a branch on this today

Changed in cloud-init (Ubuntu):
assignee: nobody → Chad Smith (chad.smith)
importance: Undecided → High
status: New → In Progress
Chad Smith (chad.smith) wrote :

An upstream commit landed for this bug.

To view that commit see the following URL:
https://git.launchpad.net/cloud-init/commit/?id=685f9901

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 18.1-26-g685f9901-0ubuntu1

---------------
cloud-init (18.1-26-g685f9901-0ubuntu1) bionic; urgency=medium

  * debian/cloud-init.templates: Enable Hetzner Cloud datasource.
  * New upstream snapshot.
    - datasources: fix DataSource subclass get_hostname method signature
      (LP: #1757176)
    - OpenNebula: Update network to return v2 config rather than ENI.
      [Akihiko Ota]
    - Add Hetzner Cloud DataSource [Markus Schade]

 -- Chad Smith <email address hidden> Tue, 20 Mar 2018 16:39:07 -0600

Changed in cloud-init (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers