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

unexpected (and silent?) failure using newest cloud-init-vmware-guestinfo with cloud-init 20.2-x #52

Closed
larkinkevin opened this issue Sep 10, 2020 · 2 comments · Fixed by #53

Comments

@larkinkevin
Copy link

larkinkevin commented Sep 10, 2020

Hey @akutz ,

I don't think this new version check is working the way you expect.

If the installed version of cloud-init is something like "20.2-45-g5f7825e2-0ubuntu1~18.04.1", you probably want to continue to use "util.subp" (rather than "util.subp.subp"), right?

Thanks.

PS: when I say the failure was "silent", I mean that terraform didn't think there was anything amiss when I subsequently tried to use "extra_config.guestinfo.userdata" on the vsphere image I had baked with current "master" of cloud-init-vmware-guestinfo and "20.2-45-g5f7825e2-0ubuntu1~18.04.1" of cloud-init ... although "ssh" certainly did think that something was amiss when it tried to connect 😜

@yvespp
Copy link
Contributor

yvespp commented Sep 10, 2020

Probably related, with the current master I get this error:

2020-09-10 13:36:41,696 - __init__.py[DEBUG]: Datasource DataSourceNoCloudNet [seed=None][dsmode=net] not updated for events: New instance first boot
2020-09-10 13:36:41,696 - handlers.py[DEBUG]: finish: init-network/search-NoCloudNet: SUCCESS: no network data found from DataSourceNoCloudNet
2020-09-10 13:36:41,697 - handlers.py[DEBUG]: start: init-network/search-VMwareGuestInfo: searching for network data from DataSourceVMwareGuestInfo
2020-09-10 13:36:41,697 - __init__.py[DEBUG]: Seeing if we can get any data from <class 'cloudinit.sources.DataSourceVMwareGuestInfo.DataSourceVMwareGuestInfo'>
2020-09-10 13:36:41,697 - __init__.py[DEBUG]: Update datasource metadata and network config due to events: New instance first boot
2020-09-10 13:36:41,697 - DataSourceVMwareGuestInfo.py[DEBUG]: Getting guestinfo value for key metadata
2020-09-10 13:36:41,697 - handlers.py[DEBUG]: finish: init-network/search-VMwareGuestInfo: FAIL: no network data found from DataSourceVMwareGuestInfo
2020-09-10 13:36:41,697 - util.py[WARNING]: Getting data from <class 'cloudinit.sources.DataSourceVMwareGuestInfo.DataSourceVMwareGuestInfo'> failed
2020-09-10 13:36:41,697 - 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 334, in get_guestinfo_value
    (stdout, stderr) = subp_obj.subp(
AttributeError: 'function' object has no attribute 'subp'

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 772, in find_source
    if s.update_metadata([EventType.BOOT_NEW_INSTANCE]):
  File "/usr/lib/python3/dist-packages/cloudinit/sources/__init__.py", line 661, in update_metadata
    result = self.get_data()
  File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceVMwareGuestInfo.py", line 126, in get_data
    self.metadata = load_metadata()
  File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceVMwareGuestInfo.py", line 441, in load_metadata
    data = load(guestinfo('metadata'))
  File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceVMwareGuestInfo.py", line 415, in guestinfo
    data = get_guestinfo_value(key)
  File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceVMwareGuestInfo.py", line 342, in get_guestinfo_value
    except subp_obj.ProcessExecutionError as error:
AttributeError: 'function' object has no attribute 'ProcessExecutionError'

Version: /usr/bin/cloud-init 20.2-45-g5f7825e2-0ubuntu1~18.04.1
#50 is probably also related.

@yvespp
Copy link
Contributor

yvespp commented Sep 10, 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

Successfully merging a pull request may close this issue.

2 participants