Merge ~chad.smith/cloud-init/+git/sru-info:sru-bug-updates into ~smoser/cloud-init/+git/sru-info:master

Proposed by Chad Smith
Status: Merged
Merged at revision: 966dda4288da922e85e27fdf88ff8029e3197fda
Proposed branch: ~chad.smith/cloud-init/+git/sru-info:sru-bug-updates
Merge into: ~smoser/cloud-init/+git/sru-info:master
Diff against target: 1185 lines (+1071/-0)
19 files modified
bugs/1686514.txt (+39/-0)
bugs/1692093.txt (+33/-0)
bugs/lp-1636531.txt (+37/-0)
bugs/lp-1644064.txt (+41/-0)
bugs/lp-1645644.txt (+42/-0)
bugs/lp-1673637.txt (+46/-0)
bugs/lp-1676908.txt (+42/-0)
bugs/lp-1681531.txt (+64/-0)
bugs/lp-1682160.txt (+34/-0)
bugs/lp-1684349.txt (+181/-0)
bugs/lp-1685810.txt (+40/-0)
bugs/lp-1685935.txt (+18/-0)
bugs/lp-1687485.txt (+24/-0)
bugs/lp-1689346.txt (+121/-0)
bugs/lp-1689944.txt (+136/-0)
bugs/lp-1691551.txt (+41/-0)
bugs/lp-1692093.txt (+78/-0)
bugs/lp-1692097.txt (+24/-0)
bugs/lp-1693582.txt (+30/-0)
Reviewer Review Type Date Requested Status
Scott Moser Pending
Review via email: mp+325017@code.launchpad.net

Description of the change

couple of additional SRU bugs from May 2017 SRU.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/bugs/1686514.txt b/bugs/1686514.txt
0new file mode 1006440new file mode 100644
index 0000000..2a6c74a
--- /dev/null
+++ b/bugs/1686514.txt
@@ -0,0 +1,39 @@
1http://pad.lv/1686514
2https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1686514
3
4=== Begin SRU Template ===
5[Impact]
6VMs on MS Azure have an ephemeral disk attached to them. On first boot,
7the disk has a empty ntfs formated filesystem. Cloud-init is expected
8to notice that the empty ntfs filesystem should be reformatted with
9a more linux-friendly ext4 filesystem. This function is working as
10expected.
11
12However, the user can 'redeploy' a VM to a new azure host, or stop and
13deallocate the vm for some time and then restart/reallocate the vm. After
14that operation, a pristine ephemeral disk is attached. Cloud-init is
15expected to re-format this pristine ephemeral disk, but clearly not
16reformat a disk with user's data on it. On large (L32) size VMs, azure
17presents a GPT formatted disk with 2 partitions where the second partition
18is ntfs. Cloud-init currently does not consider disks with 2 partitions
19to be re-formattable.
20
21[Test Case]
22Test cases:
23 1. Deploy an L32(s) VM on Azure
24 2. Log in and ensure that the ephemeral disk is formatted and mounted to /mnt
25 3. Via the portal you can "Redeploy" the VM to a new Azure Host (or alternatively stop and deallocate the VM for some time, and then restart/reallocate the VM).
26
27Expected Results:
28 - After reallocation we expect the ephemeral disk to be formatted and mounted to /mnt.
29
30Actual Results:
31 - After reallocation /mnt is not mounted and there are errors in the cloud-init log.
32
33[Regression Potential]
34
35[Other Info]
36Upstream commit at
37 https://git.launchpad.net/cloud-init/commit/?id=XXXXXXXXXX
38
39=== End SRU Template ===
diff --git a/bugs/1692093.txt b/bugs/1692093.txt
0new file mode 10064440new file mode 100644
index 0000000..cfd0654
--- /dev/null
+++ b/bugs/1692093.txt
@@ -0,0 +1,33 @@
1http://pad.lv/1692093
2https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1692093
3
4=== Begin SRU Template ===
5[Impact]
6VMs on MS Azure have an ephemeral disk attached to them.
7On first boot, cloud-init properly notices the empty ntfs filesystem and
8reformats it ext4.
9
10After deallocating the instance or moving to a new azure host,
11the filesystem reformat is logged, but isn't actually performed because
12the udev device creation may not have settled.
13
14[Test Case]
15Test cases:
16 1. Deploy an instance VM on Azure
17 2. Log in and ensure that the ephemeral disk is formatted and mounted to /mnt
18 3. Via the portal you can "Redeploy" the VM to a new Azure Host (or alternatively stop and deallocate the VM for some time, and then restart/reallocate the VM).
19
20Expected Results:a
21 - Check cloud-init.log expecting to see logs from cc_disk_setup about the mount.
22 - After reallocation we expect the ephemeral disk to be formatted and mounted to /mnt.
23
24Actual Results:
25 - After reallocation /mnt is not mounted and there are errors in the cloud-init log.
26
27[Regression Potential]
28
29[Other Info]
30Upstream commit at
31 https://git.launchpad.net/cloud-init/commit/?id=1815c6d801933c47a01f1a94a8e689824f6797b4
32
33=== End SRU Template ===
diff --git a/bugs/lp-1636531.txt b/bugs/lp-1636531.txt
0new file mode 10064434new file mode 100644
index 0000000..a374439
--- /dev/null
+++ b/bugs/lp-1636531.txt
@@ -0,0 +1,37 @@
1https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1636531
2http://pad.lv/1636531
3
4=== Begin SRU Template ===
5[Impact]
6 Unit test updates to avoid leaking blkid calls from tests/unittests/test_datasource/test_altcloud.py.
7
8[Test Case]
9
10wget https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/plain/bin/lxc-proposed-snapshot
11chmod 755 lxc-proposed-snapshot
12
13
14# Create fake-blkid.sh
15cat fake-blkid.sh
16#!/bin/bash
17echo "LEAKED BLKID CALL"
18
19name=proposed-test
20for release in xenial yakkety zesty; do \
21 ref=$release-proposed;
22 lxc-proposed-snapshot --proposed --publish $release $ref;
23 lxc init $ref $name;
24 lxc start $name;
25 sleep 10;
26 lxc exec $name mv /sbin/blkid /sbin/blkid.orig;
27 lxc file push fake-flkid.sh $name/sbin/blkid
28 lxc exec $name git clone -b ubuntu/xenial https://git.launchpad.net/cloud-init
29 tox -e py27 tests/unittests/test_datasource/test_altcloud.py | grep 'LEAKED BLKID';
30done
31
32[Regression Potential]
33None. Unit test changes only
34
35[Other Info]
36
37=== End SRU Template ===
diff --git a/bugs/lp-1644064.txt b/bugs/lp-1644064.txt
0new file mode 10064438new file mode 100644
index 0000000..5fb23fb
--- /dev/null
+++ b/bugs/lp-1644064.txt
@@ -0,0 +1,41 @@
1https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1644064
2http://pad.lv/1644064
3
4=== Begin SRU Template ===
5[Impact]
6Existing security permissions on /etc/ssh/sshd_config file not honored.
7
8[Test Case]
9if [ ! -f lxc-proposed-snapshot ]; then
10 wget https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/plain/bin/lxc-proposed-snapshot
11 chmod 755 lxc-proposed-snapshot
12fi
13
14cat << EOF > config.yaml
15#cloud-config
16ntp:
17 pools: [1.ntp.mypool]
18 servers: [my.server.nonpool]
19EOF
20
21for release in xenial yaketty zesty; do
22 ref=$release-proposed;
23 echo "$release START --------------";
24 ./lxc-proposed-snapshot --proposed --install ntp --publish $release $ref;
25 lxc init $ref test-$release;
26 lxc config set test-$release user.user-data - < config.yaml
27 lxc start test-$release;
28 sleep 10
29 # Should not see [0-3].ubuntu.pool.n
30 lxc exec test-$release -- ntpq -p
31 echo "$release DONE --------------";
32done
33
34
35[Regression Potential]
36Minimal ntp service confguration could be stale if this breaks anything.
37It is minimal regression potential as the fix only reorders the creation of /etc/ntp.conf prior to the package intall and adds a call to service ntp restart.
38
39[Other Info]
40
41=== End SRU Template ===
diff --git a/bugs/lp-1645644.txt b/bugs/lp-1645644.txt
0new file mode 10064442new file mode 100644
index 0000000..3ba10bf
--- /dev/null
+++ b/bugs/lp-1645644.txt
@@ -0,0 +1,42 @@
1
2http://pad.lv/1645644
3http://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1645644
4
5
6=== Begin SRU Template ===
7[Impact]
8Existing security permissions on /etc/ssh/sshd_config file not honored.
9
10[Test Case]
11if [ ! -f lxc-proposed-snapshot ]; then
12  wget https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/plain/bin/lxc-proposed-snapshot
13  chmod 755 lxc-proposed-snapshot
14fi
15
16cat << EOF > config.yaml
17#cloud-config
18ntp:
19  pools: [1.ntp.mypool]
20  servers: [my.server.nonpool]
21EOF
22
23for release in xenial yakkety zesty; do
24        ref=$release-proposed;
25        echo "$release START --------------";
26        ./lxc-proposed-snapshot --proposed --install ntp --publish $release $ref;
27        lxc init $ref test-$release;
28        lxc config set test-$release user.user-data - < config.yaml
29        lxc start test-$release;
30        sleep 10
31        # Should not see [0-3].ubuntu.pool.n
32        lxc exec test-$release -- ntpq -p
33        echo "$release DONE --------------";
34done
35
36[Regression Potential]
37Minimal ntp service confguration could be stale if this breaks anything.
38It is minimal regression potential as the fix only reorders the creation of /etc/ntp.conf prior to the package intall and adds a call to service ntp restart.
39
40[Other Info]
41
42=== End SRU Template ===
diff --git a/bugs/lp-1673637.txt b/bugs/lp-1673637.txt
0new file mode 10064443new file mode 100644
index 0000000..e1cec15
--- /dev/null
+++ b/bugs/lp-1673637.txt
@@ -0,0 +1,46 @@
1http://pad.lv/1673637
2https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1673637
3
4=== Begin cloud-init SRU Template ===
5[Impact]
6Softcloud user datasource is undetected when only openstack/latest config-drive is provided.
7
8[Test Case]
9
10For cloud-init, the easiest way to demonstrate this is to
11create a lxc container and populate it with a '/config-drive' that only contains a openstack/latest path.
12
13wget https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/plain/bin/lxc-proposed-snapshot
14chmod 755 lxc-proposed-snapshot
15wget https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/plain/tools/make-configdrive-dir
16chmod 755 make-configdrive-dir
17name=test-proposed
18
19for release in xenial yaketty zesty; do
20 ref=$release-proposed;
21 ./lxc-proposed-snapshot --proposed --publish $release $ref;
22 ./lxc init $ref $name;
23
24## populate a /config-drive with attached 'make-config-drive-dir'
25## and push it to the container
26
27 d=$(mktemp -d)
28 ./make-configdrive-dir "$d" "$name"
29 rm -Rf "$d"
30 lxc file pull $name/etc/cloud/cloud.cfg.d/90_dpkg.cfg - |
31 sed 's/NoCloud, //' |
32 lxc file push - $name/etc/cloud/cloud.cfg.d/90_dpkg.cfg;
33
34
35 lxc start $name
36 sleep 10
37 lxc exec $name cp -r /config-drive /var/lib/cloud/seed/config_drive
38 lxc exec $name rm -rf /var/lib/cloud/seed/config_drive/openstack/2015-10-15
39 lxc exec $name sudo DEBUG_LEVEL=2 DI_LOG=stderr /usr/lib/cloud-init/ds-identify --force 2>&1 | grep latest
40
41
42[Regression Potential]
43
44[Other Info]
45
46=== End cloud-init SRU Template ===
diff --git a/bugs/lp-1676908.txt b/bugs/lp-1676908.txt
0new file mode 10064447new file mode 100644
index 0000000..46b30a3
--- /dev/null
+++ b/bugs/lp-1676908.txt
@@ -0,0 +1,42 @@
1https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1676908
2http://pad.lv/1676908
3
4=== Begin SRU Template ===
5[Impact]
6DigitalOcean instances are unable to bind nameserves to multiple interfaces.
7
8[Test Case]
9
10wget https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/plain/bin/lxc-proposed-snapshot
11chmod 755 lxc-proposed-snapshot
12
13
14# create config.yaml
15cat config.yaml
16#cloud-config
17ssh_pwauth: true
18
19name=proposed-test
20for release in xenial yakkety zesty; do \
21 ref=$release-proposed;
22 lxc-proposed-snapshot --proposed --publish $release $ref;
23 lxc init $ref $name;
24 lxc start $name;
25 sleep 10;
26 lxc file pull $name/etc/ssh/sshd_config .;
27 chmod 600 sshd_config;
28 lxc file push sshd_config $name/etc/ssh/sshd_config;
29 lxc config set $name user.user-data - < config.yml;
30 lxc start;
31 sleep 10;
32 lxc exec $name ls -ltr /etc/ssh/sshd_config; # should remain 600
33 lxc stop $name;
34 lxc delete $name;
35done
36
37[Regression Potential]
38Minimal as we are now honoring file permissions if an sshd_config file exists.
39
40[Other Info]
41
42=== End SRU Template ===
diff --git a/bugs/lp-1681531.txt b/bugs/lp-1681531.txt
0new file mode 10064443new file mode 100644
index 0000000..7ed04e7
--- /dev/null
+++ b/bugs/lp-1681531.txt
@@ -0,0 +1,64 @@
1http://pad.lv/1681531
2https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1681531
3
4
5[Impact]
6The cloud-init datasource for DigitalOcean allows for multiple gateways on any NIC.
7
8On Ubuntu 16.04, this breaks networking.service. For 17.04 and later, Ubuntu _replaces_ the default gateway with the second gateway on 'ifup' after reboot.
9
10DigitalOcean is looking at changing the meta-data, however, this will result in another version of the meta-data JSON.
11
12[Regression Potential]
13
14Low. This change is scope to DigitalOcean only. DigitalOcean has tested this Datasource exhaustively.
15
16[TEST Cases]
17- provision on DigitalOcean with a private IP
18- reboot
19- confirm that a single route exists in /etc/network/interfaces
20
21[LOGS]
22
23----------------------------------------------------------------------------------------------
24From /var/log/cloud-init.log:
25
262017-04-10 17:36:11,608 - util.py[DEBUG]: Running command ['ip', 'link', 'set', 'ens3', 'down'] with allowed return codes [0] (shell=False, capture=True)
272017-04-10 17:36:11,615 - util.py[DEBUG]: Running command ['ip', 'link', 'set', 'ens3', 'name', 'eth0'] with allowed return codes [0] (shell=False, capture=True)
282017-04-10 17:36:11,635 - util.py[DEBUG]: Running command ['ip', 'link', 'set', 'ens4', 'name', 'eth1'] with allowed return codes [0] (shell=False, capture=True)
292017-04-10 17:36:11,651 - util.py[DEBUG]: Running command ['ip', 'link', 'set', 'eth0', 'up'] with allowed return codes [0] (shell=False, capture=True)
302017-04-10 17:36:11,654 - stages.py[INFO]: Applying network configuration from ds bringup=False: {'version': 1, 'config': [{'name': 'eth0', 'subnets': [{'address': '138.197.88.85', 'netmask': '255.255.240.0', 'gateway': '138.197.80.1', 'type': 'static', 'control': 'auto'}, {'address': '2604:A880:0800:0010:0000:0000:2ECE:D001/64', 'gateway': '2604:A880:0800:0010:0000:0000:0000:0001', 'type': 'static', 'control': 'auto'}, {'address': '10.17.0.10', 'netmask': '255.255.0.0', 'type': 'static', 'control': 'auto'}], 'mac_address': 'ee:90:f2:c6:dc:db', 'type': 'physical'}, {'name': 'eth1', 'subnets': [{'address': '10.132.92.131', 'netmask': '255.255.0.0', 'gateway': '10.132.0.1', 'type': 'static', 'control': 'auto'}], 'mac_address': '1a:b6:7c:24:5e:cd', 'type': 'physical'}, {'address': ['2001:4860:4860::8844', '2001:4860:4860::8888', '8.8.8.8'], 'type': 'nameserver'}]}
312017-04-10 17:36:11,668 - util.py[DEBUG]: Writing to /etc/network/interfaces.d/50-cloud-init.cfg - wb: [420] 868 bytes
322017-04-10 17:36:11,669 - main.py[DEBUG]: [local] Exiting. datasource DataSourceDigitalOcean not in local mode.
332017-04-10 17:36:11,674 - util.py[DEBUG]: Reading from /proc/uptime (quiet=False)
34
35----------------------------------------------------------------------------------------------
36From 'dmesg':
37Apr 10 17:36:11 ubuntu systemd[1]: Started Initial cloud-init job (pre-networking).
38Apr 10 17:36:12 ubuntu systemd[1]: Started LSB: AppArmor initialization.
39Apr 10 17:36:12 ubuntu systemd[1]: Reached target Network (Pre).
40Apr 10 17:36:12 ubuntu systemd[1]: Starting Raise network interfaces...
41Apr 10 17:36:13 ubuntu ifup[1099]: Waiting for DAD... Done
42Apr 10 17:36:13 ubuntu ifup[1099]: RTNETLINK answers: File exists
43Apr 10 17:36:13 ubuntu ifup[1099]: Failed to bring up eth1.
44
45----------------------------------------------------------------------------------------------
46$ sudo journalctl -xe -u networking
47Apr 10 17:36:12 ubuntu systemd[1]: Starting Raise network interfaces...
48-- Subject: Unit networking.service has begun start-up
49-- Defined-By: systemd
50-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
51--
52-- Unit networking.service has begun starting up.
53Apr 10 17:36:13 ubuntu ifup[1099]: Waiting for DAD... Done
54Apr 10 17:36:13 ubuntu ifup[1099]: RTNETLINK answers: File exists
55Apr 10 17:36:13 ubuntu ifup[1099]: Failed to bring up eth1.
56Apr 10 17:36:13 ubuntu systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
57Apr 10 17:36:13 ubuntu systemd[1]: Failed to start Raise network interfaces.
58-- Subject: Unit networking.service has failed
59-- Defined-By: systemd
60-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
61--
62-- Unit networking.service has failed.
63--
64
diff --git a/bugs/lp-1682160.txt b/bugs/lp-1682160.txt
0new file mode 10064465new file mode 100644
index 0000000..d794a45
--- /dev/null
+++ b/bugs/lp-1682160.txt
@@ -0,0 +1,34 @@
1https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1682160
2http://pad.lv/1674766
3
4=== Begin SRU Template ===
5[Impact]
6update-grub-legacy-ec2 fails on system with missing /etc/fstab.
7
8[Test Case]
9
10Mimic missing /etc/fstab config using lxc-proposed-snapshot from
11 https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/tree/bin/lxc-proposed-snapshot
12
13It publishes an image to lxd with proposed enabled and cloud-init upgraded.
14
15$ for release in xenial yakkety zesty; do
16$ ref=$release-proposed
17$ lxc-proposed-snapshot --proposed --publish $release $ref
18$ lxc init $ref $name
19$ lxc start $name
20$ sleep 10
21$ lxc exec $name apt install grub-legacy-ec2
22$ lxc exec $name mv /etc/fstab /etc/fstab.orig
23$ lxc exec $name dpkg-reconfigure grub-legacy-ec2
24
25# Ensure error message does not exist "This error is probably caused by an invalid /etc/fstab"
26
27[Regression Potential]
28Low. oneliner in a script
29
30[Other Info]
31Upstream commit:
32 https://git.launchpad.net/cloud-init/commit/?id=fd9f36267541
33
34=== End SRU Template ===
diff --git a/bugs/lp-1684349.txt b/bugs/lp-1684349.txt
0new file mode 10064435new file mode 100644
index 0000000..718eb75
--- /dev/null
+++ b/bugs/lp-1684349.txt
@@ -0,0 +1,181 @@
1http://pad.lv/1684349
2https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1684349
3
4
5=== Begin SRU Template ===
6[Impact]
7On Openstack instances, when rendering sysconfig output, cloud-init
8would stacktrace due to a TypeError.
9This affects runtime only when rendering sysconfig networking, which
10is what is used on CentOS and RedHat systems.
11
12[Test Case]
13The basic idea below is:
14 a.) launch an instance with proposed version of cloud-init.
15 b.) inside instance, get cloud-init's network rendering tool from trunk
16 c.) run the rendering tool against a config that failed before.
17 d.) check rendered netplan config to verify it has the correct format.
18     The failed output would have 'addresses' with a format like:
19     172.19.1.34/255.255.255.0
20     The expected output would be 'cidr' format:
21     172.19.1.34/24
22
23## launch an instance.
24$ release=xenial
25$ ref=$release-proposed
26$ lxc-proposed-snapshot --proposed --publish $release $ref
27$ lxc launch $ref $name
28$ lxc exec $name
29
30## get render tool
31% wget https://git.launchpad.net/~cloud-init-dev/cloud-init/plain/tools/net-convert.py -O net-convert.py
32
33## write the network_data.json
34% cat > simple-ipv6.yaml <<EOF
35version: 1
36config:
37  - type: physical
38    name: eth0
39    subnets:
40     - type: static
41       address: "2000:192:168::5"
42       netmask: 64
43       routes:
44        - netmask: 0
45          gateway: "2000:192:168::1"
46          network: "::"
47EOF
48
49## run the converter
50% ./net-convert.py --network-data=simple-ipv6.yaml \
51     --kind=yaml --output-kind=eni --directory=out.d
52
53## check the output
54% cat out.d/etc/network/interfaces
55auto lo
56iface lo inet loopback
57
58auto eth0
59iface eth0 inet6 static
60    address 2000:192:168::5
61    netmask 64
62    post-up route add -A inet6 default gw 2000:192:168::1 || true
63    pre-down route del -A inet6 default gw 2000:192:168::1 || true
64
65## show the cloud-init versions
66% dpkg-query --show cloud-init
67...
68
69[Regression Potential]
70The fix here was just to make a common networking method accept
71a string input as intended rather than only an integer.
72
73The common code changes could shake out other failures in the networking
74path.
75
76[Other Info]
77Upstream commit at
78  https://git.launchpad.net/cloud-init/commit/?id=16a7302f6a
79
80lxc-proposed-snapshot is
81  https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/tree/bin/lxc-proposed-snapshot
82It publishes an image to lxd with proposed enabled and cloud-init upgraded.
83=== End SRU Template ===
84
85mask2cidr error with integer value - argument of type 'int' is not iterable
86
87~~~
88def mask2cidr(mask):
89    if ':' in str(mask):
90        return ipv6mask2cidr(mask)
91    elif '.' in mask:
92        return ipv4mask2cidr(mask)
93    else:
94        return mask
95~~~
96
97is not type safe. It tries to take into account that this can be a prefix (so it does not contain ':' not '.' and then return mask. The problem is that if mask is an integer, then this returns:
98
99~~~
100Traceback (most recent call last):
101  File "/usr/lib/python2.7/site-packages/cloudinit/cmd/main.py", line 513, in status_wrapper
102    ret = functor(name, args)
103  File "/usr/lib/python2.7/site-packages/cloudinit/cmd/main.py", line 269, in main_init
104    init.apply_network_config(bring_up=bool(mode != sources.DSMODE_LOCAL))
105  File "/usr/lib/python2.7/site-packages/cloudinit/stages.py", line 641, in apply_network_config
106    return self.distro.apply_network_config(netcfg, bring_up=bring_up)
107  File "/usr/lib/python2.7/site-packages/cloudinit/distros/__init__.py", line 150, in apply_network_config
108    dev_names = self._write_network_config(netconfig)
109  File "/usr/lib/python2.7/site-packages/cloudinit/distros/rhel.py", line 59, in _write_network_config
110    ns = parse_net_config_data(netconfig)
111  File "/usr/lib/python2.7/site-packages/cloudinit/net/network_state.py", line 32, in parse_net_config_data
112    nsi.parse_config(skip_broken=skip_broken)
113  File "/usr/lib/python2.7/site-packages/cloudinit/net/network_state.py", line 205, in parse_config
114    handler(self, command)
115  File "/usr/lib/python2.7/site-packages/cloudinit/net/network_state.py", line 78, in decorator
116    return func(self, command, *args, **kwargs)
117  File "/usr/lib/python2.7/site-packages/cloudinit/net/network_state.py", line 239, in handle_physical
118    subnet['netmask'] = mask2cidr(subnet['netmask'])
119  File "/usr/lib/python2.7/site-packages/cloudinit/net/network_state.py", line 441, in mask2cidr
120    elif '.' in mask:
121~~~
122
123Made a modification to the code to troubleshoot this:
124~~~
125       # convert subnet ipv6 netmask to cidr as needed
126        subnets = command.get('subnets')
127        print subnets
128        if subnets:
129            for subnet in subnets:
130                if subnet['type'] == 'static':
131                    if 'netmask' in subnet and ':' in subnet['address']:
132                        subnet['netmask'] = mask2cidr(subnet['netmask'])
133                        for route in subnet.get('routes', []):
134                            if 'netmask' in route:
135                                route['netmask'] = mask2cidr(route['netmask'])
136~~~
137
138This error can be hit on RHEL when running the following 2x (don't know why 2x):
139
140 rm -Rf /var/lib/cloud/data/* ; cloud-init --force init
141
142On the second run, this will be returned:
143~~~
144Traceback (most recent call last):
145  File "/usr/lib/python2.7/site-packages/cloudinit/cmd/main.py", line 513, in status_wrapper
146    ret = functor(name, args)
147  File "/usr/lib/python2.7/site-packages/cloudinit/cmd/main.py", line 269, in main_init
148    init.apply_network_config(bring_up=bool(mode != sources.DSMODE_LOCAL))
149  File "/usr/lib/python2.7/site-packages/cloudinit/stages.py", line 641, in apply_network_config
150    return self.distro.apply_network_config(netcfg, bring_up=bring_up)
151  File "/usr/lib/python2.7/site-packages/cloudinit/distros/__init__.py", line 150, in apply_network_config
152    dev_names = self._write_network_config(netconfig)
153  File "/usr/lib/python2.7/site-packages/cloudinit/distros/rhel.py", line 59, in _write_network_config
154    ns = parse_net_config_data(netconfig)
155  File "/usr/lib/python2.7/site-packages/cloudinit/net/network_state.py", line 32, in parse_net_config_data
156    nsi.parse_config(skip_broken=skip_broken)
157  File "/usr/lib/python2.7/site-packages/cloudinit/net/network_state.py", line 205, in parse_config
158    handler(self, command)
159  File "/usr/lib/python2.7/site-packages/cloudinit/net/network_state.py", line 78, in decorator
160    return func(self, command, *args, **kwargs)
161  File "/usr/lib/python2.7/site-packages/cloudinit/net/network_state.py", line 239, in handle_physical
162    subnet['netmask'] = mask2cidr(subnet['netmask'])
163  File "/usr/lib/python2.7/site-packages/cloudinit/net/network_state.py", line 441, in mask2cidr
164    elif '.' in mask:
165TypeError: argument of type 'int' is not iterable
166------------------------------------------------------------
167[{u'routes': [{u'netmask': u'0.0.0.0', u'network': u'0.0.0.0', u'gateway': u'192.168.0.1'}], u'netmask': u'255.255.255.0', u'type': 'static', 'ipv4': True, 'address': u'192.168.0.11'}, {u'routes': [{u'netmask': 0, u'network': u'::', u'gateway': u'2000:192:168::1'}], u'netmask': 64, 'ipv6': True, u'type': 'static', 'address': u'2000:192:168::4'}]
168~~~
169
170not the `u'netmask': 64` integer
171
172This can be fixed by changing the code to:
173~~~
174def mask2cidr(mask):
175    if ':' in str(mask):
176        return ipv6mask2cidr(mask)
177    elif '.' in str(mask):
178        return ipv4mask2cidr(mask)
179    else:
180        return mask
181~~~
diff --git a/bugs/lp-1685810.txt b/bugs/lp-1685810.txt
0new file mode 100644182new file mode 100644
index 0000000..b15f7a3
--- /dev/null
+++ b/bugs/lp-1685810.txt
@@ -0,0 +1,40 @@
1http://pad.lv/1685810
2https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1685810
3
4=== Begin SRU Template ===
5[Impact]
6Warning message for nova-lxd images in openstack clouds due to no valid datasource found.
7
8[Test Case]
9# It downloads a cloud image of a given release, and then creates a -proposed
10image with cloud-init upgraded.
11wget https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/plain/bin/lxc-proposed-snapshot
12chmod 755 get-proposed-image
13
14source novarc
15
16for release in xenial yakkety zesty do;
17 ref=$release-proposed;
18 lxc-proposed-snapshot --proposed --publish $release $ref;
19 lxc image export $ref .;
20 imagefile=`ls -tr *gz | tail -n 1`
21 mkdir $ref;
22 cd $ref;
23 tar -zxvf ../$imagefile;
24 cd rootfs;
25 tar zcvf $ref.tar.gz *;
26 #upload raw image to your cloud
27 openstack image create --disk-format raw --container-format bare --file $ref.tar.gz testing/$ref.tar.gz;
28 openstack server create --image testing/$ref.tar.gz --flavor=m1.tiny lxd-$release --key-name <your-key>;
29 nova floating-ip-create;
30 nova foating-ip-associate <server> <address>;
31 ssh ubuntu@<address> 'sudo DEBUG_LEVEL=2 DI_LOG=stderr /usr/lib/cloud-init/ds-identify --force 2>&1 | grep Found'; # single datasource: OpenStack
32done
33
34[Regression Potential]
35Low as this only addresses the warning by correctly identifying the OpenStack cloud datasource.
36
37
38[Other Info]
39
40=== End SRU Template ===
diff --git a/bugs/lp-1685935.txt b/bugs/lp-1685935.txt
0new file mode 10064441new file mode 100644
index 0000000..4d4fb50
--- /dev/null
+++ b/bugs/lp-1685935.txt
@@ -0,0 +1,18 @@
1
2http://pad.lv/1685935
3https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1685935
4
5
6=== Begin SRU Template ===
7[Impact]
8Minor tweak to Makefile target make deb to announce missing devscripts package dependency in developer environments.
9
10[Test Case]
11No test case as this Makefile and related bddeb script are developer tools and aren't part of cloud-init deb package.
12
13[Regression Potential]
14None
15[Other Info]
16
17=== End SRU Template ===
18
diff --git a/bugs/lp-1687485.txt b/bugs/lp-1687485.txt
0new file mode 10064419new file mode 100644
index 0000000..4dd858f
--- /dev/null
+++ b/bugs/lp-1687485.txt
@@ -0,0 +1,24 @@
1http://pad.lv/1687485
2https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1687485
3
4
5=== Begin SRU Template ===
6[Impact]
7This code path is not applicable to Ubuntu.
8The bug resolved properly detecting and raising ValueErrors if multiple default
9gateways were defined in ipv4 or or ipv6 addresses for sysconfig
10(Redhat/centos) format.
11
12[Test Case]
13Launch an instance on lxd, make sure it has network.
14
15[Regression Potential]
16Changes to network rendering could have negatively affected Ubuntu
17the test above is valid to check that that didn't go horribly wrong.
18
19[Other Info]
20Upstream commit:
21 https://git.launchpad.net/cloud-init/commit/?id=dd03bb411c9a6f10854a3bbc3223b204c3d4d174
22
23=== End SRU Template ===
24
diff --git a/bugs/lp-1689346.txt b/bugs/lp-1689346.txt
0new file mode 10064425new file mode 100644
index 0000000..1b191bb
--- /dev/null
+++ b/bugs/lp-1689346.txt
@@ -0,0 +1,121 @@
1http://pad.lv/1689346
2https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1689346
3
4
5=== Begin SRU Template ===
6[Impact]
7On Openstack instances, cloud-init incorrectly rendered netplan
8configuration files. The result is that networking does not work
9as expected.
10
11Note that this is not a default configuration on any Ubuntu provided images.
12Default images use ifupdown (eni) rendering which did not have this issue.
13
14[Test Case]
15The basic idea below is:
16 a.) launch an instance with proposed version of cloud-init.
17 b.) inside instance, get cloud-init's network rendering tool from trunk
18 c.) run the rendering tool against a config that failed before.
19 d.) check rendered netplan config to verify it has the correct format.
20 The failed output would have 'addresses' with a format like:
21 172.19.1.34/255.255.255.0
22 The expected output would be 'cidr' format:
23 172.19.1.34/24
24
25## launch an instance.
26$ release=xenial
27$ ref=$release-proposed
28$ lxc-proposed-snapshot --proposed --publish $release $ref
29$ lxc init $ref $name
30
31## get render tool
32$ wget https://git.launchpad.net/~cloud-init-dev/cloud-init/plain/tools/net-convert.py -O net-convert.py
33
34## write the network_data.json
35$ cat >network_data.json <<EOF
36{
37 "links": [
38 {"ethernet_mac_address": "aa:ab:ac:ad:ae:00",
39 "id": "tap1a", "type": "phy", "vif_id": "1a81968a"}
40 ],
41 "networks": [
42 {"id": "network0", "ip_address": "172.19.1.34", "link": "tap1a",
43 "netmask": "255.255.255.0", "network_id": "dacd568d", "type": "ipv4",
44 "routes": [
45 {"gateway": "172.19.3.254", "netmask": "0.0.0.0",
46 "network": "0.0.0.0"}]}
47 ],
48 "services": [{"address": "172.19.0.12", "type": "dns"}]
49}
50EOF
51
52## run the converter
53$ ./net-convert.py --network-data=network_data.json \
54 --kind=network_data.json --output-kind=netplan \
55 -m eth1,aa:ab:ac:ad:ae:00 --directory=./out.d
56
57
58## check the output
59$ cat out.d/etc/netplan/50-cloud-init.yaml
60network:
61 version: 2
62 ethernets:
63 eth1:
64 addresses:
65 - 172.19.1.34/24
66 match:
67 macaddress: aa:ab:ac:ad:ae:00
68 nameservers:
69 addresses:
70 - 172.19.0.12
71 routes:
72 - to: 0.0.0.0/0
73 via: 172.19.3.254
74 set-name: eth1
75
76## show the cloud-init versions
77$ dpkg-query --show cloud-init
78...
79
80[Regression Potential]
81The change is fairly safe in that it basically renders:
82 172.19.1.34/24
83instead of
84 172.19.1.34/255.255.255.0
85
86The previous rendering just plain did not work as it is not valid
87input for netplan. So the regression path there should be low.
88
89The common code changes could shake out other failures in the networking
90path.
91
92[Other Info]
93Upstream commit at
94 https://git.launchpad.net/cloud-init/commit/?id=16a7302f6a
95
96lxc-proposed-snapshot is
97 https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/tree/bin/lxc-proposed-snapshot
98It publishes an image to lxd with proposed enabled and cloud-init upgraded.
99=== End SRU Template ===
100
101
102networking data josn has:
103
104"ip_address" : "104.130.20.155",
105"netmask" : "255.255.255.0"
106
107"ip_address" : "10.184.3.234",
108"netmask" : "255.255.240.0",
109
110that got rendered into nplan as:
111 - 104.130.20.155/255.255.255.0
112 - 10.184.3.234/255.255.240.0
113
114which it failed to parse
115
116Stderr: Error in network definition //etc/netplan/50-cloud-init.yaml line 32 column 12: invalid prefix length in address '104.130.20.155/255.255.255.0'
117
118I believe nplan is expecing CIDR notation of /24 or some such. I belive the current plan is to fix cloud-init to generate /24 cidr notation in the nplan renderer.
119
120This needs SRU into xenial.
121
diff --git a/bugs/lp-1689944.txt b/bugs/lp-1689944.txt
0new file mode 100644122new file mode 100644
index 0000000..4b4daaf
--- /dev/null
+++ b/bugs/lp-1689944.txt
@@ -0,0 +1,136 @@
1http://pad.lv/1689944
2https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1689944
3
4
5=== Begin SRU Template ===
6[Impact]
7Cloud-init when running in Ubuntu core does not recognize it is
8running on a 'snappy. As a result the snappy specific code paths are not
9taken.
10
11[Test Case]
12There are fairly extensive unit tests added to cover the code path
13that has been added to detect when system is snappy. See the upstream
14commit link below for that. Those tests run on package build, so
15the fact that this is in the archive means those have run.
16
17In addition to that we will:
18a.) boot an instance of Ubuntu in lxd with cloud-init from proposed
19 to verify it is not regressed.
20b.) craft an lxd instance with /etc/os-release that appears to be snappy.
21 and then verify via log inspection that it thinks it is.
22
23The test is admittedly superficial, the real end test is having cloud-init
24inside a ubuntu core image and it recognizing that it is snappy there.
25That test is much more involved.
26
27## launch an instance
28$ release=xenial
29$ ref=$release-proposed
30$ lxc-proposed-snapshot --proposed --publish $release $ref
31$ lxc launch $ref $name
32$ lxc exec $name
33
34## let it boot
35$ sleep 10
36## check log for warnings
37$ lxc exec $name -- cat /run/cloud-init/result.json
38{
39 "v1": {
40 "datasource": "DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net]",
41 "errors": []
42 }
43}
44
45$ lxc exec $name -- grep WARN /var/log/cloud-init.log || echo no warnings
46no warnings
47
48
49## write to /etc/os-release so it thinks it is Ubuntu core.
50$ lxc exec $name -- sh -c 'echo ID=ubuntu-core >> /etc/os-release'
51$ lxc exec $name -- sh -c 'd=/etc/system-image; mkdir -p $d; cd $d; echo ubuntu-core > channel.ini'
52
53## Now clear the instance state so it thinks it is first boot.
54$ lxc exec $name -- sh -c 'rm -Rf /var/log/cloud-init*'
55$ lxc exec $name -- sh -xec 'cd /var/lib/cloud; mv seed .x; rm -Rf *; mv .x seed'
56+ cd /var/lib/cloud
57+ mv seed .x
58+ rm -Rf data handlers instance instances scripts sem
59+ mv .x seed
60
61$ lxc restart $name
62$ sleep 10
63$ lxc exec $name -- grep "running on snappy" /var/log/cloud-init.log
642017-06-01 20:53:24,346 - cc_apt_configure.py[DEBUG]: Nothing to do: No apt config and running on snappy
65
66[Regression Potential]
67The regression potential would be
68a.) cloud-init falsely identifies it is running on snappy when it is not.
69b.) cloud-init does not recognize it is on snappy when it is.
70
71[Other Info]
72Upstream commit at
73 https://git.launchpad.net/cloud-init/commit/?id=4bcc947301b
74
75lxc-proposed-snapshot is
76 https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/tree/bin/lxc-proposed-snapshot
77It publishes an image to lxd with proposed enabled and cloud-init upgraded.
78
79=== End SRU Template ===
80
81Recent core snap images (edge channel revision 1886) do not contain the previously known files used to detect that a system is ubuntu core.
82
83In this bug, we should collect as many known paths/files/commands so we're hopefully defensive against further changes.
84
85Ubuntu Core 16
86--------------
87% cat etc/os-release
88NAME="Ubuntu Core"
89VERSION="16"
90ID=ubuntu-core
91PRETTY_NAME="Ubuntu Core 16"
92VERSION_ID="16"
93HOME_URL="http://www.snapcraft.io/"
94BUG_REPORT_URL="http://bugs.launchpad.net/snappy/"
95
96% snap version
97snap 2.24+201704201952.git.2ba71ec~ubuntu16.04.1
98snapd 2.24+201704201952.git.2ba71ec~ubuntu16.04.1
99series 16
100kernel 4.4.0-59-generic
101
102% lsb_release -rd
103bash: lsb_release: command not found
104
105% test -e /writable/system-data/var/lib/snapd; echo $?
1060
107
108Ubuntu 16.04 (Classic)
109-----------------------
110 % cat /etc/os-release
111NAME="Ubuntu"
112VERSION="16.04.2 LTS (Xenial Xerus)"
113ID=ubuntu
114ID_LIKE=debian
115PRETTY_NAME="Ubuntu 16.04.2 LTS"
116VERSION_ID="16.04"
117HOME_URL="http://www.ubuntu.com/"
118SUPPORT_URL="http://help.ubuntu.com/"
119BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
120VERSION_CODENAME=xenial
121UBUNTU_CODENAME=xenial
122
123% snap version
124snap unknown
125snapd 2.24.1
126series 16
127ubuntu 16.04
128kernel 4.4.0-75-generic
129
130% lsb_release -rd
131Description: Ubuntu 16.04.2 LTS
132Release: 16.04
133
134% test -e /writable/system-data/var/lib/snapd; echo $?
1351
136
diff --git a/bugs/lp-1691551.txt b/bugs/lp-1691551.txt
0new file mode 100644137new file mode 100644
index 0000000..ed3e18f
--- /dev/null
+++ b/bugs/lp-1691551.txt
@@ -0,0 +1,41 @@
1http://pad.lv/1691551
2https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1691551
3
4
5=== Begin SRU Template ===
6[Impact]
7Warnings are not suppressed when /var/lib/cloud/instance/warnings/.skip exists.
8
9[Test Case]
10if [ ! -f lxc-proposed-snapshot ]; then
11  wget https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/plain/bin/lxc-proposed-snapshot
12  chmod 755 lxc-proposed-snapshot
13fi
14
15for release in xenial yakkety zesty; do
16        ref=$release-proposed;
17        echo "$release START --------------";
18        ./lxc-proposed-snapshot --proposed --install ntp --publish $release $ref;
19        lxc init $ref test-$release;
20        lxc start test-$release;
21        sleep 10
22        # Create a warning
23        lxc exec test-$release -- sh -c 'd=/var/lib/cloud/instance/warnings/; mkdir -p $d; echo "WARNING WARNING FOO" > "$d/warn-foo"'
24        # Validate warning exists
25        echo -n "Warning should exist on login: "
26        lxc exec test-$release -- bash --login </dev/null 2>&1 | grep WARNING
27        lxc exec test-$release -- touch /var/lib/cloud/instance/warnings/.skip
28        echo -n "Warning should now be suppressed on login: "
29        lxc exec test-$release -- bash --login </dev/null 2>&1 | grep WARNING
30        echo "$release DONE --------------";
31done
32
33[Regression Potential]
34Minimal as the alternative warning suppression file works if you touch /root/.cloud-warnings.skip
35
36[Other Info]
37Upstream commit:
38 https://git.launchpad.net/cloud-init/commit/?id=66e46d8ec290737fd74f50eb8c7672d627d9b516
39
40=== End SRU Template ===
41
diff --git a/bugs/lp-1692093.txt b/bugs/lp-1692093.txt
0new file mode 10064442new file mode 100644
index 0000000..82391c1
--- /dev/null
+++ b/bugs/lp-1692093.txt
@@ -0,0 +1,78 @@
1http://pad.lv/1692093
2https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1692093
3
4
5=== Begin SRU Template ===
6[Impact]
7VMs on MS Azure have an ephemeral disk attached to them.
8On first boot, cloud-init properly notices the empty ntfs filesystem and
9reformats it ext4.
10
11After deallocating the instance or moving to a new azure host,
12the filesystem reformat is logged, but isn't actually performed because
13the udev device creation may not have settled.
14
15[Test Case]
16Test cases:
17 1. Deploy an instance VM on Azure
18 2. Log in and ensure that the ephemeral disk is formatted and mounted to /mnt
19 3. Via the portal you can "Redeploy" the VM to a new Azure Host (or alternatively stop and deallocate the VM for some time, and then restart/reallocate the VM).
20
21Expected Results:a
22 - Check cloud-init.log expecting to see logs from cc_disk_setup about the mount.
23 - After reallocation we expect the ephemeral disk to be formatted and mounted to /mnt.
24
25Actual Results:
26 - After reallocation /mnt is not mounted and there are errors in the cloud-init log.
27
28[Regression Potential]
29
30[Other Info]
31Upstream commit at
32  https://git.launchpad.net/cloud-init/commit/?id=1815c6d801933c47a01f1a94a8e689824f6797b4
33
34=== End SRU Template ===
35
36Cloud Provider: Azure
37dpkg-query -W -f='${Version}' cloud-init output: 0.7.9-90-g61eb03fe-0ubuntu1~16.04.1
38
39When the following is specified in cloud init it seems to be re-executing fs and disk setup (even though run command does not seem to re run)
40disk_setup:
41  /dev/sdc:
42      table_type: gpt
43      layout: true
44      overwrite: false
45
46fs_setup:
47- label: etcd_disk
48  filesystem: ext4
49  device: /dev/sdc1
50  extra_opts:
51    - "-F"
52    - "-E"
53    - "lazy_itable_init=1,lazy_journal_init=1"
54
55mounts:
56- - /dev/sdc1
57  - /var/lib/etcddisk
58
59From cloud-init-output.log:
60
61Cloud-init v. 0.7.9 running 'modules:final' at Mon, 15 May 2017 18:33:15 +0000. Up 64.24 seconds.
62Cloud-init v. 0.7.9 finished at Mon, 15 May 2017 18:34:46 +0000. Datasource DataSourceAzureNet [seed=/dev/sr0]. Up 155.34 seconds
63Cloud-init v. 0.7.9 running 'init-local' at Tue, 16 May 2017 01:52:37 +0000. Up 10.33 seconds.
64Cloud-init v. 0.7.9 running 'init' at Tue, 16 May 2017 01:52:39 +0000. Up 12.06 seconds.
65
66From cloud-init.log for the initial provision:
67
682017-05-15 18:32:46,820 - cc_disk_setup.py[DEBUG]: Creating file system etcd_disk on /dev/sdc1
692017-05-15 18:32:46,820 - cc_disk_setup.py[DEBUG]: Using cmd: /sbin/mkfs.ext4 /dev/sdc1 -L etcd_disk -F -E lazy_itable_init=1,lazy_journal_init=1
702017-05-15 18:32:46,820 - util.py[DEBUG]: Running command ['/sbin/mkfs.ext4', '/dev/sdc1', '-L', 'etcd_disk', '-F', '-E', 'lazy_itable_init=1,lazy_journal_init=1'] with allowed return codes [0] (shell=False, capture=True)
712017-05-15 18:33:04,054 - util.py[DEBUG]: Creating fs for /dev/sdc1 took 17.237 seconds
72
73and after reboot (cloud-init.log)
74
752017-05-16 01:52:40,245 - cc_disk_setup.py[DEBUG]: Creating file system etcd_disk on /dev/sdc1
762017-05-16 01:52:40,246 - cc_disk_setup.py[DEBUG]: Using cmd: /sbin/mkfs.ext4 /dev/sdc1 -L etcd_disk -F -E lazy_itable_init=1,lazy_journal_init=1
772017-05-16 01:52:40,246 - util.py[DEBUG]: Running command ['/sbin/mkfs.ext4', '/dev/sdc1', '-L', 'etcd_disk', '-F', '-E', 'lazy_itable_init=1,lazy_journal_init=1'] with allowed return codes [0] (shell=False, capture=True)
78
diff --git a/bugs/lp-1692097.txt b/bugs/lp-1692097.txt
0new file mode 10064479new file mode 100644
index 0000000..012fa07
--- /dev/null
+++ b/bugs/lp-1692097.txt
@@ -0,0 +1,24 @@
1http://pad.lv/1692097
2https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1692097
3
4
5Evergreen circ 2.12
6
7The Grunt-driven minification and concatenation configuration is missing some parts and not doing all that it could to make JS file downloads more efficient.
8
9I have put together a patch to do the following:
10
11* Support minifying the core Evergreen services files (i.e. service/*.js). Previously, they were only concatenated.
12
13* Create one concatenated file for external dependencies (jquery, angular, etc.) and a separate concatenated file for Evergreen core service files.
14
15Included in this is replacing the template variable EXPAND_WEB_IMPORTS with EXPAND_WEB_DEP_IMPORTS and EXPAND_WEB_CORE_IMPORTS.
16
17The thinking here is that concatenating 3rd party files (which are already minified) is an easy win and should not complicate debugging, whereas minifying and concatenating EG service files will require more testing. It's also nice that you can expand one or the other as needed for debugging.
18
19The build creates evergreen-staff-client.0.0.1.deps.min.js and evergreen-staff-client.0.0.1.core.min.js
20
21* Various fixes to the Gruntfile, including missing dependency references and fixing some faulty assumptions from early iterations of the file.
22
23* Remove OpenSRF JS from the minify/concat processes. Otherwise, we have to add some variable replacements in Gruntfile to avoid hard-coding the path to the OpenSRF js files. Not sure it's worth it for 3 small-ish files.
24
diff --git a/bugs/lp-1693582.txt b/bugs/lp-1693582.txt
0new file mode 10064425new file mode 100644
index 0000000..6521a49
--- /dev/null
+++ b/bugs/lp-1693582.txt
@@ -0,0 +1,30 @@
1
2http://pad.lv/1693582
3https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1693582
4
5
6=== Begin SRU Template ===
7[Impact]
8This code path is only exercised on GCE datasources and in such cases get_data
9would have not configured GCE-configured authorized ssh keys for the default user.
10
11[Test Case]
12Launch an instance on GCE
13Update cloud-init deb
14run sudo cloud-init single -n cc_ntp
15curl -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/attributes/ssh-keys
16validate .ssh/authorized_keys contains keys listed in the above curl
17
18[Regression Potential]
19GCE instances with don't support instance/attributes/ssh-keys would only be able
20to configure ssh access via #cloud-config ssh declarations.
21
22
23[Other Info]
24Upstream commit:
25 https://git.launchpad.net/cloud-init/commit/?id=d27c49391df343d25bd2e24045d2be6bf39c30d2
26GCE metadata docs:
27 https://cloud.google.com/compute/docs/storing-retrieving-metadata
28
29=== End SRU Template ===
30

Subscribers

People subscribed via source and target branches

to all changes: