cockpit-project / cockpit-machines

Cockpit UI for virtual machines
GNU Lesser General Public License v2.1
291 stars 74 forks source link

cockpit-machines proposing only one ubuntu version (18.04) when creating a VM on debian 12 bookborm #1181

Open guerby opened 1 year ago

guerby commented 1 year ago

Hi,

While osinfo-db from debian 12 bookworm lists many versions of ubuntu:

https://packages.debian.org/bookworm/osinfo-db

(see "files")

The cockpit-machines VM creation dropdown for choosing OS only shows ubuntu version 18.04 (five years old) and no other ubuntu version.

Same with cockpit-machines 288-1 from bookworm/main and 295-1~bpo12+1 from bookworm/backports

Any idea?

Thanks!

garrett commented 1 year ago

Are the "many versions" older than 18.04?

cockpit-machines intentionally filters out EOL distributions; it only shows those that are still under active maintainence, with a little bit of "grace" time afterward.

guerby commented 1 year ago

Are the "many versions" older than 18.04?

cockpit-machines intentionally filters out EOL distributions; it only shows those that are still under active maintainence, with a little bit of "grace" time afterward.

No there is only ubuntu 18.04 proposed. More recent LTS like 20.04 or 22.04 are not proposed (these are the one I wanted to test using cockpit) and same for older version (I don't need them and I think the EOL filter is fine there).

garrett commented 1 year ago

Have you updated to the latest version of osinfo?

On Debian 12 here, I ran:

osinfo-query os -s version -f short-id,name,vendor,version,eol-date | grep -i ubuntu

And it shows the following (sorted by version and EOL date... and formatted in a markdown table):

Short ID Name Version Vendor End of life
ubuntu4.10 Ubuntu 4.10 4.10 Canonical Ltd 2006-04-30
ubuntu5.04 Ubuntu 5.04 5.04 Canonical Ltd 2006-10-31
ubuntu5.10 Ubuntu 5.10 5.10 Canonical Ltd 2007-04-13
ubuntu6.10 Ubuntu 6.10 6.10 Canonical Ltd 2008-04-26
ubuntu7.04 Ubuntu 7.04 7.04 Canonical Ltd 2008-10-19
ubuntu7.10 Ubuntu 7.10 7.10 Canonical Ltd 2009-04-18
ubuntu8.10 Ubuntu 8.10 8.10 Canonical Ltd 2010-04-30
ubuntu9.04 Ubuntu 9.04 9.04 Canonical Ltd 2010-10-23
ubuntu9.10 Ubuntu 9.10 9.10 Canonical Ltd 2011-04-30
ubuntu6.06 Ubuntu 6.06 LTS 6.06 Canonical Ltd 2011-06-01
ubuntu10.10 Ubuntu 10.10 10.10 Canonical Ltd 2012-04-10
ubuntu11.04 Ubuntu 11.04 11.04 Canonical Ltd 2012-10-28
ubuntu11.10 Ubuntu 11.10 11.10 Canonical Ltd 2013-05-09
ubuntu8.04 Ubuntu 8.04 LTS 8.04 Canonical Ltd 2013-05-09
ubuntu13.04 Ubuntu 13.04 13.04 Canonical Ltd 2014-01-27
ubuntu12.10 Ubuntu 12.10 12.10 Canonical Ltd 2014-05-16
ubuntu13.10 Ubuntu 13.10 13.10 Canonical Ltd 2014-07-17
ubuntu10.04 Ubuntu 10.04 LTS 10.04 Canonical Ltd 2015-04-30
ubuntu14.10 Ubuntu 14.10 14.10 Canonical Ltd 2015-07-23
ubuntu15.04 Ubuntu 15.04 15.04 Canonical Ltd 2016-02-04
ubuntu15.10 Ubuntu 15.10 15.10 Canonical Ltd 2016-07-28
ubuntu12.04 Ubuntu 12.04 LTS 12.04 Canonical Ltd 2017-04-28
ubuntu16.10 Ubuntu 16.10 16.10 Canonical Ltd 2017-07-20
ubuntu17.04 Ubuntu 17.04 17.04 Canonical Ltd 2018-01-13
ubuntu17.10 Ubuntu 17.10 17.10 Canonical Ltd 2018-07-19
ubuntu14.04 Ubuntu 14.04 LTS 14.04 Canonical Ltd 2019-04-17
ubuntu18.10 Ubuntu 18.10 18.10 Canonical Ltd 2019-07-18
ubuntu19.04 Ubuntu 19.04 19.04 Canonical Ltd 2020-01-23
ubuntu19.10 Ubuntu 19.10 19.10 Canonical Ltd 2020-07-17
ubuntu16.04 Ubuntu 16.04 16.04 Canonical Ltd 2021-04-21
ubuntu20.10 Ubuntu 20.10 20.10 Canonical Ltd 2021-07-22
ubuntu21.04 Ubuntu 21.04 21.04 Canonical Ltd 2022-01-20
ubuntu21.10 Ubuntu 21.10 21.10 Canonical Ltd 2022-07-14
ubuntu18.04 Ubuntu 18.04 LTS 18.04 Canonical Ltd 2023-04-26
ubuntu20.04 Ubuntu 20.04 LTS 20.04 Canonical Ltd  
ubuntu22.04 Ubuntu 22.04 LTS 22.04 Canonical Ltd  
ubuntu22.10 Ubuntu 22.10 22.10 Canonical Ltd  

The only ones that aren't EOL are 20.04, 22.04, and 22.10. Version 18.04 (which expired at the end of April) and before are all EOL.

$ 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/"
$ apt list "*osinfo*"
Listing... Done
gir1.2-libosinfo-1.0/stable 1.10.0-2 amd64
golang-github-blackfireio-osinfo-dev/stable 1.0.3-2 all
libosinfo-1.0-0/stable,now 1.10.0-2 amd64 [installed,automatic]
libosinfo-1.0-dev/stable 1.10.0-2 amd64
libosinfo-bin/stable,now 1.10.0-2 amd64 [installed]
libosinfo-l10n/stable,now 1.10.0-2 all [installed,automatic]
osinfo-db-tools/stable,now 1.10.0-1 amd64 [installed]
osinfo-db/stable,now 0.20221130-2 all [installed,automatic]

What happens when you run osinfo-query os -s version -f short-id,name,vendor,version,eol-date | grep -i ubuntu ?

What version of osinfo packages do you have installed?

guerby commented 1 year ago

Hi,

Like I described in the first message of this issue, osinfo from debian 12 has plenty of ubuntu, see below.

The real issue is that cockpit machine when creating a VM only propose ONE ubuntu versio, which is 18.04.

It does not propose any other ubuntu version

It does not propose ubuntu 22.04, ubuntu 20.04 etc...

Now that I'm looking at the output of osinfo-query I see that ubuntu 18.04 has an EOL date but not 20.04 nor 22.04, may be cockpit OS filtering is wrong in the case of an empty EOL date?

ii  osinfo-db                                      0.20221130-2                           all          Operating system database files

# osinfo-query os -s version -f short-id,name,vendor,version,eol-date | grep -i ubuntu
 ubuntu10.04          | Ubuntu 10.04 LTS                                   | 10.04    | Canonical Ltd             | 2015-04-30  
 ubuntu10.10          | Ubuntu 10.10                                       | 10.10    | Canonical Ltd             | 2012-04-10  
 ubuntu11.04          | Ubuntu 11.04                                       | 11.04    | Canonical Ltd             | 2012-10-28  
 ubuntu11.10          | Ubuntu 11.10                                       | 11.10    | Canonical Ltd             | 2013-05-09  
 ubuntu12.04          | Ubuntu 12.04 LTS                                   | 12.04    | Canonical Ltd             | 2017-04-28  
 ubuntu12.10          | Ubuntu 12.10                                       | 12.10    | Canonical Ltd             | 2014-05-16  
 ubuntu13.04          | Ubuntu 13.04                                       | 13.04    | Canonical Ltd             | 2014-01-27  
 ubuntu13.10          | Ubuntu 13.10                                       | 13.10    | Canonical Ltd             | 2014-07-17  
 ubuntu14.04          | Ubuntu 14.04 LTS                                   | 14.04    | Canonical Ltd             | 2019-04-17  
 ubuntu14.10          | Ubuntu 14.10                                       | 14.10    | Canonical Ltd             | 2015-07-23  
 ubuntu15.04          | Ubuntu 15.04                                       | 15.04    | Canonical Ltd             | 2016-02-04  
 ubuntu15.10          | Ubuntu 15.10                                       | 15.10    | Canonical Ltd             | 2016-07-28  
 ubuntu16.04          | Ubuntu 16.04                                       | 16.04    | Canonical Ltd             | 2021-04-21  
 ubuntu16.10          | Ubuntu 16.10                                       | 16.10    | Canonical Ltd             | 2017-07-20  
 ubuntu17.04          | Ubuntu 17.04                                       | 17.04    | Canonical Ltd             | 2018-01-13  
 ubuntu17.10          | Ubuntu 17.10                                       | 17.10    | Canonical Ltd             | 2018-07-19  
 ubuntu18.04          | Ubuntu 18.04 LTS                                   | 18.04    | Canonical Ltd             | 2023-04-26  
 ubuntu18.10          | Ubuntu 18.10                                       | 18.10    | Canonical Ltd             | 2019-07-18  
 ubuntu19.04          | Ubuntu 19.04                                       | 19.04    | Canonical Ltd             | 2020-01-23  
 ubuntu19.10          | Ubuntu 19.10                                       | 19.10    | Canonical Ltd             | 2020-07-17  
 ubuntu20.04          | Ubuntu 20.04 LTS                                   | 20.04    | Canonical Ltd             |             
 ubuntu20.10          | Ubuntu 20.10                                       | 20.10    | Canonical Ltd             | 2021-07-22  
 ubuntu21.04          | Ubuntu 21.04                                       | 21.04    | Canonical Ltd             | 2022-01-20  
 ubuntu21.10          | Ubuntu 21.10                                       | 21.10    | Canonical Ltd             | 2022-07-14  
 ubuntu22.04          | Ubuntu 22.04 LTS                                   | 22.04    | Canonical Ltd             |             
 ubuntu22.10          | Ubuntu 22.10                                       | 22.10    | Canonical Ltd             |             
 ubuntu4.10           | Ubuntu 4.10                                        | 4.10     | Canonical Ltd             | 2006-04-30  
 ubuntu5.04           | Ubuntu 5.04                                        | 5.04     | Canonical Ltd             | 2006-10-31  
 ubuntu5.10           | Ubuntu 5.10                                        | 5.10     | Canonical Ltd             | 2007-04-13  
 ubuntu6.06           | Ubuntu 6.06 LTS                                    | 6.06     | Canonical Ltd             | 2011-06-01  
 ubuntu6.10           | Ubuntu 6.10                                        | 6.10     | Canonical Ltd             | 2008-04-26  
 ubuntu7.04           | Ubuntu 7.04                                        | 7.04     | Canonical Ltd             | 2008-10-19  
 ubuntu7.10           | Ubuntu 7.10                                        | 7.10     | Canonical Ltd             | 2009-04-18  
 ubuntu8.04           | Ubuntu 8.04 LTS                                    | 8.04     | Canonical Ltd             | 2013-05-09  
 ubuntu8.10           | Ubuntu 8.10                                        | 8.10     | Canonical Ltd             | 2010-04-30  
 ubuntu9.04           | Ubuntu 9.04                                        | 9.04     | Canonical Ltd             | 2010-10-23  
 ubuntu9.10           | Ubuntu 9.10                                        | 9.10     | Canonical Ltd             | 2011-04-30  
garrett commented 1 year ago

Thanks for following up with the list!

Cockpit is supposed to show it the release if there's no EOL date.

I'm seeing the same problem when searching for Ubuntu from Fedora with a freshly built Cockpit Machines from main.

image

KKoukiou commented 1 year ago

The reason they are filtered out is that all Ubuntu releases after 18.04 appear as non-tree installable to our script. https://github.com/cockpit-project/cockpit-machines/blob/main/src/getOSList.py#L90

This is probably an issue in osinfo-db files, needs further debugging.

KKoukiou commented 1 year ago

https://gitlab.com/libosinfo/osinfo-db/-/merge_requests/661 Fixes part of the problem. The missing tree info needs to be reported and addressed as well.

KKoukiou commented 1 year ago

Debugged this and it seems that any Ubuntu release after Focal, does not offer the installation tree; as a result we detect it here as non-tree installable and filter it out from the list of the OSes that can be auto-downloaded: Read about it here; https://discourse.ubuntu.com/t/ubuntu-22-04-pxe-uefi-netboot-desktop-installation/27841/7

@martinpitt you might know more about this?

martinpitt commented 1 year ago

@KKoukiou Sorry, I have no idea at all about archive reorgs after 2016 :cry: What is an "installation tree" in the Debian sense? The only difference between http://archive.ubuntu.com/ubuntu/dists/jammy/main/ and http://archive.ubuntu.com/ubuntu/dists/lunar/main/ that I can see is that the former still has an empty http://archive.ubuntu.com/ubuntu/dists/jammy/main/installer-amd64/ subdir, but not sure what that is. Possibly they stopped supporting the package-based installer and only support the image-based ubiquity and subiquity?

KKoukiou commented 1 year ago

@martinpitt this is exactly the directory that osinfo DB checks for existance to mark a distro as tree installable. I don't recall why we implemented the "Download an OS" option to use the tree installation media. Probably we need to adjust to use an ISO image.

KKoukiou commented 1 year ago

For this to be solved we need to check on replacing the treeinfo instalallation media with a url to the ISO file

notAutomne commented 11 months ago

Hello, I'm also looking for this feature, any ETA ?

fbruand commented 8 months ago

Hello, I have just encountered the same problem.

I'm also wondering if it wouldn't be possible to have a checkbox for older versions that are considered discontinued in "Download an OS", but work with it? In some situations, this could be useful, like when I needed Debian 8.

garrett commented 8 months ago

I explained how this should be implemented at: https://github.com/cockpit-project/cockpit-machines/issues/509#issuecomment-1031406722

It should not be a checkbox, but should be an:

It's not high on our list of priorities to implement a way to download old and insecure OSes, so this hasn't been implement and is not on any current roadmap. If someone wants to implement this feature to how it is specified (that is, above and also: not by adding a checkbox), then we could look at a PR and help guide it to a mergeable state.

Meanwhile, as a workaround: anyone using insecure, old OSes can download the image file manually and still use that within Cockpit Machines.