Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Change default shell to bash #1533

Closed
akshaysgithub opened this issue Oct 21, 2020 · 4 comments · Fixed by #1749
Closed

Change default shell to bash #1533

akshaysgithub opened this issue Oct 21, 2020 · 4 comments · Fixed by #1749
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers preferences

Comments

@akshaysgithub
Copy link

Hello,

First of all, Thank you for such an amazing software. It works great. :-)

When we login into a pod, the default shell is set to sh. Sh is very limited, because of which whenever I am logging into a pod, I am passing the command su -c bash.
Can we change the default shell to bash or is there some way we can pass pod startup command, so I can change shell there. Kindly let me know. Thank you.

Regards,
Akshay Sulakhe

@mklanjsek
Copy link
Contributor

Thank you for opening, this is something we are planning to add to Octant Preferences, should be coming out shortly.

@mklanjsek mklanjsek added enhancement New feature or request good first issue Good for newcomers preferences labels Oct 21, 2020
@GuessWhoSamFoo
Copy link
Contributor

GuessWhoSamFoo commented Oct 21, 2020

A straightforward solution taken from kubernetes dashboard would be to try bash, sh, powershell, cmd until one creates a terminal.

It looks like the request here isn't necessarily a custom exec command but the ability to exec as a user in a manner similar to https://github.com/jordanwilson230/kubectl-plugins/tree/krew#kubectl-exec-as

@wwitzel3
Copy link
Contributor

I've assigned this to @GuessWhoSamFoo because his #1103 container work has code doing just this.

@lloydchang
Copy link

lloydchang commented May 1, 2021

To Whom It May Concern:

Consider upgrading to Octant v0.19.0 if you're using Octant v0.17.0 and v0.18.0.

Why: Feature Change default shell to bash #1533's initial implementation, Add support for windows shells and bash #1749 released in v0.17.0 and v0.18.0, has a bug of:

OCI runtime exec failed: ...
(process exited)

with operating systems without bash, e.g. Alpine Linux with sh only.

A bug fix increase timeout for remote cmd stream setup #2258 released in v0.19.0, fixed a similar bug No option to choose the interpreter on the terminal #2164.

After the bug fix, operating systems without bash, such as Alpine Linux, can start sh successfully.

Thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers preferences
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants