QubesOS / qubes-issues

The Qubes OS Project issue tracker
https://www.qubes-os.org/doc/issue-tracking/
543 stars 48 forks source link

Qubes Updater considers in-place upgraded qubes to be "no longer supported" #8725

Closed Minimalist73 closed 5 months ago

Minimalist73 commented 1 year ago

Qubes OS release

4.2-rc4

Brief summary

The new Qubes Updater introduced a new way to detect if a template or standalone qube is no longer supported. It works, but shows false positives for users who use the in-place upgrade method for their qubes. The "template-name" option in qvm-features retains its old value and Qubes Updater uses it to check if the system is EOL.

Steps to reproduce

Not really reproducible by itself, since it only happens to users who upgrade their templates/standalone qubes in-place. Can be artificially reproduced by changing the template-name value to an old template version:

Expected behavior

No "no longer supported" message should appear in Qubes Updater qui if the qube runs a supported release.

Actual behavior

Say that some of my qubes are no longer supported (reported as "obsolete" in Qubes Updater itself) when they are fully upgraded to fedora-38. Running qvm-features on one of the affected template reports the following:

template-name                               fedora-35
template-epoch                              0
template-version                            4.0.6
template-release                            202111131804
template-reponame                           qubes-templates-itl-testing
template-buildtime                          2021-11-13 19:14:50
template-installtime                        2021-12-07 18:11:25
template-license                            GPL
template-url                                http://www.qubes-os.org
template-summary                            Qubes template for fedora-35
template-description                        Qubes template for fedora-35
ben-grande commented 1 year ago

Note that these features are set on package installation, not when modifying the qube from inside.

If this is a bug, it is in the documentation, maybe it should tell you to update the template-name, template-summary and template-description feature? I don't know if the other features should be changed.

But then it would also need to recommend you to set a new feature template-original-name or something like it, so you can know from which version you started doing in-place upgrades. This way the Updater could work with in-place upgrades.

andrewdavidwong commented 11 months ago

Another report on the forum: https://forum.qubes-os.org/t/fedora-template-no-longer-supported-4-2-0-rc5/22506

kennethrrosen commented 11 months ago

Note that these features are set on package installation, not when modifying the qube from inside.

If this is a bug, it is in the documentation, maybe it should tell you to update the template-name, template-summary and template-description feature? I don't know if the other features should be changed.

But then it would also need to recommend you to set a new feature template-original-name or something like it, so you can know from which version you started doing in-place upgrades. This way the Updater could work with in-place upgrades.

Confirming: Running qvm-features fedora-39 template-name fedora-39 or the like resolves the issues.

avaaum commented 11 months ago

does not work for me. the issue still persists.

runephilosof-abtion commented 10 months ago

does not work for me. the issue still persists.

I had to reboot after changing the template names to have the updater notice it.

runephilosof-abtion commented 10 months ago

According to https://forum.qubes-os.org/t/fedora-template-no-longer-supported-4-2-0-rc5/22506/4, it should be enough to restart the widget. But I don't know how to do that.

andrewdavidwong commented 10 months ago

Another user report: https://groups.google.com/d/msgid/qubes-users/ca442c50-7b31-4ea2-b27a-739fc31c7e65%40gmail.com

sjvudp commented 10 months ago

As I'm affected, too, I can tell: qvm-features fedora-38 reports (among many other lines):

template-name                               fedora-36
template-epoch                              0
template-version                            4.0.6
template-release                            202205270243
template-reponame                           @commandline
template-buildtime                          2022-05-27 03:11:26
template-installtime                        2022-09-02 22:50:42
template-license                            GPL
template-url                                http://www.qubes-os.org
template-summary                            Qubes template for fedora-36
template-description                        Qubes template for fedora-36
updates-available                           
last-updates-check                          2024-01-19 22:21:28

So my guess is that one step in the template upgrade guide is missing ;-)

Minimalist73 commented 9 months ago

@unman A proper fix for this issue is coming (see marmarek's commits) and will make this part of the documentation obsolete. I don't think this merge should close this issue until the changes in https://github.com/QubesOS/qubes-core-agent-linux/pull/481 and https://github.com/QubesOS/qubes-core-admin/pull/578 are merged.

andrewdavidwong commented 9 months ago

It looks like an accidental closure due to the keyword fixes in the commit message, but the keyword fixes appears in this context:

Partly fixes: https://github.com/QubesOS/qubes-issues/issues/8725
Still missing the other in-place template upgrade instructions.

...which makes it clear that the intention was not to close this issue.

loneicewolf commented 8 months ago

I have a similar issue on my Qubes!

Just Updated it and stuff, And.. Very bizzare 'error' (or, "warning", as it wasn't really any error) message, I have to admit.

if I remember correctly, it was just after I was done installing my new qubes (latest version) and ALWAYS a RED text would appear, on the qubes update GUI (which is advised in the docs)' "OBSOLETE" cubes are used, use the template manager to install the new template (something)' <- really, really weird. It's from a clean, from scratch, (completely new SSD as well) the latest Qubes Version, and I searched on this, and surprisingly there's only.. Like, 2 or maybe at most 3 (recent/actually relevant) results on google

Being extremely paranoid as I am, this really really making me confused, like, are they obsolete or updated?

Just wanted to point this out; if anyone else has this as well;

Minimalist73 commented 8 months ago

I have a similar issue on my Qubes!

Just Updated it and stuff, And.. Very bizzare 'error' (or, "warning", as it wasn't really any error) message, I have to admit.

if I remember correctly, it was just after I was done installing my new qubes (latest version) and ALWAYS a RED text would appear, on the qubes update GUI (which is advised in the docs)' "OBSOLETE" cubes are used, use the template manager to install the new template (something)' <- really, really weird. It's from a clean, from scratch, (completely new SSD as well) the latest Qubes Version, and I searched on this, and surprisingly there's only.. Like, 2 or maybe at most 3 (recent/actually relevant) results on google

Being extremely paranoid as I am, this really really making me confused, like, are they obsolete or updated?

Just wanted to point this out; if anyone else has this as well;

If you are talking about the bottom text in the updater GUI, it's an informative text that explain what "OBSOLETE" means when it appears next to a qube in the list. If you don't see any qubes having that, you don't have to worry about it.

loneicewolf commented 8 months ago

I have a similar issue on my Qubes! Just Updated it and stuff, And.. Very bizzare 'error' (or, "warning", as it wasn't really any error) message, I have to admit. if I remember correctly, it was just after I was done installing my new qubes (latest version) and ALWAYS a RED text would appear, on the qubes update GUI (which is advised in the docs)' "OBSOLETE" cubes are used, use the template manager to install the new template (something)' <- really, really weird. It's from a clean, from scratch, (completely new SSD as well) the latest Qubes Version, and I searched on this, and surprisingly there's only.. Like, 2 or maybe at most 3 (recent/actually relevant) results on google Being extremely paranoid as I am, this really really making me confused, like, are they obsolete or updated? Just wanted to point this out; if anyone else has this as well;

If you are talking about the bottom text in the updater GUI, it's an informative text that explain what "OBSOLETE" means when it appears next to a qube in the list. If you don't see any qubes having that, you don't have to worry about it.

Hello!

Thanks for the quick reply!

Okay, if that's the case, I misunderstood the text - my bad! thanks a lot for clarifying!

I did see some yellow (maybe) text on some of the qubes, this was solved by simply updating them. I did not see any red (obsolete) text on any of the qubes <- so you are correct; (Thanks again)

Thanks so much for this reply @Minimalist73!


Side note;

Possible Future Improvement of the text

And Have a great Weekend 👋🏼 💯
//loneicewolf

andrewdavidwong commented 8 months ago

Side note;

Possible Future Improvement of the text

Please open a separate issue for this.

qubesos-bot commented 7 months ago

Automated announcement from builder-github

The package core-agent-linux has been pushed to the r4.3 testing repository for the Debian template. To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing bookworm-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

qubesos-bot commented 7 months ago

Automated announcement from builder-github

The component core-agent-linux (including package core-agent-linux) has been pushed to the r4.3 testing repository for the Fedora template. To test this update, please install it with the following command:

sudo dnf update --enablerepo=qubes-vm-r4.3-current-testing

Changes included in this update

qubesos-bot commented 7 months ago

Automated announcement from builder-github

The component core-agent-linux (including package core-agent-linux) has been pushed to the r4.2 testing repository for the Fedora template. To test this update, please install it with the following command:

sudo dnf update --enablerepo=qubes-vm-r4.2-current-testing

Changes included in this update

qubesos-bot commented 7 months ago

Automated announcement from builder-github

The package core-agent-linux has been pushed to the r4.2 testing repository for the Debian template. To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing bookworm-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

qubesos-bot commented 7 months ago

Automated announcement from builder-github

The package core-agent-linux has been pushed to the r4.3 testing repository for the Debian template. To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing trixie-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

qubesos-bot commented 7 months ago

Automated announcement from builder-github

The component core-agent-linux (including package core-agent-linux) has been pushed to the r4.3 testing repository for the Fedora template. To test this update, please install it with the following command:

sudo dnf update --enablerepo=qubes-vm-r4.3-current-testing

Changes included in this update

qubesos-bot commented 7 months ago

Automated announcement from builder-github

The package core-agent-linux has been pushed to the r4.2 testing repository for the Debian template. To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing trixie-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

qubesos-bot commented 7 months ago

Automated announcement from builder-github

The component core-agent-linux (including package core-agent-linux) has been pushed to the r4.2 testing repository for the Fedora template. To test this update, please install it with the following command:

sudo dnf update --enablerepo=qubes-vm-r4.2-current-testing

Changes included in this update

qubesos-bot commented 7 months ago

Automated announcement from builder-github

The component core-agent-linux (including package core-agent-linux) has been pushed to the r4.2 testing repository for the Fedora template. To test this update, please install it with the following command:

sudo dnf update --enablerepo=qubes-vm-r4.2-current-testing

Changes included in this update

qubesos-bot commented 7 months ago

Automated announcement from builder-github

The component core-agent-linux (including package core-agent-linux) has been pushed to the r4.2 testing repository for the Fedora template. To test this update, please install it with the following command:

sudo dnf update --enablerepo=qubes-vm-r4.2-current-testing

Changes included in this update

qubesos-bot commented 7 months ago

Automated announcement from builder-github

The package core-agent-linux has been pushed to the r4.2 stable repository for the Debian template. To install this update, please use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

qubesos-bot commented 7 months ago

Automated announcement from builder-github

The package core-agent-linux has been pushed to the r4.2 stable repository for the Debian template. To install this update, please use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

qubesos-bot commented 7 months ago

Automated announcement from builder-github

The component core-agent-linux (including package core-agent-linux) has been pushed to the r4.2 stable repository for the Fedora template. To install this update, please use the standard update command:

sudo dnf update

Changes included in this update

qubesos-bot commented 7 months ago

Automated announcement from builder-github

The component core-agent-linux (including package core-agent-linux) has been pushed to the r4.2 stable repository for the Fedora template. To install this update, please use the standard update command:

sudo dnf update

Changes included in this update

qubesos-bot commented 7 months ago

Automated announcement from builder-github

The component core-agent-linux (including package core-agent-linux) has been pushed to the r4.2 stable repository for the Fedora template. To install this update, please use the standard update command:

sudo dnf update

Changes included in this update

qubesos-bot commented 7 months ago

Automated announcement from builder-github

The component core-agent-linux (including package core-agent-linux) has been pushed to the r4.2 stable repository for the Fedora template. To install this update, please use the standard update command:

sudo dnf update

Changes included in this update

kennethrrosen commented 5 months ago

This issue seems to have resurfaced in R4.2.1 using the testing repository, kernel 6.6.31-1. Updating qvm-features and rebooting does not fix.

marmarek commented 5 months ago

Which template specifically? What qvm-features shows and what is actually running inside? Do you see os-* qvm-features present?

kennethrrosen commented 5 months ago

@marmarek it was indeed the os-eol date in the template and standalone.

kennethrrosen commented 5 months ago

I've updated the above scripts to correct this

marmarek commented 5 months ago

Setting os-eol to +6 months manually is wrong, please do not do it. It should be set to the actual EOL date, and it should happen automatically on update. Can you say what value you've got, for which template (before and after upgrade)?

kennethrrosen commented 5 months ago

The os-eol 2024-05-21 (F38). What's a better way to populate the actual EOL date?

marmarek commented 5 months ago

The os-eol 2024-05-21 (F38).

This looks correct. Yes, Fedora 38 is EOL already, see the end of https://fedorapeople.org/groups/schedule/f-38/f-38-key-tasks.html

kennethrrosen commented 5 months ago

But the upgrade to F39 did not update the EOL date.

marmarek commented 5 months ago

Did you get any errors during upgrade? Retrieving EOL date is during the "Notifying dom0 about installed applications" phase.

kennethrrosen commented 5 months ago

None that I saw

marmarek commented 5 months ago

If for some reason it didn't happen automatically, you can also force refreshing it with qvm-run -u root --service fedora-39 qubes.PostInstall. But I'd like to learn why it didn't happen automatically...

CumpsD commented 5 months ago

My Fedora 38 templates became Obsolete and I just updated them all in-place to Fedora 40, but the Obsolete remains. What's the current fix for this? Apparently I need to restart the update widget, how to do that?

This is on Qubes R4.2.1 Kernel 6.6.2-1

marmarek commented 5 months ago

But I'd like to learn why it didn't happen automatically...

I have an (unconfirmed) idea: it's due to python upgrade. F38 has Python 3.11, but F39 has Python 3.12, so the DNF plugins migrate from /usr/lib/python3.11/site-packages/dnf-plugins to /usr/lib/python3.12/site-packages/dnf-plugins during update, but the running DNF still expects them in the former location. One issue with this hypothesis is that DNF log claims to load plugins at the start, so at the point the old location is removed, they should be loaded already. But in any case, I can confirm that the qubes-hooks does not report upgrade to dom0 after performing dnf distro-sync from F38 to F40 (and I guess to F39 too). But it does report it when doing dnf distro-sync within the same release.

What's the current fix for this? Apparently I need to restart the update widget, how to do that?

If you hit the same issue, install updates in the template once, it should refresh things. Or execute qvm-run command listed in my earlier comment.

As for the list of obsolete templates in the widget, indeed it looks to not refresh itself. You can restart the widget with systemctl --user qubes-widget@qui-updates command in dom0.

@marmarta ^^

alimirjamali commented 5 months ago

I tested the above patch for Tray Update Notifier by changing os-eol feature of archlinux templates to different times in future and past.