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

[BUG] Switching preset does not check for default values, which can end up being used as a config for other presets #3633

Closed
gbraad opened this issue May 5, 2023 · 1 comment

Comments

@gbraad
Copy link
Contributor

gbraad commented May 5, 2023

Also crc has strange behaviour on CPUS, when I switch preset, it keeps CPU configuration, so only RAM is changed.

crc.json

{
  "consent-telemetry": "yes",
  "cpus": "2",
  "preset": "microshift"
}
PS> crc config view
- consent-telemetry                     : yes
- preset                                : microshift
PS> crc config set preset openshift
PS> crc config view
- consent-telemetry                     : yes
- cpus                                  : 2

when you switch to the microshift preset, it does not clear same as default values... this means the cpus remains in the config file. when switching, the backend should do a lower than check and override

A preset is a combination of bundle, cpus, memory, disksize. this means that they should be enforced and checked for defaults. if you have 2 for microshift, for some reason (as it got there), and when you switch preset... we should either do a default check on all values... or just immediately do a check for lower than default and override

Note: even moving back to the default preset, should enforce all values to adhere to the default preset (openshift in this case)


example

{
  "consent-telemetry": "yes",
  "cpus": "2",
  "preset": "microshift"
}
ps> crc config unset preset

should result in:

{
  "consent-telemetry": "yes",
}

Easy to reproduce with:

PS> crc config set preset microshift
PS> crc config set cpus 2
PS> crc config set preset openshift
PS> crc config view

regardless of what has been set before

While:

PS> crc config set preset openshift
PS> crc config set cpus 2

does report the correct error.

crc-org/crc-extension#87 (comment)

@anjannath
Copy link
Member

Fixed via #3636 a follow up for disk-size option is created #3638

@github-project-automation github-project-automation bot moved this from Scheduled to Done in Project planning: crc May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

3 participants