Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal templates are missing distro-info-data package by default #9343

Closed
TNTBOMBOM opened this issue Jul 8, 2024 · 23 comments · Fixed by QubesOS/qubes-core-agent-linux#512
Labels
affects-4.2 This issue affects Qubes OS 4.2. C: templates diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. pr submitted A pull request has been submitted for this issue. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@TNTBOMBOM
Copy link

How to file a helpful issue

Qubes OS release

4.2.2-rc1

Brief summary

The notification is wrong in two ways:

  • The names that the notification mention is for StandaloneVMs, not templates.
  • The StandaloneVMs are upgraded to latest stable debian (internal upgrade from debian 11 to 12).

Steps to reproduce

Create StandaloneVM from an old debian, upgrade it internally.

Expected behavior

  • Should differentiate between Templates and StandaloneVMs (nomenclature correction).
  • Should either understand that the StandaloneVM upgraded already OR ignore it since its a StandaloneVM not a template (because this is wont be a Qubes issue to solve anymore if its outdated).

Screenshot

standalonewrong

@TNTBOMBOM TNTBOMBOM added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. labels Jul 8, 2024
@alimirjamali
Copy link

alimirjamali commented Jul 8, 2024

  • The StandaloneVMs are upgraded to latest stable debian (internal upgrade from debian 11 to 12).

What is the version of qubes-desktop-linux-manager on your system? (use dnf info to find it) There was a recent fix in v4.2.24 for that notification. The notification might go away if you restart your system or restart the qui-updates service via this command:

systemctl --user restart [email protected]
  • The names that the notification mention is for StandaloneVMs, not templates.

That is correct. The text Install new templates with Template Manager could be changed to something like Install new templates with Template Manager or do in-place release upgrade of the outdated qubes. But I am not in a position to suggest the exact wording of it. It is just a suggestion.

@TNTBOMBOM
Copy link
Author

There was a recent fix in v4.2.24 for that notification.

Im already on 4.2.24

The notification might go away if you restart your system or restart the qui-updates service via this command:

Didnt went away, im pretty sure the scenario im in is not defined by the qui-updates tool to know it. I see it either ignoring StandalonVMs or implement sanity to know the internals of the StandaloneVMs packages status.

@alimirjamali
Copy link

What is the output of this command in the StandaloneVM:

grep SUPPORT_END /etc/os-release

And output of this command in dom0:

qvm-features VMNAME os-eol

@TNTBOMBOM
Copy link
Author

grep SUPPORT_END /etc/os-release

[user ~]% grep SUPPORT_END /etc/os-release
zsh: exit 1     grep --color=auto SUPPORT_END /etc/os-release
[user ~]% cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
[user ~]% 

qvm-features VMNAME os-eol

No output.

@alimirjamali
Copy link

alimirjamali commented Jul 9, 2024

Thanks. Very useful information. Now we know that we are dealing with a standalone which does not provide SUPPORT_END data.

Just to double check, the standalone VM name is not debian-11? These are the hard-coded template/standalone VM names which will always show the unsupported popup.

@TNTBOMBOM
Copy link
Author

TNTBOMBOM commented Jul 9, 2024

Just to double check, the standalone VM name is not debian-11?

it is not named debian-11.

These are the hard-coded template/standalone VM names which will always show the unsupported popup.

I see, but its not getting the OS reading from /etc/os-release within StandaloneVM, somewhere else where debian 11 still mentioned or so.

@alimirjamali
Copy link

Just to double check, the standalone VM name is not debian-11?

Nope its not debian-11.

These are the hard-coded template/standalone VM names which will always show the unsupported popup.

I see, but its not getting the OS reading from /etc/os-release within StandaloneVM, somewhere else where debian 11 still mentioned or so.

Yes. What is the output of qvm-features VMNAME template-name

@marmarek
Copy link
Member

marmarek commented Jul 9, 2024

qvm-features VMNAME os-eol

No output.

Is this template using repositories for R4.2? debian-11 wasn't supported on R4.2, so it's likely a template imported from R4.1 and as such it won't tell the EOL date. If that's the case, the notification about unsupported template is almost accurate, as R4.1 indeed is EOL already

@andrewdavidwong
Copy link
Member

andrewdavidwong commented Jul 9, 2024

Just to double check, the standalone VM name is not debian-11?

Nope its not debian-11.

These are the hard-coded template/standalone VM names which will always show the unsupported popup.

I see, but its not getting the OS reading from /etc/os-release within StandaloneVM, somewhere else where debian 11 still mentioned or so.

Debian 11 hasn't reached EOL yet anyway. It's expected to reach EOL sometime this month, but it hasn't yet:

https://wiki.debian.org/DebianReleases

@andrewdavidwong andrewdavidwong added C: manager/widget needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. affects-4.2 This issue affects Qubes OS 4.2. labels Jul 9, 2024
@TNTBOMBOM
Copy link
Author

TNTBOMBOM commented Jul 10, 2024

Yes. What is the output of qvm-features VMNAME template-name

debian-11-minimal

so it's likely a template imported from R4.1

Yep

the notification about unsupported template is almost accurate

Hmm.. not sure how much accurate it is e.g:

  • Not a template
  • Not debian 11 anymore, it has been upgraded to debian 12 (internally)
  • Not installed from qubes repository, so there is nothing qubes can do/advise except a within VM upgrade (which is what has been done), meaning the error almost useless if its not talking about upgrading the internals. Unless a suggestion should be like backup the VM data and shift it to a newly created/installed qube/VM based on the latest version of x (can be debian or fedora..etc).

