upgrade to 22.04.1 failed - AttributeError: 'DistUpgradeController' object has no attribute 'tasks'

Bug #1986346 reported by JamesRichardson
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

sudo dist-upgrade fails while installing packages :- don't know if system is now broken, or how to complete the upgrade. this is pretty horrible.

Calculating the changes

Calculating the changes

Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-tm0grze3/jammy", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-tm0grze3/DistUpgrade/DistUpgradeMain.py", line 241, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-tm0grze3/DistUpgrade/DistUpgradeController.py", line 2042, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-tm0grze3/DistUpgrade/DistUpgradeController.py", line 1991, in fullUpgrade
    if not self.calcDistUpgrade():
  File "/tmp/ubuntu-release-upgrader-tm0grze3/DistUpgrade/DistUpgradeController.py", line 1100, in calcDistUpgrade
    if not self.cache.installTasks(self.tasks):
AttributeError: 'DistUpgradeController' object has no attribute 'tasks'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/problem_report.py", line 477, in add_to_existing
    self.write(f)
  File "/usr/lib/python3/dist-packages/problem_report.py", line 430, in write
    block = f.read(1048576)
  File "/usr/lib/python3.8/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte

Original exception was:
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-tm0grze3/jammy", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-tm0grze3/DistUpgrade/DistUpgradeMain.py", line 241, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-tm0grze3/DistUpgrade/DistUpgradeController.py", line 2042, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-tm0grze3/DistUpgrade/DistUpgradeController.py", line 1991, in fullUpgrade
    if not self.calcDistUpgrade():
  File "/tmp/ubuntu-release-upgrader-tm0grze3/DistUpgrade/DistUpgradeController.py", line 1100, in calcDistUpgrade
    if not self.cache.installTasks(self.tasks):
AttributeError: 'DistUpgradeController' object has no attribute 'tasks'

Tags: bot-comment
Revision history for this message
JamesRichardson (james-time4tea) wrote :

sorry - command was

sudo do-release-upgrade

Revision history for this message
JamesRichardson (james-time4tea) wrote :

i have since run

sudo apt full-upgrade
sudo apt autoremove

sudo apt install --install-recommends linux-generic

i am a bit worried about rebooting.

Revision history for this message
JamesRichardson (james-time4tea) wrote :

Yes it didn't work.
Volume group ubuntu-vg not found, and system hangs

This was upgrade from LTS to LTS so this not expected!

I am running off encrypted root vg, maybe that is reason

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Libera.chat.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1986346/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
JamesRichardson (james-time4tea) wrote :

ok the boot was broken so i followed the instructions at https://feeding.cloud.geek.nz/posts/recovering-from-unbootable-ubuntu-encrypted-lvm-root-partition/ to get that working again.

GNOME had gone, including NetworkManager, so i got the network up by hand:

ip addr addr 192.168.0.176/24 dev enp0s31f6
ip link set dev dnpps31f6 up
ip route add default 192.168.0.1 up

edited /etc/resolv.conf to set nameserver

then install gnome:

apt install ubuntu-gnome-desktop
apt install nvidia-driver-515

reboot

came back with no NetworkManager
sudo touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
sudo systemctl restart NetworkManager

i think this is a lot to expect a user to do to get their system back online.

the system appears to be working now, but i am still getting a prompt "new release is available 22.04.01 TLS, run do-release-upgrade" so i assume something still hasn't completed properly

Paul White (paulw2u)
affects: ubuntu → ubuntu-release-upgrader (Ubuntu)
Revision history for this message
Gajo Petrovic (gajop) wrote :

@ JamesRichardson (james-time4tea)

Thank you for reporting this, you might have saved me a few hours.

I've had the exact same error (I agree, quite horrible), but I managed to resolve it based on your experiences.

After the do-release-upgrade crash, I repeated these commands:

sudo apt update && sudo apt upgrade
sudo apt full-upgrade
sudo apt autoremove

Until I had nothing else to upgrade.

I then invoked

sudo apt install --install-recommends linux-generic

but it had no effect (it was already installed I suppose)

Lastly, I invoked

sudo apt install ubuntu-gnome-desktop nvidia-driver-515

and that had quite a lot of to install. After installing that I repeated the full-upgrade/autoremove procedure

sudo apt update && sudo apt upgrade
sudo apt full-upgrade
sudo apt autoremove

and for good measure I also executed

sudo touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf

It ended up booting fine, although many things were deleted in the upgrade (anthy, clang, dropbox ,etc. I ended up installing them manually). I think I have a working system now.

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
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.