cloud-init no longer processes user data on GCE in artful

Bug #1752711 reported by Dan Watkins on 2018-03-01
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cloud-init
High
Scott Moser
cloud-init (Ubuntu)
High
Scott Moser
Xenial
Critical
Chad Smith
Artful
Critical
Chad Smith
Bionic
High
Scott Moser

Bug Description

=== Begin SRU Template ===
[Impact]
Any user-data provided when creating google cloud instances is ignored so no instance customization is observed. This is a silent failure and no tracebacks in cloud-init represent that failure to the user.

Providing a simple cloud-config to set a hostname will provide a quick validation of cloud-init observing user-data.

[Test Case]

# Create cloud-config which should change the hostname, and cli prompt
$ cat > sethostname.yaml <<EOF
#cloud-config
hostname: SRU-worked
EOF

# Deploy on GCE
$ gcloud compute instances create artful-sru-test --zone=us-central1-b --image-family ubuntu-1710 --image-project ubuntu-os-cloud-devel --metadata-from-file user-data=sethostname.yaml

$ gcloud compute ssh artful-sru-test

# Expect default hostname "artful-sru-test" instead of "SRU-worked"
# Look for failure symptom: populated instance-data but user-data: null
artful-sru-test:~# sudo grep user-data /run/cloud/instance-data.json
   "instance-data": "{\"user-data\":\"#cloud-config\\nhostname: SRU-worked\\n\"}",
  "user-data": null,

# Upgrade cloud-init

# add proposed
rel=$(lsb_release -sc);
line=$(awk '$1 == "deb" && $2 ~ /ubuntu.com/ {
  printf("%s %s %s-proposed main universe\n", $1, $2, rel); exit(0) };
  ' "rel=$rel" /etc/apt/sources.list);
echo "$line" | sudo tee /etc/apt/sources.list.d/proposed.list
sudo apt-get update -q;
sudo apt-get install cloud-init;
# Reboot 'clean' allowing new cloud-init to run against a fresh system
sudo cloud-init clean --reboot --logs

$ gcloud compute ssh artful-sru-test
# Expect to see proper hostname
SRU-worked:~# sudo cloud-init status --long;

# Validate user-data: non-null
SRU-worked:~# sudo grep user-data /run/cloud-init/instance-data.json
artful-sru-test:~# sudo grep user-data /run/cloud-init/instance-data.json
   "instance-data": "{\"user-data\":\"#cloud-config\\nhostname: SRU-worked\\n\"}",
  "user-data": "I2Nsb3VkLWNvbmZpZwpob3N0bmFtZTogbXliaW9uaWMK",

[Other Info]
Upstream commit at
  https://git.launchpad.net/cloud-init/commit/?id=40e7738

=== End SRU Template ===

=== Begin Original Description ===

If I pass in user data like so:

$ cat cfg
#!/bin/sh
touch /tmp/foobar

$ gcloud compute instances create aa-$(date +%y%m%d-%H%M) --image-family ubuntu-1710 --image-project ubuntu-os-cloud-devel --metadata-from-file user-data=cfg
...

Then in the instance:

$ ls /tmp/foobar
$ sudo cat /var/lib/cloud-init/instance/user-data.txt
$ curl "http://metadata.google.internal/computeMetadata/v1/instance/attributes/user-data" -H "Metadata-Flavor: Google"
#/bin/sh
touch /tmp/foobar

Related branches

description: updated
Ryan Harper (raharper) wrote :

Note that /tmp and /var/tmp (and possibly others) are not safe during boot:

https://www.freedesktop.org/software/systemd/man/systemd-tmpfiles.html

Can you reproduce with a touch to a non-tmp path ?

Dan Watkins (daniel-thewatkins) wrote :

I have reproduced with a non-/tmp path.

Log tarball attached.

