Spurious needrestart runs on do-release-upgrade

Bug #1968919 reported by Robie Basak
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Manual Tests
New
Undecided
Unassigned
needrestart (Ubuntu)
Won't Fix
Undecided
Unassigned
Jammy
Won't Fix
Undecided
Unassigned
ubuntu-release-upgrader (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned

Bug Description

Expected behaviour: no unnecessary prompts during do-release-upgrade
Actual behaviour: needrestart prompts during do-release-upgrade

Steps to reproduce:
lxc launch ubuntu:impish reproducer
lxc exec reproducer bash
apt-get update && apt-get -y upgrade # needrestart prompts, but that's expected
do-release-upgrade -d # needrestart prompts in the middle of this, and that's unexpected

do-release-upgrade recommends a system reboot after the upgrade is complete. So it's unnecessary to run needrestart and prompt the user for restarts while the upgrade is running.

Tags: fr-2254

Related branches

Revision history for this message
Robie Basak (racb) wrote :

In my test I think I got prompted twice (I said no to restarts as they're unnecessary as I expect to reboot when it's done). The pain of this is that release upgrades usually take a while, so every prompt may mean hours delay in the entire upgrade process since the user might not come back for a while.

tags: added: rls-jj-incoming
Robie Basak (racb)
description: updated
tags: added: fr-2254
tags: removed: rls-jj-incoming
Changed in needrestart (Ubuntu Jammy):
milestone: none → ubuntu-22.04
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Just to record other instances of restart prompts that happen on a regular update. I haven't verified if they happen on do-release-upgrade, but if they do, I think it's the same case.

- glibc update: there is a prompt about restarting services
- docker update: it also prompts about letting it be restarted or not, because containers can/will die if docker is restarted.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I added a task for ubuntu-manual-tests, as I think this can be easily described as such a test until we have automation to cover it.

Revision history for this message
Nick Rosbrook (enr0n) wrote :

A couple notes I think are worth adding:

1. One way to work around this is to set DEBIAN_FRONTEND=noninteractive when running do-release-upgrade.

2. do-release-upgrade has the option to run completely non-interactively. This means no y/N prompts etc. This is done by adding `-f DistUpgradeViewNonInteractive` to the do-release-upgrade command line.

Anyways, I think we can set NEEDRESTART_MODE=a ('a' for automatic) by default, and maybe set DEBIAN_FRONTEND=noninteractive by default for DistUpgradeViewText. Currently, DistUpgradeViewText sets DEBIAN_FRONTEND=dialog by default, but reading the git history I'm not sure this is what was intended.

Revision history for this message
Brian Murray (brian-murray) wrote :

ubuntu-release-upgrader (1:22.04.10) jammy; urgency=medium

  * DistUpgrade: Set NEEDRESTART_SUSPEND during upgrades (LP: #1968919).
  * do-release-upgrade: Fix a typo in the --help output.
  * Run pre-build.sh: updating mirrors, demotions, and translations.

 -- Nick Rosbrook <email address hidden> Mon, 18 Apr 2022 13:47:54 -0400

Changed in ubuntu-release-upgrader (Ubuntu Jammy):
status: New → Fix Released
Changed in needrestart (Ubuntu Jammy):
status: New → Won't Fix
Changed in needrestart (Ubuntu):
status: New → Won't Fix
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.