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
Fix Committed
High
Caner Derici

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

Changed in juju:
milestone: 3.1.7 → 3.1.8
Harry Pidcock (hpidcock)
Changed in juju:
assignee: nobody → Harry Pidcock (hpidcock)
Harry Pidcock (hpidcock)
Changed in juju:
milestone: 3.1.8 → 3.3.3
Revision history for this message
Trent Lloyd (lathiat) wrote :

Ran into a similar problem but with apt-get install throwing an error (due to broken dependencies/half installation of an unrelated package); filed a separate bug:
https://bugs.launchpad.net/juju/+bug/2054392

Ian Booth (wallyworld)
Changed in juju:
milestone: 3.3.3 → 3.3.4
milestone: 3.3.4 → 3.3.5
milestone: 3.3.5 → 3.3.4
Changed in juju:
milestone: 3.3.4 → 3.3.5
Changed in juju:
milestone: 3.3.5 → 3.3.6
Changed in juju:
milestone: 3.3.6 → 3.4.4
assignee: Harry Pidcock (hpidcock) → Caner Derici (cderici)
Revision history for this message
Caner Derici (cderici) wrote :

Patch landed on juju/packaging: https://github.com/juju/packaging/pull/24

And Juju 3.4 [https://github.com/juju/juju/pull/17482] (and 3.5+ [https://github.com/juju/juju/pull/17483]) is updated with the patch.

@hloeung, I don't think backporting to 2.9 is a good idea, as we don't make 2.9 releases anymore (except for security bugs), so even if we backport the patch, there's no way to tell when (if ever) it will be up on 2.9. Hope it makes sense.

Changed in juju:
status: Triaged → Fix Committed
Revision history for this message
Haw Loeung (hloeung) wrote :

Yep, sure. That comment was made almost a year ago and understandable that 2.9 is now only supported in terms of security and critical fixes. Thanks for your work.

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.