Scott Moser (smoser) on 2018-03-01
Changed in cloud-init:
status: New → Confirmed
importance: Undecided → High
Changed in cloud-init (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in cloud-init (Ubuntu Xenial):
status: New → Confirmed
Changed in cloud-init (Ubuntu Artful):
status: New → Confirmed
Changed in cloud-init (Ubuntu Xenial):
importance: Undecided → Critical
Changed in cloud-init (Ubuntu Artful):
importance: Undecided → Critical
Chad Smith (chad.smith) on 2018-03-01
Changed in cloud-init:
status: Confirmed → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 18.1-5-g40e77380-0ubuntu1

---------------
cloud-init (18.1-5-g40e77380-0ubuntu1) bionic; urgency=medium

  * New upstream snapshot.
    - GCE: fix reading of user-data that is not base64 encoded. (LP: #1752711)
    - doc: fix chef install from apt packages example in RTD.
    - Implement puppet 4 support [Romanos Skiadas] (LP: #1446804)
    - subp: Fix subp usage with non-ascii characters when no system locale.
      (LP: #1751051)
    - salt: configure grains in grains file rather than in minion config.
      [Daniel Wallace]

 -- Chad Smith <email address hidden> Thu, 01 Mar 2018 15:47:04 -0700

Changed in cloud-init (Ubuntu Bionic):
status: Confirmed → Fix Released
Chad Smith (chad.smith) on 2018-03-02
description: updated
description: updated

Hello Dan, or anyone else affected,

Accepted cloud-init into artful-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/17.2-35-gf576b2a2-0ubuntu1~17.10.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-artful to verification-done-artful. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-artful. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cloud-init (Ubuntu Artful):
status: Confirmed → Fix Committed
tags: added: verification-needed verification-needed-artful
Timo Aaltonen (tjaalton) wrote :

Hello Dan, or anyone else affected,

Accepted cloud-init into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/17.2-35-gf576b2a2-0ubuntu1~16.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cloud-init (Ubuntu Xenial):
status: Confirmed → Fix Committed
tags: added: verification-needed-xenial
Chad Smith (chad.smith) on 2018-03-02
description: updated
Chad Smith (chad.smith) wrote :
Download full text (5.0 KiB)

=== Abridged manual verification
### Artful
root@publishing:~# gcloud compute ssh artful-sru-test
No zone specified. Using zone [us-central1-b] for instance: [artful-sru-test].
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:qnFD0APJ/VAfRHXrYshvasMsvAjmJ/R6/lmmXQzGx6w.
Please contact your system administrator.
Add correct host key in /root/.ssh/google_compute_known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/google_compute_known_hosts:4
  remove with:
  ssh-keygen -f "/root/.ssh/google_compute_known_hosts" -R "compute.5802718818769095753"
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
Enter passphrase for key '/root/.ssh/google_compute_engine':
Enter passphrase for key '/root/.ssh/google_compute_engine':
Welcome to Ubuntu 17.10 (GNU/Linux 4.13.0-36-generic x86_64)

 * Documentation: https://help.ubuntu.com
 * Management: https://landscape.canonical.com
 * Support: https://ubuntu.com/advantage

 * Meltdown, Spectre and Ubuntu: What are the attack vectors,
   how the fixes work, and everything else you need to know
   - https://ubu.one/u2Know

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

0 packages can be updated.
0 updates are security updates.

Last login: Fri Mar 2 15:51:05 2018 from 67.174.121.94
root@artful-sru-test:~# dpkg-query --show cloud-init
cloud-init 17.2-35-gf576b2a2-0ubuntu1~17.10.1
root@artful-sru-test:~# # add proposed
root@artful-sru-test:~# rel=$(lsb_release -sc);
root@artful-sru-test:~# line=$(awk '$1 == "deb" && $2 ~ /ubuntu.com/ {
> printf("%s %s %s-proposed main universe\n", $1, $2, rel); exit(0) };
> ' "rel=$rel" /etc/apt/sources.list);
root@artful-sru-test:~# echo "$line" | sudo tee /etc/apt/sources.list.d/proposed.list
deb http://us-central1.gce.archive.ubuntu.com/ubuntu/ artful-proposed main universe
root@artful-sru-test:~# sudo apt-get update -q;

Hit:1 http://us-central1.gce.archive.ubuntu.com/ubuntu artful InRelease
Get:2 http://us-central1.gce.archive.ubuntu.com/ubuntu artful-updates InRelease [78.6 kB]
Get:3 http://us-central1.gce.archive.ubuntu.com/ubuntu artful-backports InRelease [72.2 kB]
Get:4 http://us-central1.gce.archive.ubuntu.com/ubuntu artful-proposed InRelease [235 kB]
...
Reading package lists...
root@artful-sru-test:~# sudo apt-get install cloud-init;
...
The following packages will be upgraded:
  cloud-init
1 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
Need to get 342 kB of archives.
After this operation, 1024 B of additional disk space will be used.
Get:1 http://us-central1.gce.archive.ubuntu.com/ubuntu artful-proposed/main amd64 cloud-init all 17.2-35-gf576b2a2-0ubuntu1~17.10.2 [342 kB]
...

Read more...

tags: added: verification-done-artful
removed: verification-needed-artful
Chad Smith (chad.smith) wrote :
Download full text (4.7 KiB)

=== Abridged SRU verification ===h
NOTE: Xenial didn't publish an SRU regression per cloud-init 17.2.35, it still is on 17.1.46 which properly processes user-data.

# Xenial

root@publishing:~# gcloud compute instances create xenial-sru-test --zone=us-central1-b --image daily-ubuntu-1604-xenial-v20180224 --image-project ubuntu-os-cloud-devel --metadata-from-file user-data=sethostname.yaml
Created [https://www.googleapis.com/compute/v1/projects/cloud-init-testing/zones/us-central1-b/instances/xenial-sru-test].
NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP EXTERNAL_IP STATUS
xenial-sru-test us-central1-b n1-standard-1 10.128.0.2 35.184.113.47 RUNNING
root@publishing:~# gcloud compute ssh xenial-sru-test
No zone specified. Using zone [us-central1-b] for instance: [xenial-sru-test].
Warning: Permanently added 'compute.2904988054415753140' (ECDSA) to the list of known hosts.
Enter passphrase for key '/root/.ssh/google_compute_engine':
Welcome to Ubuntu 16.04.4 LTS (GNU/Linux 4.13.0-1011-gcp x86_64)

 * Documentation: https://help.ubuntu.com
 * Management: https://landscape.canonical.com
 * Support: https://ubuntu.com/advantage

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

0 packages can be updated.
0 updates are security updates.

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

root@SRU-worked:~# dpkg-query --show cloud-init
cloud-init 17.1-46-g7acc9e68-0ubuntu1~16.04.1
root@SRU-worked:~# hostname xenial-sru-test # set it back so we can validate upgrade
root@SRU-worked:~# exit
logout
Connection to 35.184.113.47 closed.
root@publishing:~# gcloud compute ssh xenial-sru-test
... # Validating hostname presented in PS1
Last login: Fri Mar 2 16:55:23 2018 from 67.174.121.94
root@xenial-sru-test:~# rel=$(lsb_release -sc);
root@xenial-sru-test:~# line=$(awk '$1 == "deb" && $2 ~ /ubuntu.com/ {
> printf("%s %s %s-proposed main universe\n", $1, $2, rel); exit(0) };
> ' "rel=$rel" /etc/apt/sources.list);
root@xenial-sru-test:~# echo "$line" | sudo tee /etc/apt/sources.list.d/proposed.list
deb http://us-central1.gce.archive.ubuntu.com/ubuntu/ xenial-proposed main universe
root@xenial-sru-test:~# sudo apt-get update -q;
Hit:1 http://us-central1.gce.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://us-central1.gce.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:3 http://us-central1.gce.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:4 http://us-central1.gce.archive.ubuntu.com/ubuntu xenial-proposed InRelease [253 kB]
...
Reading package lists...
root@xenial-sru-test:~# sudo apt-get install cloud-init;
...
The following packages will be upgraded:
  cloud-init
...
Setting up cloud-init (17.2-35-gf576b2a2-0ubuntu1~16.04.2) ...
root@xenial-sru-test:~# # Clean cloud-init artifacts so cloud-init runs against fresh instance
root@xenial-sru-test:~# sudo cloud-init clean --reboot --logs...

Read more...

tags: added: verification-done verification-done-xenial
removed: verification-needed verification-needed-xenial
Chad Smith (chad.smith) wrote :
Download full text (487.3 KiB)

# Xenial automated integration tests nocloud-lxd from https://jenkins.ubuntu.com/server/view/cloud-init/job/cloud-init-integration-lxd-x/465/consoleFull

Started by timer
Building remotely on torkoal (metal-amd64) in workspace /var/lib/jenkins/slaves/torkoal/workspace/cloud-init-integration-lxd-x
[cloud-init-integration-lxd-x] $ /bin/sh -xe /tmp/jenkins5189693012157108797.sh
+ release=xenial
+ export http_proxy=http://squid.internal:3128
+ export apt_proxy=http://squid.internal:3128
+ sudo rm -Rf cloud-init
+ git clone https://git.launchpad.net/cloud-init
Cloning into 'cloud-init'...
+ cd cloud-init
+ ./packages/bddeb -S
Creating a temporary tarball using the 'make-tarball' helper
Extracting temporary tarball 'cloud-init_18.1-5-g40e77380.orig.tar.gz'
Creating a debian/ folder in '/tmp/tmpprhxfdyx/cloud-init-18.1-5-g40e77380'
Running 'debuild -S -us -uc' in '/tmp/tmpprhxfdyx/cloud-init-18.1-5-g40e77380'
Wrote 'cloud-init_18.1-5-g40e77380-1~bddeb.debian.tar.xz'
Wrote 'cloud-init_18.1-5-g40e77380.orig.tar.gz'
Wrote 'cloud-init_18.1-5-g40e77380-1~bddeb_source.build'
Wrote 'cloud-init_18.1-5-g40e77380-1~bddeb.dsc'
Linked 'cloud-init_18.1-5-g40e77380-1~bddeb.dsc' to 'cloud-init.dsc'
Wrote 'cloud-init_18.1-5-g40e77380-1~bddeb_source.changes'
+ sbuild --nolog --dist=xenial cloud-init_18.1-5-g40e77380-1~bddeb.dsc
sbuild (Debian sbuild) 0.71.0 (24 Aug 2016) on torkoal

+==============================================================================+
| cloud-init 18.1-5-g40e77380-1~bddeb (amd64) Fri, 02 Mar 2018 11:05:13 +0000 |
+==============================================================================+

Package: cloud-init
Version: 18.1-5-g40e77380-1~bddeb
Source Version: 18.1-5-g40e77380-1~bddeb
Distribution: xenial
Machine Architecture: amd64
Host Architecture: amd64
Build Architecture: amd64

I: NOTICE: Log filtering will replace 'var/lib/schroot/mount/xenial-amd64-b6cb28b7-fdea-41fd-b128-84de1b8f35c3' with '<<CHROOT>>'

+------------------------------------------------------------------------------+
| Update chroot |
+------------------------------------------------------------------------------+

Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-proposed InRelease [253 kB]
Get:5 http://security.ubuntu.com/ubuntu xenial-security/main Sources [117 kB]
Get:6 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [460 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial-updates/main Sources [299 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources [192 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [321 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [737 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [593 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial-proposed/main Sources [18.0 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial-proposed/universe S...

Chad Smith (chad.smith) wrote :
Download full text (502.0 KiB)

# Artful automated nocloud-kvm integration test logs from https://jenkins.ubuntu.com/server/view/cloud-init/job/cloud-init-integration-lxd-a/275/consoleFull

Started by upstream project "cloud-init-integration-lxd-x" build number 465
originally caused by:
 Started by timer
Building remotely on torkoal (metal-amd64) in workspace /var/lib/jenkins/slaves/torkoal/workspace/cloud-init-integration-lxd-a
[cloud-init-integration-lxd-a] $ /bin/sh -xe /tmp/jenkins7866899822674870610.sh
+ release=artful
+ export http_proxy=http://squid.internal:3128
+ export apt_proxy=http://squid.internal:3128
+ sudo rm -Rf cloud-init
+ git clone https://git.launchpad.net/cloud-init
Cloning into 'cloud-init'...
+ cd cloud-init
+ ./packages/bddeb -S
Creating a temporary tarball using the 'make-tarball' helper
Extracting temporary tarball 'cloud-init_18.1-5-g40e77380.orig.tar.gz'
Creating a debian/ folder in '/tmp/tmpgiu1usk0/cloud-init-18.1-5-g40e77380'
Running 'debuild -S -us -uc' in '/tmp/tmpgiu1usk0/cloud-init-18.1-5-g40e77380'
Wrote 'cloud-init_18.1-5-g40e77380-1~bddeb.debian.tar.xz'
Wrote 'cloud-init_18.1-5-g40e77380.orig.tar.gz'
Wrote 'cloud-init_18.1-5-g40e77380-1~bddeb_source.build'
Wrote 'cloud-init_18.1-5-g40e77380-1~bddeb.dsc'
Linked 'cloud-init_18.1-5-g40e77380-1~bddeb.dsc' to 'cloud-init.dsc'
Wrote 'cloud-init_18.1-5-g40e77380-1~bddeb_source.changes'
+ sbuild --nolog --dist=artful cloud-init_18.1-5-g40e77380-1~bddeb.dsc
sbuild (Debian sbuild) 0.71.0 (24 Aug 2016) on torkoal

+==============================================================================+
| cloud-init 18.1-5-g40e77380-1~bddeb (amd64) Fri, 02 Mar 2018 11:17:19 +0000 |
+==============================================================================+

Package: cloud-init
Version: 18.1-5-g40e77380-1~bddeb
Source Version: 18.1-5-g40e77380-1~bddeb
Distribution: artful
Machine Architecture: amd64
Host Architecture: amd64
Build Architecture: amd64

I: NOTICE: Log filtering will replace 'var/lib/schroot/mount/artful-amd64-369965b1-1c33-49f9-9f64-484f33ba4eb8' with '<<CHROOT>>'

+------------------------------------------------------------------------------+
| Update chroot |
+------------------------------------------------------------------------------+

Hit:1 http://archive.ubuntu.com/ubuntu artful InRelease
Get:2 http://security.ubuntu.com/ubuntu artful-security InRelease [78.6 kB]
Get:3 http://archive.ubuntu.com/ubuntu artful-updates InRelease [78.6 kB]
Get:4 http://archive.ubuntu.com/ubuntu artful-proposed InRelease [235 kB]
Get:5 http://security.ubuntu.com/ubuntu artful-security/main Sources [43.2 kB]
Get:6 http://security.ubuntu.com/ubuntu artful-security/universe amd64 Packages [46.1 kB]
Get:7 http://security.ubuntu.com/ubuntu artful-security/main amd64 Packages [136 kB]
Get:8 http://archive.ubuntu.com/ubuntu artful-updates/universe Sources [26.0 kB]
Get:9 http://archive.ubuntu.com/ubuntu artful-updates/main Sources [86.6 kB]
Get:10 http://archive.ubuntu.com/ubuntu artful-updates/universe amd64 Packages [89.9 kB]
Get:11 http://archive.ubuntu.com/ubuntu artful-updates/main amd64 Packages [216 kB]
Get:12 http://archive.ubuntu.com/ub...

Chad Smith (chad.smith) wrote :
Download full text (25.4 KiB)

# Manual EC2 upgrade and clean install validation Xenial and Artful
csmith@uptown:~$ cat > sethostname.yaml <<EOF
> #cloud-config
> hostname: SRU-worked
> EOF

csmith@uptown:~$ EC2_INST=`launch-ec2 --series $release -u sethostname.yaml | awk '/Found/{print $5}'`
csmith@uptown:~$ ssh $EC2_INST -- cat /run/cloud-init/result.json;
The authenticity of host 'ec2-18-217-3-83.us-east-2.compute.amazonaws.com (18.217.3.83)' can't be established.
ECDSA key fingerprint is SHA256:m1fSnv0w4fY4UEd/WJv5xhVr/im3uPHPDkltlPjdUZ0.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ec2-18-217-3-83.us-east-2.compute.amazonaws.com,18.217.3.83' (ECDSA) to the list of known hosts.
{
 "v1": {
  "datasource": "DataSourceEc2Local",
  "errors": []
 }
}
csmith@uptown:~$ ssh $EC2_INST -- grep Trace /var/log/cloud-init.log;

csmith@uptown:~$ ssh $EC2_INST "sudo sed -i 's/ $release / $release-proposed /' /etc/apt/sources.list"
sudo: unable to resolve host SRU-worked
csmith@uptown:~$ ssh $EC2_INST -- sudo apt-get update;
sudo: unable to resolve host SRU-worked
Get:1 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-proposed InRelease [253 kB]
Get:2 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:3 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:5 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-proposed/main Sources [18.3 kB]
Get:6 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-proposed/universe Sources [28.8 kB]
Get:7 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-proposed/main amd64 Packages [38.2 kB]
Get:8 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-proposed/main Translation-en [18.0 kB]
Get:9 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-proposed/universe amd64 Packages [35.7 kB]
Get:10 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-proposed/universe Translation-en [18.1 kB]
Get:11 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/main Sources [299 kB]
Get:12 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/restricted Sources [2,524 B]
Get:13 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/universe Sources [192 kB]
Get:14 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/multiverse Sources [7,968 B]
Get:15 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [737 kB]
Get:16 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [593 kB]
Get:17 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [240 kB]
Get:18 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [16.2 kB]
Get:19 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/multiverse Translation-en [8,052 B]
Get:20 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-backports/main Sources [3,432 B]
Get:21 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-backports/universe Sources [4,900 B]
Get:22 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-backports/main amd64 Pac...

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 17.2-35-gf576b2a2-0ubuntu1~17.10.2

---------------
cloud-init (17.2-35-gf576b2a2-0ubuntu1~17.10.2) artful-proposed; urgency=medium

  * cherry-pick 40e7738: GCE: fix reading of user-data that is not
    base64 encoded. (LP: #1752711)

 -- Chad Smith <email address hidden> Thu, 01 Mar 2018 16:03:46 -0700

Changed in cloud-init (Ubuntu Artful):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for cloud-init has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Chad Smith (chad.smith) wrote :

Validated as fixed in current GCE artful-proposed images.

Changed in cloud-init (Ubuntu Artful):
assignee: nobody → Chad Smith (chad.smith)
Changed in cloud-init (Ubuntu Xenial):
assignee: nobody → Chad Smith (chad.smith)
Changed in cloud-init (Ubuntu Bionic):
assignee: nobody → Scott Moser (smoser)
Changed in cloud-init:
assignee: nobody → Scott Moser (smoser)
Scott Moser (smoser) wrote :

This should be fixed in the latest released image on gce (20180303).
I filed https://bugs.launchpad.net/cloud-images/+bug/1753405 for the fact that it is *not* available in the latest daily.

Scott Moser (smoser) wrote :

$ cat /tmp/my.ud
#!/bin/sh
echo $(cat /proc/uptime) | tee /run/system-up

$ gcloud compute instances create smtest1 \
   --zone=us-central1-b --project=smoser-00 \
   --image-family ubuntu-1710 --image-project ubuntu-os-cloud \
   --metadata-from-file user-data=/tmp/my.ud

## then on node
% cat /etc/cloud/build.info
build_name: server
serial: 20180303

% cat /run/system-up
46.63 29.52

% cat /etc/cloud/build.info
build_name: server
serial: 20180303

% dpkg-query --show cloud-init
cloud-init 17.2-35-gf576b2a2-0ubuntu1~17.10.2

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 17.2-35-gf576b2a2-0ubuntu1~16.04.2

---------------
cloud-init (17.2-35-gf576b2a2-0ubuntu1~16.04.2) xenial-proposed; urgency=medium

  * cherry-pick 40e7738: GCE: fix reading of user-data that is not
    base64 encoded. (LP: #1752711)

cloud-init (17.2-35-gf576b2a2-0ubuntu1~16.04.1) xenial-proposed; urgency=medium

  * New upstream snapshot. (LP: #1747059)
    - tests: add support for logs with lxd from snap and future lxd 3.
    - EC2: Fix get_instance_id called against cached datasource pickle.
    - cli: fix cloud-init status to report running when before result.json
    - net: accept network-config in netplan format for renaming interfaces
    - Fix ssh keys validation in ssh_util [Tatiana Kholkina]

 -- Chad Smith <email address hidden> Thu, 01 Mar 2018 16:05:39 -0700

Changed in cloud-init (Ubuntu Xenial):
status: Fix Committed → Fix Released

This bug is believed to be fixed in cloud-init in 18.2. 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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers