[Bug 1975533] Re: No longer possible to use do-release-upgrade on Groovy

Mikolaj Buchwald 1975533 at bugs.launchpad.net
Tue May 24 22:14:47 UTC 2022


@Brian Murray, if you don't mind, I will post my notes here, as
comments, so that it will be easier for someone else to follow my
thought process on getting familiar with the problem, i.e., getting to
better know how does `do-release-upgrade` and `DistUpgrade.cfg` work.

It is very important to know all recent Ubuntu release names
(https://wiki.ubuntu.com/Releases) in order to keep track with the
analysis below.

Ok, so I inspected the `DistUpgrade.cfg` file
(https://git.launchpad.net/ubuntu/+source/ubuntu-release-
upgrader/tree/data/DistUpgrade.cfg?h=ubuntu%2Fjammy#n109; stored in my
file system at `/usr/share/ubuntu-release-upgrader/DistUpgrade.cfg`). It
contains:

...
108 [Sources]
109 From=impish
110 To=jammy
...

So it represents my most recent update. (I finally did groovy=>impish,
and impish=>jammy.) Then, during the next update, it would look like:

...
108 [Sources]
109 From=jammy
110 To=kinetic
...

(see: https://git.launchpad.net/ubuntu/+source/ubuntu-release-
upgrader/tree/data/DistUpgrade.cfg#n110)

I also found the `DistUpgrade.cfg.focal`
(https://git.launchpad.net/ubuntu/+source/ubuntu-release-
upgrader/tree/data/DistUpgrade.cfg.focal), and it contains:

...
108 [Sources]
109 From=focal
110 To=jammy
...

Interestingly, the `DistUpgrade.cfg.focal` stored at my file system (at
"~/.local/share/Trash/files/DistUpgrade.cfg.focal") contains:

...
108 [Sources]
109 From=focal
110 To=hirsute
...

E.g., it was moved to the trash when the `ubuntu-hirsute` branch was in
use on my system, see: https://git.launchpad.net/ubuntu/+source/ubuntu-
release-upgrader/tree/data/DistUpgrade.cfg.focal?h=ubuntu%2Fhirsute#n109
.

---

@Brian Murray, your other suggestion was to create `demoted.cfg.groovy`.
Indeed, in the https://git.launchpad.net/ubuntu/+source/ubuntu-release-
upgrader/tree/utils there is no `demoted.cfg.groovy`.

Maybe part of the simplest solution (for the others to use) is, as you
suggest, to create "demoted.cfg.groovy" which contains basically the
same packages as "demoted.cfg.focal".

---

Brian Murray wrote:

 > "For what its worth I tested an upgrade of a stock Ubuntu 20.10
system to Ubuntu 21.10 by copying DistUpgrade.cfg.focal to
DistUpgrade.cfg.groovy and did not run into any issues"

It worked because of this piece of code: lines 44 & 45 here: https://git.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/tree/DistUpgrade/DistUpgradeConfigParser.py#n44
(
```
if os.path.exists(maincfg + "." + from_release):
    maincfg += "." + from_release
```
)

It is not a particularly neat solution, but it will work.

In the ideal world, there would be a mechanism similar to this:
https://git.launchpad.net/ubuntu/+source/ubuntu-release-
upgrader/tree/DistUpgrade/DistUpgradeConfigParser.py#n39 (from_release =
...) in combination with the list of known releases
(https://wiki.ubuntu.com/Releases) for the `DistUpgradeConfigParser.py`
not to take fixed release names (from `DistUpgrade.cfg`/focal/groovy),
but dynamically decide what is the release on the system, and what is
the next available release, so that the `do-release-upgrade` would
attempt to upgrade to the next available release. This way upgrades from
the EOL systems would be supported, or as @Scott Carle wrote in the
title of his bug report: it would be "easy peasy"
(https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-
upgrader/+bug/1745754), now upgrading from EOL is not that simple.
Getting back to the technicalities: the problem now seems to be that
both groovy=>impish and hirsute=>impish should be supported. With
release names being fixed on the branches, it is not possible (see:
https://git.launchpad.net/ubuntu/+source/ubuntu-release-
upgrader/tree/data/DistUpgrade.cfg?h=ubuntu%2Fimpish#n109). I am still
missing one point: how did my groovy knew that impish was the latest
supported system?

That's it for the analysis. I will try to come up with some solution (in
the code) that will support upgrading from at least groovy, if not from
any EOL release, to the first available, still supported release (e.g.,
at the moment, groovy=>impish and hirsute=>impish).

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/1975533

Title:
  No longer possible to use do-release-upgrade on Groovy

Status in ubuntu-release-upgrader package in Ubuntu:
  Confirmed

Bug description:
  I tried running `do-release-upgrade` on an Ubuntu 20.10 (Groovy
  Gorilla) system and received an error message from dist-upgrader
  tarball that an upgrade from Groovy to Impish is not supported. This
  is because DistUpgrade.cfg (distributed by the tarball) contains
  `From=Hirsute` and `To=Impish`.

  A minimal fix for this would be to create a DistUpgrade.cfg.groovy and
  ensure `From=Groovy`. You'd want to look at the contents of
  DistUpgrade.cfg and DistUpgrade.cfg.focal to sort out what
  DistUpgrade.cfg.groovy should contain. We might also want to create a
  new demoted.cfg file but the demoted.cfg.focal file might capture
  everything that was demoted. (For what its worth I tested an upgrade
  of a stock Ubuntu 20.10 system to Ubuntu 21.10 by copying
  DistUpgrade.cfg.focal to DistUpgrade.cfg.groovy and did not run into
  any issues.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1975533/+subscriptions




More information about the foundations-bugs mailing list