Hi,
While working on Juju 2.x controller upgrades, jujud was blocked upgrading/restarting on some of the VMs. On investigating, it seems to do with an `apt-get install` of the `distro-info` package stuck on a grub prompt:
| 667407 ? Ss 0:00 bash /etc/systemd/system/jujud-machine-2-exec-start.sh
| 667411 ? Sl 0:19 \_ /var/lib/juju/tools/machine-2/jujud machine --data-dir /var/lib/juju --machine-id 2 --debug
| 668456 ? S 0:01 \_ apt-get --option=Dpkg::Options::=--force-confold --option=Dpkg::Options::=--force-unsafe-io --assume-yes --quiet install distro-info
| 668467 pts/0 Ss+ 0:00 \_ /usr/bin/dpkg --force-confold --force-unsafe-io --status-fd 28 --configure --pending
| 668468 pts/0 S+ 0:00 \_ /usr/bin/perl -w /usr/share/debconf/frontend /var/lib/dpkg/info/grub-efi-amd64-signed.postinst configure 1.167.2+2.04-1ubuntu44.2
| 668478 pts/0 S+ 0:00 \_ /bin/sh /var/lib/dpkg/info/grub-efi-amd64-signed.postinst configure 1.167.2+2.04-1ubuntu44.2
| 668481 pts/0 S+ 0:00 \_ /bin/bash /usr/lib/grub/grub-multi-install --target=x86_64-efi
| 667776 ? SLsl 0:53 /snap/juju-db/29/bin/mongod --config /var/snap/juju-db/common/juju-db.config
It looks to be PreUpgradeSteps() in upgrades/preupgradesteps.go. Can we have that called with the environment variable "DEBIAN_FRONTEND=noninteractive" set? This should prevent such blockages.
I had to kill the running dpkg/apt and then call "dpkg --configure -a" or "apt-get dist-upgrade" then enter through the grub prompt on which device to install the bootloader.
Think we can backport a fix, when one is made, to 2.9.x as well?