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

login: Beibooting to all supported OSes #21501

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

martinpitt
Copy link
Member

@martinpitt martinpitt commented Jan 9, 2025

Previously we only allowed beibooting to the same target OS as the host.
But we know which OSes Cockpit works on -- exactly the ones which we
have in CI. So check the remote OS against a list of known supported
ones.

Building that supported list isn't quite easy, though: It roughly
corresponds to our bots/lib/testmap.py, but not quite -- e.g.
"debian-stable" is "Debian 12" right now. So for the time being, keep
that list static. We'll have to update it for each new OS that we
support, but our integration tests will tell us.

In the future we might be doing something clever, like automatically
collecting os-release files from all our supported images in bots, and
use that to auto-build osinfo.py.

Enable the "incompatible future OS version" check for Debian/Arch as
well, by appending a VERSION_ID.

https://issues.redhat.com/browse/COCKPIT-1193

Packageless session for all supported operating systems

Cockpit 327 introduced support for connecting to remote machines without any installed Cockpit packages. That only worked if the local and remote machine had the same operating system version. This version extends this "packageless session" feature to all operating systems which Cockpit continuously tests. At the time of writing this includes:

  • Arch
  • CentOS Stream 9, 10
  • Debian 12, testing/unstable
  • Fedora Linux 40, 41, 42 (rawhide)
  • Red Hat Enterprise Linux 8, 9, 10
  • Ubuntu 22.04 LTS, 24.04 LTS, 24.10

This list will change over time, along with new operating system releases and their end-of-lives.

@martinpitt martinpitt added release-note blocked Don't land until something else happens first (see task list) labels Jan 10, 2025
@martinpitt martinpitt requested a review from garrett January 10, 2025 09:41
@martinpitt
Copy link
Member Author

@garrett Can we discuss the "unsupported" error message for a bit? I put screenshots in the description. Thanks!

@martinpitt martinpitt removed the blocked Don't land until something else happens first (see task list) label Jan 10, 2025
@garrett
Copy link
Member

garrett commented Jan 14, 2025

This is really an error message about not being able to connect via any available method, not the packageless beiboot method, right? That's just one means where it cannot connect. So we should rework the error message to be more about how Cockpit is not available on the remote machine, either by a package or a through sessionless injection.

What about something like this?

login-beiboot-compatibility-error

Text:

  • Remote server does not support web console
  • $SERVER is not compatible with a packageless session and does not currently have the Cockpit Web Console installed.
    Install cockpit-system (and optionally other Cockpit packages) on the remote server to enable Web Console access.

I guess we could probably even go with a shorter message like this:

login-beiboot-compatibility-error(1)

Text:

  • Remote server does not support packageless sessions
  • Install cockpit-system (and optionally other Cockpit packages) on the remote server to enable Web Console access.

WDYT?

@martinpitt
Copy link
Member Author

@garrett I agree, KISS. Incidentally that's almost what we already had, except for dropping the "only supported on distro" string. So my current version looks like this, which is a bit shorter and avoids changing translatable strings. Specifically, I wanted to avoid the word "server" -- the remote machine could be a laptop, container, or anything else.

image

Previously we only allowed beibooting to the same target OS as the host.
But we know which OSes Cockpit works on -- exactly the ones which we
have in CI. So check the remote OS against a list of known supported
ones.

Building that supported list isn't quite easy, though: It *roughly*
corresponds to our bots/lib/testmap.py, but not quite -- e.g.
"debian-stable" is "Debian 12" right now. So for the time being, keep
that list static. We'll have to update it for each new OS that we
support, but our integration tests will tell us.

In the future we might be doing something clever, like automatically
collecting `os-release` files from all our supported images in bots, and
use that to auto-build `osinfo.py`.

Enable the "incompatible future OS version" check for Debian/Arch as
well, by appending a `VERSION_ID`.

https://issues.redhat.com/browse/COCKPIT-1193
@martinpitt martinpitt requested a review from jelly January 15, 2025 07:36
@martinpitt martinpitt marked this pull request as ready for review January 15, 2025 08:15
@martinpitt martinpitt removed the request for review from garrett January 15, 2025 08:20
Copy link
Member

@garrett garrett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, this works for me. Simple, and probably straightforward enough.

We could have a page that explains things and link to it (but we'd probably want another explanation page for RHEL than for community). But if we had that, it'd be an enhancement for later.

Copy link
Member

@jelly jelly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly good, just have one question about how we handle cockpit plugins.

# match/describe CentOS separately, it's the upstream of all RHEL clones
{"ID": "centos", "PLATFORM_ID": "platform:el9"},
{"ID": "centos", "PLATFORM_ID": "platform:el10"},
{"PLATFORM_ID": "platform:el8"},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allowing RHEL 8 means I can beiboot into a machine and get files there which won't work so maybe we should not allow that?

Also notably opensuse-tumbleweed is absent but we don't test it yet in CI I suppose :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that's true, the same would already happen with the Client or the ws container, right? Please remind me why it doesn't work, something something old Python version, or kernel not supporting something fancy that we do in the bridge (fsinfo channel)?

I tried to log into a rhel-8-10 VM with our Flatpak, and it does not show Files. I'm not sure, perhaps the "requires cockpit > 318" in the manifest? (But that'd be weird, it's 331). I'll check later.

I'm happy to remove el8 from this list for the time being.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need fsinfo which is not in RHEL 8. Ah right if this is already handled in the manifest that is fine then?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh, sorry, that was PEBCAK -- my VM already had cockpit-brige.rpm installed. After removing it, the File page appears in the Client, and works quite well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, in summary: Files in particular works fine. If there is a page which doesn't work somewhere, we need to hide it via manifest conditions, so that it DTRT in ws and Client.

@martinpitt martinpitt requested a review from jelly January 15, 2025 14:16
@martinpitt martinpitt merged commit d9b5815 into cockpit-project:main Jan 15, 2025
86 of 87 checks passed
@martinpitt martinpitt deleted the beiboot-oses branch January 15, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants