apt-get install distro-info noninteractive

Bug #2011637 reported by Haw Loeung
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
High
Unassigned

Bug Description

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.

Haw Loeung (hloeung)
tags: added: canonical-is canonical-is-upgrades
Ian Booth (wallyworld)
Changed in juju:
milestone: none → 3.1.2
importance: Undecided → High
status: New → Triaged
Changed in juju:
milestone: 3.1.2 → 3.1.3
Changed in juju:
milestone: 3.1.3 → 3.1.4
Changed in juju:
milestone: 3.1.4 → 3.1.5
Changed in juju:
milestone: 3.1.5 → 3.1.6
Changed in juju:
milestone: 3.1.6 → 3.1.7
Revision history for this message
Haw Loeung (hloeung) wrote :

Think we can backport a fix, when one is made, to 2.9.x as well?

Revision history for this message
Haw Loeung (hloeung) wrote :

FWIW, we usually call `apt-get` as such:

| DEBIAN_FRONTEND=noninteractive apt-get install -qqy etckeeper bzr

So something like this per the `ps` output above:

| DEBIAN_FRONTEND=noninteractive apt-get --option=Dpkg::Options::=--force-confold --option=Dpkg::Options::=--force-unsafe-io --assume-yes --quiet install distro-info

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.