unattended-upgrades will fail if a package has a conffile prompt. This is unusual for a new install, but recently became an issue for me because of changes to the ubuntu-advantage-tools packages. Specifically, uu logged issues with the package ubuntu-pro-client.
These are some of the logs generated by subiquity when uu fails during an Ubuntu 22.04 install.
Apr 12 22:19:36 ubuntu-server subiquity_log.1234[10785]: check_conffile_prompt(/var/cache/apt/archives/ubuntu-pro-client_31.2~22.04_amd64.deb)
Apr 12 22:19:36 ubuntu-server subiquity_log.1234[10785]: Package ubuntu-pro-client has conffile prompt and needs to be upgraded manually
Apr 12 22:19:36 ubuntu-server subiquity_log.1234[10785]: Package ubuntu-pro-client has conffile prompt and needs to be upgraded manually
...
Apr 12 22:19:37 ubuntu-server subiquity_log.1234[10785]: Packages blacklist due to conffile prompts: ['ubuntu\\-pro\\-client$']
...
Apr 12 22:45:55 ubuntu-server subiquity_log.1234[10785]: Packages that are kept back:
Apr 12 22:45:55 ubuntu-server subiquity_log.1234[10785]: InstCount=0 DelCount=0 BrokenCount=0
Apr 12 22:45:55 ubuntu-server subiquity_log.1234[10785]: Package python3-update-manager has a higher version available, checking if it is from an allowed origin and is not pinned down.
Apr 12 22:45:55 ubuntu-server subiquity_log.1234[10785]: Package python3-update-manager is kept back because a related package is kept back or due to local apt_preferences(5).
Apr 12 22:45:55 ubuntu-server subiquity_log.1234[10785]: Package ubuntu-advantage-tools has a higher version available, checking if it is from an allowed origin and is not pinned down.
Apr 12 22:45:55 ubuntu-server subiquity_log.1234[10785]: Package ubuntu-advantage-tools is kept back because a related package is kept back or due to local apt_preferences(5).
Apr 12 22:45:55 ubuntu-server subiquity_log.1234[10785]: Package update-manager-core has a higher version available, checking if it is from an allowed origin and is not pinned down.
Apr 12 22:45:55 ubuntu-server subiquity_log.1234[10785]: Package update-manager-core is kept back because a related package is kept back or due to local apt_preferences(5).
Apr 12 22:45:55 ubuntu-server subiquity_log.1234[10785]: Extracting content from /var/log/unattended-upgrades/unattended-upgrades-dpkg.log since 2024-04-12 22:18:35
Apr 12 22:45:55 ubuntu-server subiquity_log.1234[10774]: Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
...
Apr 12 22:45:55 ubuntu-server subiquity_log.1234[10774]: finish: cmd-in-target: FAIL: curtin command in-target
unattended-upgrades will fail if a package has a conffile prompt. This is unusual for a new install, but recently became an issue for me because of changes to the ubuntu- advantage- tools packages. Specifically, uu logged issues with the package ubuntu-pro-client.
In older versions of subiquity, unattended-upgrades failing causes subiquity to crash and the install to fail. That no longer appears to be case in newer releases of subiquity. I think because of this commit /github. com/canonical/ subiquity/ commit/ 800a1e9372f2359 1b504afa211da7e 3cbe30b788
https:/
According to the unattended-upgrades source a failure is expected if a package has a conffile prompt. Based on the comment at https:/ /github. com/mvo5/ unattended- upgrades/ blob/7bf3aa52af 1c6b11c031d0949 f223c1beb94f84c /unattended- upgrade# L2597
# Was the overall run succesful: only if everything installed
# fine and nothing was held back because of a conffile prompt.
A potential simple solution would be to append to /etc/apt/ apt.conf. d/zzzz- temp-installer- unattended- upgrade :="--force- confold"
Dpkg::Options:
An argument could be made for "--force-confnew" instead, but subiquity is already using "--force-confold" when installing packages individually. /github. com/canonical/ subiquity/ blob/dbcf723676 06559e7dae53019 7e4e0694afa63d3 /subiquity/ server/ pkghelper. py#L84
https:/
I believe this will work because the unattended-upgrades source checks for these options and will not "blacklist" any upgrades if present. However, I have not tested to verify. /github. com/mvo5/ unattended- upgrades/ blob/7bf3aa52af 1c6b11c031d0949 f223c1beb94f84c /unattended- upgrade# L1536
https:/
These are some of the logs generated by subiquity when uu fails during an Ubuntu 22.04 install.
Apr 12 22:19:36 ubuntu-server subiquity_ log.1234[ 10785]: check_conffile_ prompt( /var/cache/ apt/archives/ ubuntu- pro-client_ 31.2~22. 04_amd64. deb) log.1234[ 10785]: Package ubuntu-pro-client has conffile prompt and needs to be upgraded manually log.1234[ 10785]: Package ubuntu-pro-client has conffile prompt and needs to be upgraded manually log.1234[ 10785]: Packages blacklist due to conffile prompts: ['ubuntu\ \-pro\\ -client$ '] log.1234[ 10785]: Packages that are kept back: log.1234[ 10785]: InstCount=0 DelCount=0 BrokenCount=0 log.1234[ 10785]: Package python3- update- manager has a higher version available, checking if it is from an allowed origin and is not pinned down. log.1234[ 10785]: Package python3- update- manager is kept back because a related package is kept back or due to local apt_preferences(5). log.1234[ 10785]: Package ubuntu- advantage- tools has a higher version available, checking if it is from an allowed origin and is not pinned down. log.1234[ 10785]: Package ubuntu- advantage- tools is kept back because a related package is kept back or due to local apt_preferences(5). log.1234[ 10785]: Package update-manager-core has a higher version available, checking if it is from an allowed origin and is not pinned down. log.1234[ 10785]: Package update-manager-core is kept back because a related package is kept back or due to local apt_preferences(5). log.1234[ 10785]: Extracting content from /var/log/ unattended- upgrades/ unattended- upgrades- dpkg.log since 2024-04-12 22:18:35 log.1234[ 10774]: Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False) log.1234[ 10774]: finish: cmd-in-target: FAIL: curtin command in-target
Apr 12 22:19:36 ubuntu-server subiquity_
Apr 12 22:19:36 ubuntu-server subiquity_
...
Apr 12 22:19:37 ubuntu-server subiquity_
...
Apr 12 22:45:55 ubuntu-server subiquity_
Apr 12 22:45:55 ubuntu-server subiquity_
Apr 12 22:45:55 ubuntu-server subiquity_
Apr 12 22:45:55 ubuntu-server subiquity_
Apr 12 22:45:55 ubuntu-server subiquity_
Apr 12 22:45:55 ubuntu-server subiquity_
Apr 12 22:45:55 ubuntu-server subiquity_
Apr 12 22:45:55 ubuntu-server subiquity_
Apr 12 22:45:55 ubuntu-server subiquity_
Apr 12 22:45:55 ubuntu-server subiquity_
...
Apr 12 22:45:55 ubuntu-server subiquity_