yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #83669
[Bug 1889938] Re: cmd: cloud-init query fails for juju units with UnicodeDecodeError
This bug is believed to be fixed in cloud-init in version 20.3. If this
is still a problem for you, please make a comment and set the state back
to New
Thank you.
** Changed in: cloud-init
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1889938
Title:
cmd: cloud-init query fails for juju units with UnicodeDecodeError
Status in cloud-init:
Fix Released
Bug description:
sudo cloud-init query --all fails on juju deployed units with the following trace:
Traceback (most recent call last):
File "/usr/bin/cloud-init", line 11, in <module>
load_entry_point('cloud-init==20.2', 'console_scripts', 'cloud-init')()
File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 893, in main
get_uptime=True, func=functor, args=(name, args))
File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 2620, in log_time
ret = func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/cloudinit/cmd/query.py", line 123, in handle_args
instance_data['userdata'] = util.load_file(user_data_fn)
File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1432, in load_file
return decode_binary(contents)
File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 132, in decode_binary
return blob.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte
On some platforms (juju deployed instances and various openstack
platforms), user-data is compressed when provided to the instance.
When deploying juju units in ec2 regions, user-data provided to the
instance is gzip compressed.
The cloud-init query command attempts to load, decode and read raw
userdata content from /var/lib/cloud/instance/user-data.txt. In cases
where the user-data is gzip compressed, decoding fails.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1889938/+subscriptions
References