DistUpgradeViewNonInteractive produces error on conffile-prompt from dpkg

Bug #1640274 reported by Meenesh Kapadia
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When running $do-release-upgrade -f DistUpgradeViewNonInteractive -p on an x64 Ubuntu 14.04 host a conf file prompt for /etc/issue results in:
"ERROR error ''str' does not support the buffer interface' when trying to write to the conffile"

System info:
lsb_release -rd
Description: Ubuntu 14.04.5 LTS
Release: 14.04

apt-cache policy ubuntu-release-upgrader-core
ubuntu-release-upgrader-core:
  Installed: 1:0.220.8
  Candidate: 1:16.04.17
  Version table:
     1:16.04.17 0
        500 http://us.archive.ubuntu.com/ubuntu/ xenial-updates/main amd64 Packages
     1:16.04.12 0
        500 http://us.archive.ubuntu.com/ubuntu/ xenial/main amd64 Packages
 *** 1:0.220.8 0
        100 /var/lib/dpkg/status

Partial output of main.log:

2016-11-07 12:53:36,005 DEBUG disabling apt cron job (0o755)
2016-11-07 13:01:06,388 DEBUG plugins for condition 'StartUpgrade' are '[]'
2016-11-07 13:01:06,388 DEBUG plugins for condition 'xenialStartUpgrade' are '[]'
2016-11-07 13:01:06,388 DEBUG plugins for condition 'from_trustyStartUpgrade' are '[]'
2016-11-07 13:01:06,389 DEBUG quirks: running StartUpgrade
2016-11-07 13:01:06,389 DEBUG skipping 'README' (no '.')
2016-11-07 13:01:06,390 DEBUG killing update-notifier
2016-11-07 13:01:06,403 DEBUG killing kblueplugd kbluetooth4
2016-11-07 13:01:06,409 DEBUG killing gnome-screensaver
2016-11-07 13:01:06,417 DEBUG setup poke timer for the scrensaver
2016-11-07 13:01:06,421 DEBUG failed to determine user upgrading
2016-11-07 13:01:06,421 ERROR failed to inhibit gnome-session idle
2016-11-07 13:01:06,421 DEBUG apt btrfs snapshots supported: False
2016-11-07 13:01:06,421 INFO cache.commit()
2016-11-07 13:01:06,421 DEBUG failed to SystemUnLock() (E:Not locked)
2016-11-07 13:01:06,669 DEBUG doing a pty.fork()
2016-11-07 13:01:06,671 DEBUG pid is: 1729
2016-11-07 13:01:26,498 WARNING got a conffile-prompt from dpkg for file: '/etc/issue'
2016-11-07 13:01:31,499 ERROR error ''str' does not support the buffer interface' when trying to write to the conffile
2016-11-07 13:41:26,327 WARNING no activity 2400 seconds (Configuring base-files (amd64)) - sending ctrl-c
2016-11-07 13:41:26,371 ERROR not handled exception:
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-b1xls5f6/xenial", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-b1xls5f6/DistUpgrade/DistUpgradeMain.py", line 242, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-b1xls5f6/DistUpgrade/DistUpgradeController.py", line 1876, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-b1xls5f6/DistUpgrade/DistUpgradeController.py", line 1841, in fullUpgrade
    if not self.doDistUpgrade():
  File "/tmp/ubuntu-release-upgrader-b1xls5f6/DistUpgrade/DistUpgradeController.py", line 1182, in doDistUpgrade
    res = self.cache.commit(fprogress,iprogress)
  File "/tmp/ubuntu-release-upgrader-b1xls5f6/DistUpgrade/DistUpgradeCache.py", line 267, in commit
    apt.Cache.commit(self, fprogress, iprogress)
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 501, in commit
    res = self.install_archives(pm, install_progress)
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 465, in install_archives
    res = install_progress.run(pm)
  File "/tmp/ubuntu-release-upgrader-b1xls5f6/DistUpgrade/DistUpgradeView.py", line 234, in run
    res = os.WEXITSTATUS(self.wait_child())
  File "/tmp/ubuntu-release-upgrader-b1xls5f6/DistUpgrade/DistUpgradeView.py", line 200, in wait_child
    self.update_interface()
  File "/tmp/ubuntu-release-upgrader-b1xls5f6/DistUpgrade/DistUpgradeViewNonInteractive.py", line 221, in update_interface
    os.write(self.master_fd,chr(3))
TypeError: 'str' does not support the buffer interface

2016-11-07 13:41:26,371 DEBUG confirmRestart() called
2016-11-07 13:41:26,372 DEBUG enabling apt cron job

Revision history for this message
Meenesh Kapadia (mhkapadia) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Confirmed
Revision history for this message
Steve Fox (drfickle2) wrote :

I get this same error on every file I've customized in /etc. Very frustrating for trying to automate upgrades via Ansible.

Revision history for this message
Mario (q-mario) wrote :

This still happens to us... any workaround? Being blocked by this for a big deployment...

Revision history for this message
Mario (q-mario) wrote :

a Workaround but... adding this:

Dpkg::Options { "--force-confold"; }

to /etc/apt/apt.conf works. It will still show the errors but will upgrade just fine

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.