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] crc config set regression after commit f9a0a4a83 #3663

Closed
cfergeau opened this issue May 16, 2023 · 6 comments
Closed

[BUG] crc config set regression after commit f9a0a4a83 #3663

cfergeau opened this issue May 16, 2023 · 6 comments
Labels

Comments

@cfergeau
Copy link
Contributor

Before commit f9a0a4a:

$ crc config set preset openshift
$ crc config set cpus 5
Changes to configuration property 'cpus' are only applied when the CRC instance is started.
If you already have a running CRC instance, then for this configuration change to take effect, stop the CRC instance with 'crc stop' and restart it with 'crc start'.
$ crc config set cpus 4
Changes to configuration property 'cpus' are only applied when the CRC instance is started.
If you already have a running CRC instance, then for this configuration change to take effect, stop the CRC instance with 'crc stop' and restart it with 'crc start'.
$

After commit f9a0a4a, when setting cpus to its default value we no longer get the warning:

$ crc config set cpus 5
Changes to configuration property 'cpus' are only applied when the CRC instance is started.
If you already have a running CRC instance, then for this configuration change to take effect, stop the CRC instance with 'crc stop' and restart it with 'crc start'.
$ crc config set cpus 4
$
@cfergeau cfergeau added kind/bug Something isn't working status/need triage labels May 16, 2023
@gbraad
Copy link
Contributor

gbraad commented May 16, 2023

has the value been set (removed from the config/reset to default)?

@cfergeau
Copy link
Contributor Author

has the value been set (removed from the config/reset to default)?

Yes, it's only the message which is missing:

$ crc config get cpus 
Configuration property 'cpus' is not set. Default value is '4'

cfergeau added a commit to cfergeau/crc that referenced this issue May 17, 2023
This should fix crc-org#3663

Before this commit, the steps below

$ crc config set preset openshift
$ crc config set cpus 4

no longer print:

Changes to configuration property 'cpus' are only applied when the CRC instance is started.
If you already have a running CRC instance, then for this configuration change to take effect, stop the CRC instance with 'crc stop' and restart it with 'crc start'.
cfergeau added a commit to cfergeau/crc that referenced this issue May 17, 2023
This should fix crc-org#3663

Before this commit, the steps below

$ crc config set preset openshift
$ crc config set cpus 4

no longer print:

Changes to configuration property 'cpus' are only applied when the CRC instance is started.
If you already have a running CRC instance, then for this configuration change to take effect, stop the CRC instance with 'crc stop' and restart it with 'crc start'.
cfergeau added a commit to cfergeau/crc that referenced this issue May 17, 2023
This should fix crc-org#3663

Before this commit, the steps below

$ crc config set preset openshift
$ crc config set cpus 4

no longer print:

Changes to configuration property 'cpus' are only applied when the CRC instance is started.
If you already have a running CRC instance, then for this configuration change to take effect, stop the CRC instance with 'crc stop' and restart it with 'crc start'.
cfergeau added a commit to cfergeau/crc that referenced this issue May 17, 2023
This should fix crc-org#3663

Before this commit, the steps below

$ crc config set preset openshift
$ crc config set cpus 4

no longer print:

Changes to configuration property 'cpus' are only applied when the CRC instance is started.
If you already have a running CRC instance, then for this configuration change to take effect, stop the CRC instance with 'crc stop' and restart it with 'crc start'.
@jsliacan
Copy link
Contributor

Not sure if this can go under the same issue (new default values behavior).

$ crc config set preset openshift
$ echo $?
0
$ crc config get preset
Configuration property 'preset' is not set. Default value is 'openshift'
$ echo $?
1

I'm doing some checks in tests and exitcode 1 is not what I would expect given that I just successfully set a preset.

cfergeau added a commit to cfergeau/crc that referenced this issue May 23, 2023
This should fix crc-org#3663

Before this commit, the steps below

$ crc config set preset openshift
$ crc config set cpus 4

no longer print:

Changes to configuration property 'cpus' are only applied when the CRC instance is started.
If you already have a running CRC instance, then for this configuration change to take effect, stop the CRC instance with 'crc stop' and restart it with 'crc start'.
cfergeau added a commit to cfergeau/crc that referenced this issue May 23, 2023
This should fix crc-org#3663

Before this commit, the steps below

$ crc config set preset openshift
$ crc config set cpus 4

no longer print:

Changes to configuration property 'cpus' are only applied when the CRC instance is started.
If you already have a running CRC instance, then for this configuration change to take effect, stop the CRC instance with 'crc stop' and restart it with 'crc start'.
@cfergeau
Copy link
Contributor Author

Not sure if this can go under the same issue (new default values behavior).

$ crc config set preset openshift
$ echo $?
0
$ crc config get preset
Configuration property 'preset' is not set. Default value is 'openshift'
$ echo $?
1

I'm doing some checks in tests and exitcode 1 is not what I would expect given that I just successfully set a preset.

This specific issue is caused by f9a0a4a , but the root cause is what is being discussed here.

cfergeau added a commit to cfergeau/crc that referenced this issue May 26, 2023
This should fix crc-org#3663

Before this commit, the steps below

$ crc config set preset openshift
$ crc config set cpus 4

no longer print:

Changes to configuration property 'cpus' are only applied when the CRC instance is started.
If you already have a running CRC instance, then for this configuration change to take effect, stop the CRC instance with 'crc stop' and restart it with 'crc start'.
@anjannath anjannath reopened this May 29, 2023
@anjannath
Copy link
Member

(reopened to continue the conversation around exit codes for crc config command)

@praveenkumar
Copy link
Member

Exit code bug is also fixed, closing it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

5 participants