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

storage: Allow Anaconda to override feature detection #21150

Conversation

mvollmer
Copy link
Member

@mvollmer mvollmer commented Oct 22, 2024

See #20844.

@mvollmer
Copy link
Member Author

@M4rtinK, would this be what Anaconda needs?

@mvollmer mvollmer force-pushed the storage-anaconda-feature-config branch from 09c0e1a to 94addba Compare October 23, 2024 07:05
@jkonecny12
Copy link

I think this is still valuable to us.
@KKoukiou WDYT?

@mvollmer
Copy link
Member Author

I think this is still valuable to us. @KKoukiou WDYT?

Alright! I get this into shape.

@mvollmer mvollmer force-pushed the storage-anaconda-feature-config branch 2 times, most recently from b6a6f65 to 102d69f Compare January 10, 2025 08:54
@mvollmer mvollmer force-pushed the storage-anaconda-feature-config branch from 102d69f to 5552b5b Compare January 10, 2025 09:19
@garrett
Copy link
Member

garrett commented Jan 13, 2025

This was being discussed on Anaconda Slack again.

I'm writing my thoughts (same as I've mentioned before) here too:

If something is available on the system, then show it. If that feature is not available on the system, do not show it. We should determine whether a feature would be shown by default based on how the ISO is built, which basically means whether a package is included or not on a build, and Cockpit would check if the feature is available at a feature-level. (Live workstation ISOs will have different packages from server ISOs, and the two will have different features exposed based on the capability of the system due to the packages installed.)

There should be nothing special about Anaconda, except maybe things are built or configured in such a way as to never offer installation from within Cockpit. (This doesn't have to be Anaconda-specific.)

If someone installs something on a live system before opening Cockpit Storage in Anaconda, they'll see it. If they know how to install something, they probably know how to use it, and that's that. They have "their own shotgun for their own foot" (so to speak) and can deal with the ramifications of having a more complicated UI than intended.

We need to make sure things are correct by default. We can't ever cover every case, like "What if someone does XYZ in the terminal while the system is running?" People already can do all sorts of wacky self-sabotaging things when they have a command line on a Workstation ISO, and I think this is no different.


Summary:

  1. Features based on what's installed on the system. (This is what Cockpit currently does.)
  2. No prompts for network installation, even if there's an available network connection. (Cockpit currently has live installs when possible. We want to make sure that's not ever possible when running inside of Anaconda, one way or another.)

@martinpitt
Copy link
Member

Thanks @garrett This also matches my gut feeling -- I don't see the necessity to provide a config system for this. PR #20950 should already disable the on-demand install in Anaconda mode (point 2). So is there still actually something to change? @KKoukiou @jkonecny12 as you previously mentioned your support/request for this PR, has this changed in yesterday's discussion, or did the summary miss something? Thanks!

@mvollmer mvollmer force-pushed the storage-anaconda-feature-config branch from 5552b5b to 7eaa3b2 Compare January 14, 2025 07:28
@jkonecny12
Copy link

I think the summary has its point. No more objections from my side. If we find this is requested in the future we can start the discussion again. However, so far I think this is the best option.

Comment on lines +897 to +898
} catch (error) {
console.warn("Can't enable storaged btrfs module", error.toString());
Copy link
Contributor

Choose a reason for hiding this comment

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

These 2 added lines are not executed by any test.

Comment on lines +911 to +912
} catch (error) {
console.warn("Can't enable storaged iscsi module", error.toString());
Copy link
Contributor

Choose a reason for hiding this comment

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

These 2 added lines are not executed by any test.

Comment on lines +924 to +925
} catch (error) {
console.warn("Can't enable storaged lvm2 module", error.toString());
Copy link
Contributor

Choose a reason for hiding this comment

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

These 2 added lines are not executed by any test.

Comment on lines +931 to +933
if (!client.anaconda_feature("vdo")) {
client.features.lvm_create_vdo = false;
return Promise.resolve();
Copy link
Contributor

Choose a reason for hiding this comment

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

These 3 added lines are not executed by any test.

Comment on lines +941 to +943
if (!client.anaconda_feature("legacy-vdo")) {
client.features.legacy_vdo = false;
return Promise.resolve();
Copy link
Contributor

Choose a reason for hiding this comment

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

These 3 added lines are not executed by any test.

@mvollmer mvollmer marked this pull request as ready for review January 14, 2025 08:31
@mvollmer
Copy link
Member Author

Ok, let's archive this.

@mvollmer mvollmer closed this Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants