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

Missing stim config causes error #27

Open
dwilson6 opened this issue Jun 25, 2019 · 3 comments
Open

Missing stim config causes error #27

dwilson6 opened this issue Jun 25, 2019 · 3 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@dwilson6
Copy link

If I already have a vault token and use stim (running the stim docker container) to get kube config, it errors and complains that the ~/.stim/config.yaml file doesn't exist. It would be nice if stim would check if it needs the config file to run the command or at least have the docker container create an empty config file

@lwahlmeier
Copy link
Member

do you mean the warning:

2019-06-25 19:54:06.8682203	[ WARN  ]	No config file exits at :"/home/<user>/.stim/config.yaml"

?
If so I dont think its appropriate to completely removing this, even with a valid token and vault addr set. There are plenty of other things that could be needed from the config if its missing. Could probably improve the IsAutomated() check and maybe even add a cli/env flag for it so it skips certain user errors/warns in that case. Does that sound like an appropriate solution?

@lwahlmeier lwahlmeier added enhancement New feature or request good first issue Good for newcomers labels Jun 26, 2019
@dwilson6
Copy link
Author

The warning is fine. It actually errors. In this case, it is writing to the file so maybe it could create it if it doesn't exist. Or maybe a cli flag to force IsAutomated() to be true.

Below is the output from running VAULT_TOKEN='...' stim kube config ... without a config file.

2019-06-26 11:40:25.566293	[ WARN  ]	No config file exits at :"/home/<user>/.stim/config.yaml"
2019-06-26 11:40:25.566446	[ WARN  ]	Issue loading config file use -verbose for more info
2019-06-26 11:40:25.568909	[ WARN  ]	Stim-vault: time: invalid duration
2019-06-26 11:40:25.870283	[ FATAL ]	Stim-Vault: Error Updating username in configuration file: open /home/<user>/.stim/config.yaml: no such file or directory

@lwahlmeier
Copy link
Member

Ahh yeah thats a problem.

@lwahlmeier lwahlmeier added bug Something isn't working and removed enhancement New feature or request labels Jun 26, 2019
@lwahlmeier lwahlmeier self-assigned this Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants