ubuntu-release-upgrader crashed with configparser.NoOptionError: No option 'devrelease' in section: 'Options'

Bug #1827441 reported by errors.ubuntu.com bug bridge
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Fix Released
Undecided
Brian Murray

Bug Description

The Ubuntu Error Tracker has been receiving reports about a problem regarding ubuntu-release-upgrader. This problem was most recently seen with package version 1:19.04.16.2, the problem page at https://errors.ubuntu.com/problem/de449d522b48757811ca4c9fc219ad41a5ac3e42 contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/.

Tags: disco

Related branches

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

Here's the relevant part of the Traceback:

Traceback (most recent call last):
  File "/usr/lib/python3.6/configparser.py", line 789, in get
    value = d[option]
  File "/usr/lib/python3.6/collections/__init__.py", line 883, in __getitem__
    return self.__missing__(key) # support subclasses that define __missing__
  File "/usr/lib/python3.6/collections/__init__.py", line 875, in __missing__
    raise KeyError(key)
KeyError: 'devrelease'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/ubuntu-release-upgrader/do-partial-upgrade", line 114, in <module>
    controller.doPartialUpgrade()
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py", line 2097, in doPartialUpgrade
    if not self.askDistUpgrade():
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py", line 1154, in askDistUpgrade
    changes = self.calcDistUpgrade()
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py", line 1117, in calcDistUpgrade
    if not self.cache.distUpgrade(self._view, self.serverMode, self._partialUpgrade):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeCache.py", line 241, in wrapper
    res = f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeCache.py", line 681, in distUpgrade
    self.config.get("Options", "devRelease") == "True":
  File "/usr/lib/python3.6/configparser.py", line 792, in get
    raise NoOptionError(option, section)
configparser.NoOptionError: No option 'devrelease' in section: 'Options'

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

It looks like if options are not set at all when running do-release upgrade then there is no default value for devRelease. From DistUpgrade/DistUpgradeController.py:

       if self.options:
            if self.options.devel_release:
                self.config.set("Options","devRelease", "True")
            else:
                self.config.set("Options","devRelease", "False")

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → In Progress
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:19.10.5

---------------
ubuntu-release-upgrader (1:19.10.5) eoan; urgency=medium

  * DistUpgrade/DistUpgradeViewNonInteractive.py: when responding to a
    conffile prompt with "n" use bytes not a string. (LP: #1796193)
  * DistUpgrade/DistUpgradeController.py: set a default value for devRelease
    even if there are no options specified. (LP: #1827441)

 -- Brian Murray <email address hidden> Fri, 10 May 2019 13:30:07 -0700

Changed in ubuntu-release-upgrader (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
erdnaxeli (erdnaxeli) wrote :

Hi, I am on Ubuntu 19.04 and I have this bug preventing me to upgrade. What should I do?

Version: 1:19.04.16.9

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.