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

ssh plugin adds user flag #403

Closed
chenyangxueHDU opened this issue Aug 2, 2019 · 18 comments
Closed

ssh plugin adds user flag #403

chenyangxueHDU opened this issue Aug 2, 2019 · 18 comments
Assignees
Labels
area/controllers kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@chenyangxueHDU
Copy link
Contributor

/kind feature

What happened:
The ssh plugin has --no-root flag for common user ssh, but I need to cp/link .ssh dir to user home dir.

What you expected to happen:
I would like to add --user flag to mount ssh configmap to user home dir, like --user=someone, mount .ssh to /home/users/someone/.ssh

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Volcano Version:
  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:
@k82cn
Copy link
Member

k82cn commented Aug 2, 2019

/cc @TommyLike @hzxuzhonghu

@k82cn
Copy link
Member

k82cn commented Aug 2, 2019

hm... how to change the ownership of .ssh?

@k82cn k82cn added area/controllers kind/feature Categorizes issue or PR as related to a new feature. labels Aug 2, 2019
@hzxuzhonghu
Copy link
Collaborator

Currently, the permission is 0600, which is decided by ssh.

@chenyangxueHDU Do you mean you want to use a specific user instead of root in your docker images?

@TommyLike
Copy link
Contributor

TommyLike commented Aug 2, 2019

I guess he is asking whether volcano could mount the ssh config file into a user default folder, for instance /home/user1/.ssh/. @chenyangxueHDU This is not supported now, see

sshPath := SSHAbsolutePath

cc @k82cn @hzxuzhonghu

@chenyangxueHDU
Copy link
Contributor Author

hm... how to change the ownership of .ssh?

Yes, it's the problem. I think we can pass uid/gid, then we can change the ownership

@chenyangxueHDU
Copy link
Contributor Author

Currently, the permission is 0600, which is decided by ssh.

@chenyangxueHDU Do you mean you want to use a specific user instead of root in your docker images?

yes, I use the runuser to run the command.

@chenyangxueHDU
Copy link
Contributor Author

I guess he is asking whether volcano could mount the ssh config file into a user default folder, for instance /home/user1/.ssh/. @chenyangxueHDU This is not supported now, see

sshPath := SSHAbsolutePath

cc @k82cn @hzxuzhonghu

I know, so it is a feature

@hzxuzhonghu
Copy link
Collaborator

It makes sense, we can provide a user flag for ssh plugin to allow users pass a user, and make root as the default value.

And we should also prevent users from setting RunAsUser non root without providing the user name.

@chenyangxueHDU
Copy link
Contributor Author

It makes sense, we can provide a user flag for ssh plugin to allow users pass a user, and make root as the default value.

And we should also prevent users from setting RunAsUser non root without providing the user name.

Yes

@k82cn
Copy link
Member

k82cn commented Aug 5, 2019

That's OK to me to have such feature, some HPC user would like to run application as no-root user.

@hzxuzhonghu
Copy link
Collaborator

/assign

@TommyLike
Copy link
Contributor

what if I provide a non-exists user?

@hzxuzhonghu
Copy link
Collaborator

Good question, the answer is job will definitely fail.
We can not detect whether the user exists by the volcano job template. This should be guaranteed by users.

@zrss
Copy link
Contributor

zrss commented Nov 6, 2019

/cc

i'd like the ssh plugin can define the ssh key file path

such as /opt/platform/.ssh or something else

@k82cn
Copy link
Member

k82cn commented Nov 7, 2019

/cc @hzxuzhonghu , let's add a paramenter into ssh plugin for key file directory.

@hzxuzhonghu
Copy link
Collaborator

OK

@stale
Copy link

stale bot commented Aug 18, 2020

Hello 👋 Looks like there was no activity on this issue for last 90 days.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity for 60 days, this issue will be closed (we can always reopen an issue if we need!).

@stale stale bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 18, 2020
@stale
Copy link

stale bot commented Oct 17, 2020

Closing for now as there was no activity for last 60 days after marked as stale, let us know if you need this to be reopened! 🤗

@stale stale bot closed this as completed Oct 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controllers kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

5 participants