http://pad.lv/1770712 https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1770712 === Begin SRU Template === [Impact] Cloud-init should detect OpenStack datasource on any OrancleCloud instance. Per the bug, it was falling through the DataSourceNone after upgrade to 18.3.9 and a system reboot. [Test Case] # Deploy an Oracle cloud bionic instance and validate upgrade/reboot path cat > setup_proposed.sh <&1 | egrep 'cloud-init'; ssh ubuntu@$vm -- sudo cloud-init clean --logs --reboot; echo "After clean reboot, upgrade 18.3.9 should detect OpenStackLocal datasource" ssh-keygen -f ".ssh/known_hosts" -R $vm; ssh ubuntu@$vm -- cloud-init status --long; ssh ubuntu@$vm -- cloud-init --version; done [Regression Potential] This fixes a critical issue in datasource detection on Oracle platforms only. This should not regress any other platforms and is only a minor code path change to include Oracle's DMI chassis asset tag as a valid OpenStack datasource type. [Other Info] Upstream commit at https://git.launchpad.net/cloud-init/commit/?id=0df2b42 === End SRU Template === === Begin SRU verification === $ cat > setup_proposed.sh < do > echo '=== BEGIN ' $vm ' ===' > ssh ubuntu@$vm grep CODENAME /etc/os-release; > ssh ubuntu@$vm -- dpkg-query --show cloud-init; > ssh ubuntu@$vm -- cloud-init status --long; > ssh ubuntu@$vm -- cloud-init --version; > ssh ubuntu@$vm -- cloud-init analyze show; > scp setup_proposed.sh ubuntu@$vm:.; > ssh ubuntu@$vm sudo bash ./setup_proposed.sh 2>&1 | egrep 'cloud-init'; > ssh ubuntu@$vm -- sudo cloud-init clean --logs --reboot; > echo "After clean reboot, upgrade 18.3.9 should detect OpenStackLocal datasource" > ssh-keygen -f ".ssh/known_hosts" -R $vm; > ssh ubuntu@$vm -- cloud-init status --long; > ssh ubuntu@$vm -- cloud-init --version; > done === BEGIN 129.146.86.46 === The authenticity of host '129.146.86.46 (129.146.86.46)' can't be established. ECDSA key fingerprint is SHA256:1ClVZlfjbz8nO94LxfAPnK6siEIL6pssDvKGxG6+56A. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '129.146.86.46' (ECDSA) to the list of known hosts. VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic cloud-init 18.2-27-g6ef92c98-0ubuntu1~18.04.1 status: done time: Wed, 01 Aug 2018 19:34:51 +0000 detail: DataSourceOpenStack [net,ver=2] /usr/bin/cloud-init 18.2 -- Boot Record 01 -- The total time elapsed since completing an event is printed after the "@" character. The time the event takes is printed after the "+" character. Starting stage: init-local |`->no cache found @00.00500s +00.00100s Finished stage: (init-local) 00.04600 seconds Starting stage: init-network |`->no cache found @00.79800s +00.00100s |`->found network data from DataSourceOpenStack @00.80400s +05.07500s |`->reading and applying user-data @06.12200s +00.00200s |`->reading and applying vendor-data @06.12400s +00.00100s |`->config-migrator ran successfully @06.29500s +00.00100s |`->config-seed_random ran successfully @06.29600s +00.00100s |`->config-bootcmd ran successfully @06.29700s +00.00100s |`->config-write-files ran successfully @06.29800s +00.00100s |`->config-growpart ran successfully @06.29900s +00.07900s |`->config-resizefs ran successfully @06.37900s +00.04200s |`->config-disk_setup ran successfully @06.42200s +00.00100s |`->config-mounts ran successfully @06.42400s +00.03900s |`->config-set_hostname ran successfully @06.46300s +00.00100s |`->config-update_hostname ran successfully @06.46500s +00.00100s |`->config-update_etc_hosts ran successfully @06.46600s +00.00100s |`->config-ca-certs ran successfully @06.46700s +00.00100s |`->config-rsyslog ran successfully @06.46800s +00.00100s |`->config-users-groups ran successfully @06.46900s +00.04300s |`->config-ssh ran successfully @06.51300s +00.22600s Finished stage: (init-network) 05.95500 seconds Starting stage: modules-config |`->config-emit_upstart ran successfully @10.44400s +00.00000s |`->config-snap ran successfully @10.44500s +00.00000s |`->config-snap_config ran successfully @10.44600s +00.00000s |`->config-ssh-import-id ran successfully @10.44700s +00.00100s |`->config-locale ran successfully @10.44800s +00.00100s |`->config-set-passwords ran successfully @10.44900s +00.00100s |`->config-grub-dpkg ran successfully @10.45000s +00.22200s |`->config-apt-pipelining ran successfully @10.67200s +00.01500s |`->config-apt-configure ran successfully @10.68700s +00.35900s |`->config-ubuntu-advantage ran successfully @11.04600s +00.00100s |`->config-ntp ran successfully @11.04800s +00.00000s |`->config-timezone ran successfully @11.04900s +00.00100s |`->config-disable-ec2-metadata ran successfully @11.05000s +00.00000s |`->config-runcmd ran successfully @11.05000s +00.00100s |`->config-byobu ran successfully @11.05100s +00.00100s Finished stage: (modules-config) 00.78600 seconds Starting stage: modules-final |`->config-snappy ran successfully @11.62700s +00.00200s |`->config-package-update-upgrade-install ran successfully @11.62900s +00.00100s |`->config-fan ran successfully @11.63000s +00.00100s |`->config-landscape ran successfully @11.63200s +00.00000s |`->config-lxd ran successfully @11.63300s +00.00000s |`->config-puppet ran successfully @11.63400s +00.00000s |`->config-chef ran successfully @11.63500s +00.00000s |`->config-mcollective ran successfully @11.63600s +00.00000s |`->config-salt-minion ran successfully @11.63700s +00.00000s |`->config-rightscale_userdata ran successfully @11.63800s +00.00100s |`->config-scripts-vendor ran successfully @11.63900s +00.00100s |`->config-scripts-per-once ran successfully @11.64000s +00.00100s |`->config-scripts-per-boot ran successfully @11.64100s +00.00000s |`->config-scripts-per-instance ran successfully @11.64100s +00.00100s |`->config-scripts-user ran successfully @11.64200s +00.00100s |`->config-ssh-authkey-fingerprints ran successfully @11.64300s +00.03000s |`->config-keys-to-console ran successfully @11.67400s +00.05700s |`->config-phone-home ran successfully @11.73200s +00.00100s |`->config-final-message ran successfully @11.73300s +00.00600s |`->config-power-state-change ran successfully @11.73900s +00.00100s Finished stage: (modules-final) 00.19200 seconds Total Time: 6.97900 seconds 1 boot records analyzed setup_proposed.sh 100% 196 0.2KB/s 00:00 cloud-init Preparing to unpack .../cloud-init_18.3-9-g2e62cb8a-0ubuntu1~18.04.2_all.deb ... Unpacking cloud-init (18.3-9-g2e62cb8a-0ubuntu1~18.04.2) over (18.2-27-g6ef92c98-0ubuntu1~18.04.1) ... Setting up cloud-init (18.3-9-g2e62cb8a-0ubuntu1~18.04.2) ... Connection to 129.146.86.46 closed by remote host. After clean reboot, upgrade 18.3.9 should detect OpenStackLocal datasource @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ... csmith@uptown:~/$ ssh-keygen -f "/home/csmith/.ssh/known_hosts" -R 129.146.86.46 # Host 129.146.86.46 found: line 1239 /home/csmith/.ssh/known_hosts updated. Original contents retained as /home/csmith/.ssh/known_hosts.old csmith@uptown:~/$ ssh ubuntu@$vm -- cloud-init status --long; The authenticity of host '129.146.86.46 (129.146.86.46)' can't be established. ECDSA key fingerprint is SHA256:z6QAPiZtvyz4QWms9mD2FTv0ReZ8E91ifTVBDpWQfo4. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '129.146.86.46' (ECDSA) to the list of known hosts. status: done time: Wed, 01 Aug 2018 19:36:16 +0000 detail: DataSourceOpenStackLocal [net,ver=2] csmith@uptown:~/$ ssh ubuntu@$vm -- cloud-init --version; /usr/bin/cloud-init 18.3-9-g2e62cb8a-0ubuntu1~18.04.2 ### Xenial === BEGIN 129.146.141.57 === VERSION_CODENAME=xenial UBUNTU_CODENAME=xenial cloud-init 18.2-4-g05926e48-0ubuntu1~16.04.2 status: done time: Wed, 01 Aug 2018 19:49:16 +0000 detail: DataSourceOpenStack [net,ver=2] /usr/bin/cloud-init 18.2 -- Boot Record 01 -- The total time elapsed since completing an event is printed after the "@" character. The time the event takes is printed after the "+" character. Starting stage: init-local |`->no cache found @00.00500s +00.00100s Finished stage: (init-local) 00.03800 seconds Starting stage: init-network |`->no cache found @00.50200s +00.00100s |`->found network data from DataSourceOpenStack @00.50800s +05.07200s |`->reading and applying user-data @05.65500s +00.00300s |`->reading and applying vendor-data @05.65800s +00.00000s |`->config-migrator ran successfully @05.76000s +00.00100s |`->config-seed_random ran successfully @05.76100s +00.00100s |`->config-bootcmd ran successfully @05.76200s +00.00000s |`->config-write-files ran successfully @05.76300s +00.00100s |`->config-growpart ran successfully @05.76400s +00.10500s |`->config-resizefs ran successfully @05.86900s +00.07800s |`->config-disk_setup ran successfully @05.94800s +00.00100s |`->config-mounts ran successfully @05.94900s +00.02700s |`->config-set_hostname ran successfully @05.97600s +00.00200s |`->config-update_hostname ran successfully @05.97800s +00.00100s |`->config-update_etc_hosts ran successfully @05.97900s +00.00100s |`->config-ca-certs ran successfully @05.98100s +00.00000s |`->config-rsyslog ran successfully @05.98200s +00.00100s |`->config-users-groups ran successfully @05.98300s +00.06900s |`->config-ssh ran successfully @06.05200s +00.34200s Finished stage: (init-network) 05.90700 seconds Starting stage: modules-config |`->config-emit_upstart ran successfully @09.96800s +00.00000s |`->config-snap ran successfully @09.96900s +00.00000s |`->config-snap_config ran successfully @09.97000s +00.00000s |`->config-ssh-import-id ran successfully @09.97100s +00.00100s |`->config-locale ran successfully @09.97200s +00.88100s |`->config-set-passwords ran successfully @10.85300s +00.00100s |`->config-grub-dpkg ran successfully @10.85400s +00.20400s |`->config-apt-pipelining ran successfully @11.05900s +00.00300s |`->config-apt-configure ran successfully @11.06200s +00.22800s |`->config-ubuntu-advantage ran successfully @11.29000s +00.00100s |`->config-ntp ran successfully @11.29100s +00.00100s |`->config-timezone ran successfully @11.29200s +00.00100s |`->config-disable-ec2-metadata ran successfully @11.29300s +00.00100s |`->config-runcmd ran successfully @11.29400s +00.00100s |`->config-byobu ran successfully @11.29500s +00.00100s Finished stage: (modules-config) 01.37800 seconds Starting stage: modules-final |`->config-snappy ran successfully @12.22800s +00.00200s |`->config-package-update-upgrade-install ran successfully @12.23000s +00.00100s |`->config-fan ran successfully @12.23200s +00.00000s |`->config-landscape ran successfully @12.23300s +00.00000s |`->config-lxd ran successfully @12.23400s +00.00100s |`->config-puppet ran successfully @12.23500s +00.00100s |`->config-chef ran successfully @12.23600s +00.00100s |`->config-mcollective ran successfully @12.23700s +00.00100s |`->config-salt-minion ran successfully @12.23800s +00.00100s |`->config-rightscale_userdata ran successfully @12.23900s +00.00100s |`->config-scripts-vendor ran successfully @12.24000s +00.00100s |`->config-scripts-per-once ran successfully @12.24100s +00.00100s |`->config-scripts-per-boot ran successfully @12.24200s +00.00000s |`->config-scripts-per-instance ran successfully @12.24300s +00.00100s |`->config-scripts-user ran successfully @12.24400s +00.00100s |`->config-ssh-authkey-fingerprints ran successfully @12.24500s +00.01800s |`->config-keys-to-console ran successfully @12.26300s +00.04600s |`->config-phone-home ran successfully @12.30900s +00.00100s |`->config-final-message ran successfully @12.31100s +00.00400s |`->config-power-state-change ran successfully @12.31600s +00.00000s Finished stage: (modules-final) 00.15100 seconds Total Time: 7.47400 seconds 1 boot records analyzed setup_proposed.sh 100% 196 0.2KB/s 00:00 cloud-init Get:1 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 cloud-init all 18.3-9-g2e62cb8a-0ubuntu1~16.04.2 [370 kB] Preparing to unpack .../cloud-init_18.3-9-g2e62cb8a-0ubuntu1~16.04.2_all.deb ... Unpacking cloud-init (18.3-9-g2e62cb8a-0ubuntu1~16.04.2) over (18.2-4-g05926e48-0ubuntu1~16.04.2) ... Setting up cloud-init (18.3-9-g2e62cb8a-0ubuntu1~16.04.2) ... Leaving 'diversion of /etc/init/ureadahead.conf to /etc/init/ureadahead.conf.disabled by cloud-init' Connection to 129.146.141.57 closed by remote host. After clean reboot, upgrade 18.3.9 should detect OpenStackLocal datasource @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ 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:uAtvFZxLP41km9kc4XgWmeBX0g6Rppu4lKDlVZDCk5s. Please contact your system administrator. Add correct host key in /home/csmith/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /home/csmith/.ssh/known_hosts:1240 remove with: ssh-keygen -f "/home/csmith/.ssh/known_hosts" -R 129.146.141.57 ECDSA host key for 129.146.141.57 has changed and you have requested strict checking. Host key verification failed. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ 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:uAtvFZxLP41km9kc4XgWmeBX0g6Rppu4lKDlVZDCk5s. Please contact your system administrator. Add correct host key in /home/csmith/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /home/csmith/.ssh/known_hosts:1240 remove with: ssh-keygen -f "/home/csmith/.ssh/known_hosts" -R 129.146.141.57 ECDSA host key for 129.146.141.57 has changed and you have requested strict checking. Host key verification failed. csmith@uptown:~/src/server/curtin/master ((59442cd...))$ ssh-keygen -f ".ssh/known_hosts" -R $vm; csmith@uptown:~/src/server/curtin/master ((59442cd...))$ ssh ubuntu@$vm -- cloud-init status --long; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ... csmith@uptown:~/src/server/curtin/master ((59442cd...))$ ssh-keygen -f "/home/csmith/.ssh/known_hosts" -R 129.146.141.57 # Host 129.146.141.57 found: line 1240 /home/csmith/.ssh/known_hosts updated. Original contents retained as /home/csmith/.ssh/known_hosts.old csmith@uptown:~/src/server/curtin/master ((59442cd...))$ ssh ubuntu@$vm -- cloud-init status --long; The authenticity of host '129.146.141.57 (129.146.141.57)' can't be established. ECDSA key fingerprint is SHA256:uAtvFZxLP41km9kc4XgWmeBX0g6Rppu4lKDlVZDCk5s. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '129.146.141.57' (ECDSA) to the list of known hosts. status: done time: Wed, 01 Aug 2018 19:52:32 +0000 detail: DataSourceOpenStackLocal [net,ver=2] csmith@uptown:~/src/server/curtin/master ((59442cd...))$ ssh ubuntu@$vm -- cloud-init --version; /usr/bin/cloud-init 18.3-9-g2e62cb8a-0ubuntu1~16.04.2 === End SRU verification ===