Thank you tjaalton. I have updated to SRU template to represent upgrade
path with and without MAAS-specific debconf settings to establish
correct behavior in both common case versus MAAS-specific case.


** Description changed:

+ [ Impact ]
+ 
+  * MAAS systems make use of a number of debcon
+  * In addition, it is helpful, but not required, to include an
+    explanation of how the upload fixes this bug.
+ 
+ [ Test Plan ]
+ 
+  * Assert upgrade path to -proposed doesn't create unexpected
+ /etc/cloud/cloud.cfg.d files due to cloud-init-base.postinst processing
+ of debconf values on standard cloud images in non-MAAS environment
+ 
+ 
+ cat > setup_proposed.sh <<EOF
+ #!/usr/bin/bash
+ mirror=http://archive.ubuntu.com/ubuntu
+ echo deb $mirror \$(lsb_release -sc)-proposed main | tee 
/etc/apt/sources.list.d/proposed.list
+ apt-get update -q;
+ apt-get install -qy cloud-init;
+ EOF
+ 
+ 
+ lxc launch ubuntu-daily:questing test-2127022
+ lxc file push setup_proposed.sh test-21272022/
+ 
+ lxc exec test-2127022 bash
+ 
+ # Peek at existing debconf settings
+ debconf-show cloud-init > debconf.cloud-init.orig
+ debconf-show cloud-init-base >> debconf.cloud-init.orig
+ 
+ # Copy existing /etc/cloud/cloud.cfg.d to ensure no new files on upgrade
+ cp -r /etc/cloud/cloud.cfg.d .
+ 
+ bash /setup_proposed.sh
+ # Upgrade and ensure exit 0 and no errors
+ echo $?
+ 
+ debconf-show cloud-init > debconf.cloud-init.new
+ debconf-show cloud-init-base >> debconf.cloud-init.new
+ 
+ # expect no new config files created by postinst
+ diff -urN cloud.cfg.d /etc/cloud/cloud.cfg.d/
+ 
+ 
+  * Assert multi-line debconf settings used by MAAS are properly processed and 
written to /etc/cloud/cloud.cfg.d by cloud-init-base.postinst
+ 
+ # provide multi-line value matching MAAS provisioning config debconf settings
+ cat > selections <<EOF
+ cloud-init cloud-init/local-cloud-config string manage_etc_hosts: 
true\nmanual_cache_clean: true
+ EOF
+ 
+ lxc launch ubuntu-daily:questing test-2127022
+ 
+ lxc file push selections test-2127022/
+ lxc exec test-2127022 -- debconf-set-selections /selections
+ 
+ # install from -proposed
+ lxc file push setup_proposed.sh test-21272022/
+ 
+ lxc exec test-2127022 bash
+ 
+ # Peek at existing debconf settings
+ debconf-show cloud-init > debconf.cloud-init.orig
+ debconf-show cloud-init-base >> debconf.cloud-init.orig
+ 
+ # Copy existing /etc/cloud/cloud.cfg.d to ensure no new files on upgrade
+ cp -r /etc/cloud/cloud.cfg.d .
+ 
+ bash /setup_proposed.sh
+ # Upgrade and ensure exit 0 and no errors
+ echo $?
+ 
+ debconf-show cloud-init > debconf.cloud-init.new
+ debconf-show cloud-init-base >> debconf.cloud-init.new
+ 
+ # expect 1 new config file created by postinst 90_dpkg_cloud_init_local.cfg
+ diff -urN cloud.cfg.d /etc/cloud/cloud.cfg.d/
+ 
+ 
+ [ Where problems could occur ]
+ 
+  * Problems processing cloud-init or cloud-init-base debconf settings can 
show up across package upgrade path due to cloud-init-base.postinst use of 
db_get and db_set tooling to read and write debconfig configuration settings. 
Errors during  package upgrade can result in non-zero exit codes from 
cloud-init-base.postinst which can result in errors affecting automatic 
upgrades which would force manual intervention to resolve or ignore such post 
install errors as seen in the original bug
+  
+  * Specific to MAAS debconf value processing, invalid handling of db_get 
results could result regressions by creating invalid cloud-config artifacts in 
/etc/cloud/cloud.cfg.d which would generate cloud-init schema warnings at boot 
resulting from exit 2 from such tools as `cloud-init status`. 
+ This type of regression has been seen in Resolute series 
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2131809
+ 
+ 
+ [ Other Info ]
+ 
+ 
+ ===== Original description =====
+ 
+ 
  Trying to upgrade a Power10 node from Ubuntu 25.04 Plucky to 25.10
  Questing (do-release-upgrade -d) :
  
  ```
  Found initrd image: /boot/initrd.img-6.14.0-33-generic
  Warning: os-prober will not be executed to detect other bootable partitions.
  Systems on them will not be added to the GRUB boot configuration.
  Check GRUB_DISABLE_OS_PROBER documentation entry.
  Adding boot menu entry for UEFI Firmware Settings ...
  done
  Processing triggers for ca-certificates (20250419) ...
  Updating certificates in /etc/ssl/certs...
  0 added, 0 removed; done.
  Running hooks in /etc/ca-certificates/update.d...
  done.
  Processing triggers for initramfs-tools (0.150ubuntu3) ...
  update-initramfs: Generating /boot/initrd.img-6.17.0-5-generic
  Errors were encountered while processing:
-  cloud-init-base
-  cloud-init
+  cloud-init-base
+  cloud-init
  needrestart is being skipped since dpkg has failed
  packages have been installed but needrestart is suspended
  Exception during pm.DoInstall():  E:Sub-process /usr/bin/dpkg returned an 
error code (1)
- 
  
  *** Send problem report to the developers?
  
  After the problem report has been sent, please fill out the form in the
  automatically opened web browser.
  
  What would you like to do? Your options are:
-   S: Send report (345.0 KB)
-   V: View report
-   K: Keep report file for sending later or copying to somewhere else
-   I: Cancel and ignore future crashes of this program version
-   C: Cancel
- Please choose (S/V/K/I/C): 
- 
+   S: Send report (345.0 KB)
+   V: View report
+   K: Keep report file for sending later or copying to somewhere else
+   I: Cancel and ignore future crashes of this program version
+   C: Cancel
+ Please choose (S/V/K/I/C):
  
  ```
  It finishes the upgrade, but requires a manual reboot.
  Then I can boot it into Questing.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2127022

Title:
  upgrade from Plucky to Questing cloud-init-base
  25.3~2g890873f5-0ubuntu2 failed to install/upgrade on MAAS

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-power-systems/+bug/2127022/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to