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

k9s exits silently if screenDumpDir cannot be created. #1906

Closed
njanceski-pluto opened this issue Jan 5, 2023 · 3 comments
Closed

k9s exits silently if screenDumpDir cannot be created. #1906

njanceski-pluto opened this issue Jan 5, 2023 · 3 comments
Labels
Documentation enhancement New feature or request

Comments

@njanceski-pluto
Copy link

Describe the bug
If you copy a ~/.config/k9s/config.yml with a screenDumpDir setting that cannot be created, it will fail silently with exit code 1. On macOS installed k9s with homebrew.

To Reproduce
in ~/.config/k9s/config.yml add

  screenDumpDir: /var/folders/hz/vt7_1v7n2c1ck3jpyvf3r_7w0000gn/T/k9s-screens-user

This was never set by the user originally and the config file is generated by k9s the first time it is run. If you copy this config to another macOS machine where that directory cannot be created, then the error will occur.

In the k9s log file:

9:52AM INF 🐶 K9s starting up...
9:52AM FTL Unable to create dir "/var/folders/hz/vt7_1v7n2c1ck3jpyvf3r_7w0000gn/T" mkdir /var/folders/hz: permission denied

Expected behavior
k9s to function normally until a screenDump is performed.

Workaround
Move the ~/.config/k9s/config.yml to another location so that k9s will create a new file on startup. Diff the new file with your previous version to preserve your settings.

Versions (please complete the following information):

  • OS: Ventura 13.1
  • K9s: v0.26.7

Additional context
I love k9s but I had no idea about the ~/.config/k9s/config.yml creating that screenDumpDir setting. Hopefully the workaround will help another person. It took me an hour to figure out to remove all my configs for k9s to get it working, then I diffed the offending file to find the issue at the bottom.

@vallard
Copy link

vallard commented Jan 26, 2023

thanks! This helped me debug my issue!

@derailed
Copy link
Owner

@njanceski-pluto Thank you for this issue and helping others!!
I will change the logic to flash a friendly error instead.
Also there is a #1321 is also an option big thanks to Vlasoc Artem!!

@derailed derailed added enhancement New feature or request Documentation labels Jan 26, 2023
@derailed
Copy link
Owner

@njanceski-pluto I think this should be fixed in v0.27.0. Tx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants
@derailed @vallard @njanceski-pluto and others