@alimirjamali
Copy link

alimirjamali commented Jul 10, 2024

Debian 11 hasn't reached EOL yet anyway.

The EOL for Debian 11 is set to 1st July in the JSON file. This could be changed to 31 August which is its real EOL date. But I guess the change will reach the main stream too late to be available to the end users.

debian-11-minimal

@TNTBOMBOM could you unset or change that feature? Something like:

qvm-features --unset VMNAME template-name

or

qvm-features VMNAME template-name debian-12-minimal

Then restart the updates widget and see if the notification goes away.

@marmarek
Copy link
Member

so it's likely a template imported from R4.1

Yep

Is it updated to R4.2 repositories? Check /etc/apt/sources.list.d/qubes-r4.list - does it have "r4.2" or "r4.1" in URLs?

@alimirjamali
Copy link

alimirjamali commented Jul 10, 2024

Is it updated to R4.2 repositories? Check /etc/apt/sources.list.d/qubes-r4.list - does it have "r4.2" or "r4.1" in URLs?

I see. The 10-qubes-core-agent-features.sh should set the correct os-eol post upgrade, using /usr/share/distro-info/debian.csv file.

@marmarek
Copy link
Member

I see. The 10-qubes-core-agent-features.sh should set the correct os-eol post upgrade, using /usr/share/distro-info/debian.csv file.

Well, not if the template is still using R4.1 qubes packages...

@TNTBOMBOM
Copy link
Author

TNTBOMBOM commented Jul 10, 2024

@TNTBOMBOM could you unset or change that feature? Something like:

qvm-features --unset VMNAME template-name

or

qvm-features VMNAME template-name debian-12-minimal

Then restart the updates widget and see if the notification goes away.

This trick made it, the notification went away.

Is it updated to R4.2 repositories? Check /etc/apt/sources.list.d/qubes-r4.list - does it have "r4.2" or "r4.1" in URLs?

Yes its r4.2:

[user ~]% cat /etc/apt/sources.list.d/qubes-r4.list
# Main qubes updates repository
deb [arch=amd64 signed-by=/usr/share/keyrings/qubes-archive-keyring-4.2.gpg ] https://deb.qubes-os.org/r4.2/vm bookworm main

@alimirjamali
Copy link

alimirjamali commented Jul 11, 2024

This trick made it, the notification went away.

Would you please run this in your standalone VM:

/etc/qubes/post-install.d/10-qubes-core-agent-features.sh

Then tell us the output of this command in dom0:

qvm-features VMNAME os-eol

@TNTBOMBOM
Copy link
Author

Then tell us the output of this command in dom0:

No output shown.

@alimirjamali
Copy link

No output shown.

Interesting. One last question. What is the version of qubes-core-agent on the standalone VM. You could find it it via:

apt info qubes-core-agent

@marmarek
Copy link
Member

/etc/qubes/post-install.d/10-qubes-core-agent-features.sh

This on its own is not enough, there is "commit" action in the last file.
Better run the whole /etc/qubes-rpc/qubes.PostInstall (either this way from within a qube, or from dom0 via qvm-run -u root --service QUBE_NAME qubes.PostInstall).

@TNTBOMBOM
Copy link
Author

apt info qubes-core-agent
[user ~]%  apt info qubes-core-agent
Package: qubes-core-agent
Version: 4.2.35-1+deb12u1

/etc/qubes/post-install.d/10-qubes-core-agent-features.sh

This on its own is not enough, there is "commit" action in the last file. Better run the whole /etc/qubes-rpc/qubes.PostInstall (either this way from within a qube, or from dom0 via qvm-run -u root --service QUBE_NAME qubes.PostInstall).

Done both, no output for

qvm-features VMNAME os-eol

Actually what i have discovered is that this feature doesnt show anything for debian minimal even installed freshly, so this is not an issue of previous debians not showing any output but even new one (only minimal, full/standard does show an output).

So to reproduce is easy:

  • Get debian-minimal
  • Check output for eol
  • Which part is missing?

@marmarek
Copy link
Member

(only minimal, full/standard does show an output).

🤦 Even though you said it several times, we missed this part...
The EOL date is retrieved using distro-info-data package, and I guess this package is not installed in minimal template...

@TNTBOMBOM
Copy link
Author

TNTBOMBOM commented Jul 12, 2024

and I guess this package is not installed in minimal template...

user@host:~$ apt policy distro-info-data 
distro-info-data:
  Installed: (none)
  Candidate: 0.58+deb12u2
  Version table:
     0.58+deb12u2 500
        500 https://deb.debian.org/debian bookworm/main amd64 Packages
user@host:~$ 

true not there..

@andrewdavidwong andrewdavidwong changed the title Incorrect notification about "Some qubes are no longer supported!" Minimal templates are missing distro-info-data package by default Jul 12, 2024
@andrewdavidwong andrewdavidwong added diagnosed Technical diagnosis has been performed (see issue comments). and removed needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. labels Jul 12, 2024
@andrewdavidwong
Copy link
Member

All Qubes templates, including minimal templates, should ship with all the packages they need in order to function properly as Qubes templates inside of Qubes OS. What makes minimal templates minimal is not lacking what they need to function properly. Rather, it's lacking anything beyond that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.2 This issue affects Qubes OS 4.2. C: templates diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. pr submitted A pull request has been submitted for this issue. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
4 participants