-
Notifications
You must be signed in to change notification settings - Fork 280
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
etcd-snapshot loading config fails with "flag provided but not defined: -profile" #2103
Comments
cc @dereknola etcd-snapshot now loads the config file, but if there are other flags in the config file that aren't valid for the etcd-snapshot command it will barf on them. This same problem prevents people from using the same config file for both server and agent, as the agent will complain about unknown server parameters. I wonder if we should just ignore unknown flags? |
Ignoring unknown flags can be dangerous, as our current behavior of barfing on unknown flags allows for a user to get more immediate feedback that they have a misconfiguration. If we just ignore unknown flags a user can be misled especially as that is a departure from existing behavior. |
I have a customer who is hitting this. So, I am checking to see what they have inside of their config file Incorrect Usage. flag provided but not defined: -node-label |
Assume you can pass the |
yes there are ways around this. Different config or just passing the args/flags directly to the command. |
The expected result though is the server config with all the server flags can be used with the etcd-snapshot command. |
I agree that ignoring flags could cause other issues @Oats87 but the current behavior makes the config file non-portable between commands. If you add flags specific to |
/backport v1.21.7+rke2r1 |
1 similar comment
/backport v1.21.7+rke2r1 |
Backport bot broken? |
I've encountered the same problem when trying to generate an on-demand snapshot. I'm using: The error shows up even when I run rke2 etcd-snapshot help FATA[0000] flag provided but not defined: -cluster-cidr The config file for the server contains: cluster-cidr: 10.42.0.0/16 |
yes @chreniuc that's the same issue that will be resolved. |
Environmental Info:
RKE2 Version:
rke2 version v1.21.6+rke2r1 (b915fc9)
go version go1.16.6b7
Node(s) CPU architecture, OS, and Version:
N/A
Cluster Configuration:
N/A
Describe the bug:
Running the etcd-snapshot commands throw an error
flag provided but not defined: -profile
.Steps To Reproduce:
Have the profile set in the config file and run the etcd-snapshot which loads the default config.
Expected behavior:
Runs snapshot.
Actual behavior:
Throw error saying flag profile is not defined.
The text was updated successfully, but these errors were encountered: