Skip to content
This repository has been archived by the owner on Aug 23, 2021. It is now read-only.

After updating to the latest cloud-init, errors with cloudinit.util #50

Closed
weikinhuang opened this issue Aug 29, 2020 · 5 comments
Closed

Comments

@weikinhuang
Copy link

Hi, I've created a new ubuntu 20.04 VM template with packer, it automatically installs cloud-init 20.3-2-g371b392c-0ubuntu1~20.04.1. This latest version is incompatible with this datasource.

2020-08-29 15:05:34,869 - handlers.py[DEBUG]: finish: init-network/check-cache: SUCCESS: no cache found
2020-08-29 15:05:34,869 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/instance
2020-08-29 15:05:34,870 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.ubuntu.Distro'>
2020-08-29 15:05:34,871 - __init__.py[DEBUG]: Looking for data source in: ['VMwareGuestInfo', 'None'], via packages ['', 'cloudinit.sources'] that matches dependencies ['FILESYSTEM', 'NETWORK']
2020-08-29 15:05:34,874 - __init__.py[DEBUG]: Searching for network data source in: ['DataSourceVMwareGuestInfo', 'DataSourceNone']
2020-08-29 15:05:34,874 - handlers.py[DEBUG]: start: init-network/search-VMwareGuestInfo: searching for network data from DataSourceVMwareGuestInfo
2020-08-29 15:05:34,874 - __init__.py[DEBUG]: Seeing if we can get any data from <class 'cloudinit.sources.DataSourceVMwareGuestInfo.DataSourceVMwareGuestInfo'>
2020-08-29 15:05:34,874 - __init__.py[DEBUG]: Update datasource metadata and network config due to events: New instance first boot
2020-08-29 15:05:34,874 - DataSourceVMwareGuestInfo.py[DEBUG]: Getting guestinfo value for key metadata
2020-08-29 15:05:34,874 - handlers.py[DEBUG]: finish: init-network/search-VMwareGuestInfo: FAIL: no network data found from DataSourceVMwareGuestInfo
2020-08-29 15:05:34,874 - util.py[WARNING]: Getting data from <class 'cloudinit.sources.DataSourceVMwareGuestInfo.DataSourceVMwareGuestInfo'> failed
2020-08-29 15:05:34,874 - util.py[DEBUG]: Getting data from <class 'cloudinit.sources.DataSourceVMwareGuestInfo.DataSourceVMwareGuestInfo'> failed
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceVMwareGuestInfo.py", line 319, in get_guestinfo_value
    (stdout, stderr) = util.subp(
TypeError: 'module' object is not callable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/cloudinit/sources/__init__.py", line 770, in find_source
    if s.update_metadata([EventType.BOOT_NEW_INSTANCE]):
  File "/usr/lib/python3/dist-packages/cloudinit/sources/__init__.py", line 659, in update_metadata
    result = self.get_data()
  File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceVMwareGuestInfo.py", line 125, in get_data
    self.metadata = load_metadata()
  File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceVMwareGuestInfo.py", line 425, in load_metadata
    data = load(guestinfo('metadata'))
  File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceVMwareGuestInfo.py", line 399, in guestinfo
    data = get_guestinfo_value(key)
  File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceVMwareGuestInfo.py", line 327, in get_guestinfo_value
    except util.ProcessExecutionError as error:
AttributeError: module 'cloudinit.util' has no attribute 'ProcessExecutionError'

Thanks!

@zurajm
Copy link

zurajm commented Sep 10, 2020

@weikinhuang I had exactly the same problem. But in the end seems unrelated to the latest Ubuntu cloud image but rather to the cloud-init-vmware-guestinfo master branch. If I installed it with referencing the git tag v1.3.1 everything works. I installed it like this:

curl -sSL https://raw.githubusercontent.com/vmware/cloud-init-vmware-guestinfo/master/install.sh | GIT_REF=v1.3.1 sh -

and everything works like expected 😄

@akutz
Copy link
Contributor

akutz commented Sep 10, 2020

Odd. I wonder what changed in cloud init. Or in this repo. I’ll bisect in the morning.

@weikinhuang
Copy link
Author

Interesting, I'll try v1.3.1 later and see.

@jfroche
Copy link

jfroche commented Sep 16, 2020

#54 fixes this

@akutz
Copy link
Contributor

akutz commented Sep 22, 2020

Closed with #54

@akutz akutz closed this as completed Sep 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants