yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #83674
[Bug 1884071] Re: gzipped and base64 encoded user-data leads to failure
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/1884071
Title:
gzipped and base64 encoded user-data leads to failure
Status in cloud-init:
Fix Released
Bug description:
Issue is here as well: https://github.com/terraform-providers
/terraform-provider-aws/issues/8244
In /var/log/cloud-init.log this is the only WARNING message (there are
no ERROR messages):
2020-06-18 12:16:59,413 - __init__.py[WARNING]: Unhandled non-
multipart (text/x-not-multipart) userdata:
'b'H4sIAAAAAAAA/8RV3W4bNxO9'...'
I can even pull the file from the created VM and it can be extracted
and shows to be proper formatting and everything:
curl -L http://169.254.169.254/latest/user-data/ | base64 --decode |
gunzip
Content-Type: multipart/mixed; boundary="MIMEBOUNDARY"
MIME-Version: 1.0
--MIMEBOUNDARY
Content-Transfer-Encoding: 7bit
Content-Type: text/cloud-config
Mime-Version: 1.0
#cloud-config
# set locale
locale: en_GB.UTF-8
# ensure time sync between all nodes
ntp:
enabled: true
ntp_client: chrony
# hides ssh keys in console
ssh_fp_console_blacklist: [ssh-dss, ssh-dsa, ssh-ed25519]
ssh_key_console_blacklist: [ssh-dss, ssh-dsa, ssh-ed25519]
# upgrade all packages and install necessary ones
package_upgrade: true
package_reboot_if_required: true
packages:
- apt-transport-https
- ca-certificates
- curl
- gnupg-agent
- software-properties-common
- build-essential
- libssl-dev
- make
# set random root password and disable password login for ssh
chpasswd:
expire: false
list: |
root:RANDOM
ssh_pwauth: no
# create sre user with sudo privs and set autrhorized key
users:
- name: sre
groups: sudo
lock_passwd: true
ssh_authorized_keys:
- censored
sudo: ['ALL=(ALL) NOPASSWD:ALL']
shell: /bin/bash
--MIMEBOUNDARY
Content-Transfer-Encoding: 7bit
Content-Type: text/cloud-config
Mime-Version: 1.0
#cloud-config
# Configure Floating IP (Ubuntu 20.04 LTS)
# Not required when using https://github.com/costela/hcloud-ip-floater
#write_files:
# - content: |
# network:
# version: 2
# ethernets:
# eth0:
# addresses:
# - ${floating_ip}/32
# path: /etc/netplan/60-floating-ip.yaml
# Install Keepalived
runcmd:
- cd /root/
- wget http://www.keepalived.org/software/keepalived-2.1.2.tar.gz
- tar xvf keepalived-2.1.2.tar.gz
- cd keepalived-2.1.2
- ./configure
- make
- sudo make install
final_message: "The system is finally up, after $UPTIME seconds"
When I use the exact same userdata as above but extracted and passed
as plain text it works without issue.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1884071/+subscriptions
References