-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Problem with Terminal and linux shell different from bash #9641
Comments
use nginx image instead, it works |
@mvpwar thanks for your reply I tried with |
Same issue for me when using |
Can y'all check the browser's console and/or network dev tools for errors when connecting to the alpine pod? |
After a while I got a 504 Gateway timeout as you can see on the screenshot With other containers, not alpine, on same cluster all is working like a charm |
Hi @crenshaw-dev , PS. It works fine on non-alpine pods: working terminal and zero font errors. |
It fails for our alpine based images too. It works when bash is installed via The error I get in argocd-server is:
|
Same issue here, works fine with containers that have bash, weird websocket issues with containers that only have sh. Black screen for containers with neither. |
From #9425 :
Is it possible we just need to add argo-cd/server/application/terminal.go Line 219 in 56eb095
|
@crenshaw-dev I was wondering if is useful and possible to put validShells in a ConfigMap, so we can add our shell, like pwsh, ash, etc. |
@odedonato making it configurable is probably a good idea. But I'm not yet convinced that the (only) problem is not having enough shells in that array. If someone has time, a quick test to see if adding |
@crenshaw-dev I downloaded the code and added |
I don't think adding more shells to the list is going to fix the problem. I often use k9s to launch shells in containers and it works well. Their code looks like this:
I can also run an alpine image and exec
However using the same image it doesn't work in the web ui. I would be interested to see if putting |
@crenshaw-dev turns out that the black screen it's only on local k8s cluster where is located argocd and it's because it was a lack of permission on k8s RBAC, in
After that I got the error I built argo with I found this: argo-cd/server/application/terminal.go Line 225 in 56eb095
It's exactly what happen! |
@yeya24 can we maybe switch to sh as a first shell until this is resolved? This issue make this feature pretty much unusable for most of containers. |
I am aware of this issue but there might be other issues more than the shell order. For k8s dashboard code, it uses the same shell order but it can enable exec for alpine images using sh. |
It feels like this issue will be bit harder to figure out, as there are multiple libraries involved. My suggestion is to quick fix this issue, by temporary removing bash shell from list which would resolve this issue for most containers. When problem shell test is resolved we can put bash back. WDYT? |
I don't have any preference. Feel free to open a pr to change the order and ArgoCD maintainers can decide whether they are willing to accept this change or not. Again maybe a configmap for shells so that users can reorder the shells as they want would be more flexible. |
I’m in favor of that change, and I agree that a configurable list makes sense. I think the config can go in ‘argocd-cmd-params-cm’. |
all the following 3 issues are the same:
I think we can follow in one thread. |
I'm not against this feature, but I feel this feature might not be useful for most of the use-cases, as logical order of shells for a simple pod terminal is what currently listed in the code (as |
I'm satisfied with a temporary workaround for now. This will solve a headache for 90% of use cases and will buy us time to figure out the 10%. Making the list configurable is a win regardless, because people might want to add options that are not currently in the hardcoded list (e.g. |
I think I actually found the real issue. Can someone test the PR to confirm? #9895 |
I can confirm that your PR is solving the issue. Even that bash will fail, switch to sh is working and terminal is usable 🎉 Thanks! |
@michalziobro the fix is not in 2.4.4, I hope it will be available in the next release |
Yep, I'll release the fix in the next few hours. It'll be in 2.4.6, since I've got some other stuff queued up for 2.4.5. |
I've upgraded to 2.4.6 and can confirm that the web terminal feature works well now |
I'm also facing an issue with web shell, got only black screen with blinking cursor, but the logs I got from argocd-server are quite different:
Image used: Argocd :
|
Describe the bug
Tried the new most wanted feature, Terminal, it works with linux container with
bash
but got some problem with containerAlpine
based.In screenshot, tried on
busybox:stable
container (it's in loop to keep it running) got # afterOCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "bash": executable file not found in $PATH: unknown
but cannot use it (cannot write)Tried with some other container based on
node:lts-alpine
and got only black screen with blinking cursor.Shell is working with same container using
Rancher
andLens
.To Reproduce
Click on Terminal on Alpine based container
Expected behavior
Get shell from container and possibility to use it
Screenshots
Version
The text was updated successfully, but these errors were encountered: