Upgrade with non-interactive frontend does not deal with conffile prompts & dpkg --configure -a on recover doesn't too

Bug #538206 reported by Andreas Hasenack
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Landscape Server
Invalid
Medium
Free Ekanayaka
update-manager (Ubuntu)
Fix Released
High
Michael Vogt

Bug Description

Doing a karmic -> lucid release upgrade via Landscape, got this in the /var/log/dist-upgrade/main.log:
(...)
2010-03-12 15:18:33,911 DEBUG quirks: running StartUpgrade
2010-03-12 15:18:33,917 DEBUG check if patch '_usr_sbin_install-docs.268d21f1f1ed5f7a19fffef645ac4d52' needs to be applied
2010-03-12 15:18:33,918 DEBUG skipping 'README' (no '.')
2010-03-12 15:18:33,918 DEBUG check if patch '_usr_sbin_install-docs.3533d3b8e8f08f78c95550a7edcbe316' needs to be applied
2010-03-12 15:18:33,965 DEBUG killing update-notifier
2010-03-12 15:18:34,027 DEBUG killing kblueplugd kbluetooth4
2010-03-12 15:18:34,046 DEBUG killing gnome-screensaver
2010-03-12 15:18:34,062 INFO cache.commit()
2010-03-12 15:18:34,063 DEBUG failed to SystemUnLock() (E:Not locked)
2010-03-12 15:18:34,607 DEBUG doing a pty.fork()
2010-03-12 15:18:34,634 DEBUG pid is: 1309
2010-03-12 15:28:44,104 WARNING got a conffile-prompt from dpkg for file: '/etc/bash.bashrc'

That's actually the last line of that log file. In the process list it seems dpkg it stuck now:
  877 ? S 0:03 /usr/bin/python /usr/bin/landscape-client --daemon --pid-file /var/run/landscape/landscape-client.pid
  879 ? S 0:05 \_ /usr/bin/python /usr/bin/landscape-broker --ignore-sigint --quiet
  880 ? S 0:05 \_ /usr/bin/python /usr/bin/landscape-monitor --ignore-sigint --quiet
  881 ? S 0:02 \_ /usr/bin/python /usr/bin/landscape-manager --ignore-sigint --quiet
 1054 ? Ssl 0:01 \_ /usr/bin/python /usr/bin/landscape-release-upgrader --quiet
 1060 ? S 0:20 \_ /usr/bin/python /var/lib/landscape/client/package/upgrade-tool/lucid --frontend DistUpgradeViewNonInteractive
 1309 pts/1 Ss+ 0:01 \_ /usr/bin/python /var/lib/landscape/client/package/upgrade-tool/lucid --frontend DistUpgradeViewNonInteractive
10051 pts/2 Ss+ 0:00 \_ /usr/bin/dpkg --force-overwrite --force-overwrite --status-fd 25 --configure bash

Changed in landscape:
milestone: none → 1.5.0
importance: Undecided → Medium
assignee: nobody → Free Ekanayaka (free.ekanayaka)
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

We probably need a way to pass --force-confold to dpkg. It's what smart does.

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

After that ctrl-c is sent due to inactivity, the tool calls a dpkg --configure -a to try to keep the system in a sane state. Another problem is that now that dpkg command is also stuck waiting for input on stdin:

  877 ? S 0:06 /usr/bin/python /usr/bin/landscape-client --daemon --pid-file /var/run/landscape/landscape-client.pid
  879 ? S 0:08 \_ /usr/bin/python /usr/bin/landscape-broker --ignore-sigint --quiet
  880 ? S 0:08 \_ /usr/bin/python /usr/bin/landscape-monitor --ignore-sigint --quiet
  881 ? R 0:03 \_ /usr/bin/python /usr/bin/landscape-manager --ignore-sigint --quiet
 1054 ? Ssl 0:02 \_ /usr/bin/python /usr/bin/landscape-release-upgrader --quiet
 1060 ? S 0:21 \_ /usr/bin/python /var/lib/landscape/client/package/upgrade-tool/lucid --frontend DistUpgradeViewNonInteractive
10192 ? S 0:00 \_ dpkg --configure -a

root@karmic-vm:/var/log/dist-upgrade# strace -f -p 10192
Process 10192 attached - interrupt to quit
read(0, ^C <unfinished ...>
Process 10192 detached
root@karmic-vm:/var/log/dist-upgrade#

Michael Vogt (mvo)
Changed in update-manager (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Michael Vogt (mvo)
milestone: none → ubuntu-10.04-beta-1
summary: - Release upgrade driven by landscape stopped at a prompt
+ Upgrade with non-interactive frontend does not deal with conffile
+ prompts & dpkg --configure -a on recover doesn't too
Changed in landscape:
status: New → Invalid
visibility: private → public
Michael Vogt (mvo)
Changed in update-manager (Ubuntu):
status: Confirmed → In Progress
importance: Medium → High
Michael Vogt (mvo)
Changed in update-manager (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-manager - 1:0.133.2

---------------
update-manager (1:0.133.2) lucid; urgency=low

  * DistUpgrade/DistUpgradeViewNonInteractive.py:
    - fix regression in conffile prompt handling (LP: #538206)
    - add default to the "NonInteractive", "DebugBrokenScripts"
      config option
  * DistUpgrade/DistUpgradeController.py:
    - honor "DEBIAN_FRONTEND=noninteractive" in recovery mode as
      well (LP: #538206)
  * DistUpgrade/DistUpgrade.cfg:
    - ensure that gtk-qt-engine is removed on upgrade (LP: #532968)
 -- Michael Vogt <email address hidden> Tue, 16 Mar 2010 17:17:33 +0100

Changed in update-manager (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Jamu Kakar (jkakar) wrote :

I've tested this in Landscape with several configuration files
changed:

- I added an alias to /etc/bash.bashrc (I believe something like
  this broke when Andreas was testing this the other day)

- I set 'fsync = off' in /etc/postgresql/8.4/main/postgresql.conf

- I added a line to /etc/hosts.deny

- I added a line to /etc/sudoers

The upgrade worked without issues!

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.