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

Pod's are not displayed for the selected namespace #2476

Closed
fl64 opened this issue Jan 16, 2024 · 12 comments
Closed

Pod's are not displayed for the selected namespace #2476

fl64 opened this issue Jan 16, 2024 · 12 comments
Labels
bug Something isn't working question Further information is requested

Comments

@fl64
Copy link

fl64 commented Jan 16, 2024




Describe the bug
Whichever namespace is selected, only pods for the default namespace are displayed

To Reproduce
Steps to reproduce the behavior:

:ns

select any ns

Historical Documents
When applicable please include any supporting artifacts: k9s debug logs, configurations, resource manifests, ...

Expected behavior
Pod's are displayed for the selected namespace

Screenshots
I select d8-system

but i see pods from default namespace

video

Versions (please complete the following information):

  • OS: Ubuntu 22.04
  • K9s: v0.31.5
  • K8s: v1.26.12

Additional context
Add any other context about the problem here.

@derailed
Copy link
Owner

@fl64 Can you include k9s debug logs? Tx!

@derailed derailed added the question Further information is requested label Jan 16, 2024
@fl64
Copy link
Author

fl64 commented Jan 16, 2024

Yep, logs is here:

8:27PM ERR Unable to assert active namespace. Using default error="validation failed for \"/home/user/.local/share/k9s/clusters/virt/virt/config.yaml\": yaml: line 13: could not find expected ':'"
8:27PM ERR Unable to assert active namespace. Using default error="validation failed for \"/home/user/.local/share/k9s/clusters/virt/virt/config.yaml\": yaml: line 13: could not find expected ':'"
8:27PM ERR Unable to assert active namespace. Using default error="validation failed for \"/home/user/.local/share/k9s/clusters/virt/virt/config.yaml\": yaml: line 13: could not find expected ':'"
8:27PM ERR Unable to assert active namespace. Using default error="validation failed for \"/home/user/.local/share/k9s/clusters/virt/virt/config.yaml\": yaml: line 13: could not find expected ':'"
8:27PM ERR active context load failed error="validation failed for \"/home/user/.local/share/k9s/clusters/virt/virt/config.yaml\": yaml: line 13: could not find expected ':'"
8:27PM ERR active context load failed error="validation failed for \"/home/user/.local/share/k9s/clusters/virt/virt/config.yaml\": yaml: line 13: could not find expected ':'"
8:27PM ERR active context load failed error="validation failed for \"/home/user/.local/share/k9s/clusters/virt/virt/config.yaml\": yaml: line 13: could not find expected ':'"
8:27PM ERR Unable to assert active namespace. Using default error="validation failed for \"/home/user/.local/share/k9s/clusters/virt/virt/config.yaml\": yaml: line 13: could not find expected ':'"
8:27PM ERR Unable to assert active namespace. Using default error="validation failed for \"/home/user/.local/share/k9s/clusters/virt/virt/config.yaml\": yaml: line 13: could not find expected ':'"
8:27PM ERR Unable to assert active namespace. Using default error="validation failed for \"/home/user/.local/share/k9s/clusters/virt/virt/config.yaml\": yaml: line 13: could not find expected ':'"
8:27PM ERR active context load failed error="validation failed for \"/home/user/.local/share/k9s/clusters/virt/virt/config.yaml\": yaml: line 13: could not find expected ':'"

and cluster config:

k9s:
  cluster: virt
  namespace:
    active: vms
    lockFavorites: false
    favorites:
    - default
  view:
    active: po
  featureGates:
    nodeShell: false
  portForwardAddress: localhost
pshot-controller
    - default
  view:
    active: ns
  featureGates:
    nodeShell: false
  portForwardAddress: localhost

@fl64
Copy link
Author

fl64 commented Jan 16, 2024

By the way, I often find that the cluster configuration file gets corrupted and overwritten with invalid fields.

@derailed
Copy link
Owner

@fl64 Thanks for the details!
Clearly that the case here as the cluster config looks hosed. Removing the phost-controller section should help getting back up and running.
BTW currently running logoless with prevent you from getting an indicator that your config file is toast.
If you can include some solid repro steps to highlight how/when the context config gets corrupted that would be most useful.

@fl64
Copy link
Author

fl64 commented Jan 16, 2024

@derailed
I recoded the video with an issue
asciicast

derailed added a commit that referenced this issue Jan 18, 2024
@derailed
Copy link
Owner

@fl64 Thank you so much for the recording! Very helpful!!
Sadly I could not repro here at the ranch on osx ;(
But other folks have reported configs corruption on what looks like window and nix.

I think I may have found the root cause??
Please clean up your current configs to spec or move/axe your clusters config dirs and give v0.31.6 a spin.
Hoping for more happiness on this ding dang deal... 🤞

Again thank you for the great details!

derailed added a commit that referenced this issue Jan 18, 2024
@fl64
Copy link
Author

fl64 commented Jan 19, 2024

@derailed in v0.31.7 i met with the same problem. When after some point of time pods start to be displayed only for the default namespace.

here is new video: https://asciinema.org/a/vf0Zdf0dspGl22NigHpFvswTT

It is also worth noting that exiting namespace using esc started to work with a noticeable delay

@fl64
Copy link
Author

fl64 commented Jan 19, 2024

https://asciinema.org/a/ybJDcvYinMvoNpZNmL42l6gps
Another video, where you can see the logs and the dynamics of the config changes, near the end you can see that the config is corrupted and starts to display the default namespace

@derailed
Copy link
Owner

@fl64 Yikes! not what I was hoping to hear...

I still can't repro this locally ;( but did find a potential issue??

I've bundled a linux bin with a potential fix.
Could you give it a rinse and see if we're happier?
Thank you so much for the thorough testing and for the detailed videos!

@derailed derailed reopened this Jan 19, 2024
@derailed derailed added the bug Something isn't working label Jan 19, 2024
@fl64
Copy link
Author

fl64 commented Jan 22, 2024

Sorry I'm late, I'm now requesting access to this binary.

@fl64
Copy link
Author

fl64 commented Jan 22, 2024

ooops, it doesn't work because my arch is x86_64

@derailed
Copy link
Owner

@fl64 Hopefully this was addressed in v0.31.8. If not please reopen. Tx!

thejoeejoee pushed a commit to thejoeejoee/k9s that referenced this issue Feb 23, 2024
placintaalexandru pushed a commit to placintaalexandru/k9s that referenced this issue Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants