Comment 16 for bug 1956788

Revision history for this message
Fabio Augusto Miranda Martins (fabio.martins) wrote :

Per my comment #4, CPC has removed /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg, so that no longer exists. The package should have included a post-install script to remove this file from old instances, in case they happen to be running out of images created before this change. So I adapted a little bit my testing process to consider validating the post-install script:

# PART A - Prepare the image with cloud-init from -proposed:

1. Launch Oracle vm for focal, jammy, kinetic and lunar (I used the 20230607 daily images for that)

sudo lsb_release -a
sudo uname -a
sudo cat /etc/cloud/build.info
sudo ls -l /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg

2. Create the /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg file:

sudo -i

cat <<EOF > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
# CLOUD_IMG: This file was created/modified by the Cloud Image build process
network: {config: disabled}
EOF

chown root:root /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
chmod 644 /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg

sudo ls -l /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
sudo cat /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg

3. Upgrade cloud-init to -proposed

sudo dpkg -l cloud-init
sudo -i

cat <<EOF >/etc/apt/sources.list.d/ubuntu-$(lsb_release -cs)-proposed.list
# Enable Ubuntu proposed archive
deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-proposed restricted main multiverse universe
EOF

sudo apt update
sudo apt install cloud-init

sudo apt-cache policy cloud-init

4. confirm absence of /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg

ls -l /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg

5. Reboot this VM to test default launch without 99-disable-network-config succeds on fresh launches

sudo reboot

6. sudo cloud-init clean --logs; sudo shutdown -h now

sudo -i
echo "cloud-init test" >> /etc/cloud/build.info
cat /etc/cloud/build.info
sudo cloud-init clean --logs
sudo shutdown -h now

# PART B - Launch F / J / K / L instances using the images prepared in A and validate it's OK:

1. Export VM to Oracle Object Storage
2. Launch from exported object storage image to trigger reading network config from IMDS instead of ISCSI
3. Assert ssh to instance works and no Tracebacks in /var/log/cloud-init.log

sudo ls -l /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
sudo cat /etc/cloud/build.info
sudo lsb_release -a
sudo uname -a
sudo apt-cache policy cloud-init
sudo cat /var/log/cloud-init.log
sudo cat /var/log/cloud-init-output.log

Here are the results of my tests:

- Part A:

Focal: https://pastebin.ubuntu.com/p/kgZn5gr9m3/
Jammy: https://pastebin.ubuntu.com/p/JGYfC8XCsh/
Kinetic: https://pastebin.ubuntu.com/p/XTfm2X9rqc/
Lunar: https://pastebin.ubuntu.com/p/pDbFNfMcXD/

- Part B:

Focal: https://pastebin.ubuntu.com/p/dwVzs4DrQx/
Jammy: https://pastebin.ubuntu.com/p/cJ3jXZnfFN/
Kinetic: https://pastebin.ubuntu.com/p/36nMvpsH9z/
Lunar: https://pastebin.ubuntu.com/p/Vb4j6PckyT/

I don't see any obvious failures and everything seems to be working well, so I'll add the verification done label for F / J / K / L.

Thanks for the patch.