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 support specifying private/public keys path #515

Merged
merged 3 commits into from
Nov 20, 2019

Conversation

hzxuzhonghu
Copy link
Collaborator

Added ssh-key-file-path to allow users to specify the path of ssh keys. For example if you want to store the keys in /a/b, the blowing config can work.

apiVersion: batch.volcano.sh/v1alpha1
kind: Job
metadata:
  name: lm-horovod-job
  labels:
    "volcano.sh/job-type": Horovod
spec:
  minAvailable: 4
  schedulerName: volcano
  plugins:
    ssh: ["--ssh-key-file-path=/a/b"]    # or ["--ssh-key-file-path", "/a/b"]

@volcano-sh-bot volcano-sh-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 7, 2019
@hzxuzhonghu
Copy link
Collaborator Author

Fixes: #403

@k82cn
Copy link
Member

k82cn commented Nov 7, 2019

please list the value table for --no-root and ssh-key-file-path.

@TravisBuddy
Copy link

Hey @hzxuzhonghu,
Something went wrong with the build.

TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.

View build log

TravisBuddy Request Identifier: 5f3d74a0-0161-11ea-82f1-cf3ba55cf6d0

@hzxuzhonghu
Copy link
Collaborator Author

please list the value table for --no-root and ssh-key-file-path.

Sorry, i can not catch this.

@TravisBuddy
Copy link

Hey @hzxuzhonghu,
Something went wrong with the build.

TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.

View build log

TravisBuddy Request Identifier: ef9f1520-01da-11ea-8e58-e963e1672326

@volcano-sh-bot volcano-sh-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 8, 2019
@TravisBuddy
Copy link

Hey @hzxuzhonghu,
Something went wrong with the build.

TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.

View build log

TravisBuddy Request Identifier: fb19bca0-0218-11ea-8e58-e963e1672326

@TravisBuddy
Copy link

Hey @hzxuzhonghu,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: 958e5370-0432-11ea-8ac3-8db289d111a9

@hzxuzhonghu
Copy link
Collaborator Author

ping @k82cn

@dalfos
Copy link

dalfos commented Nov 15, 2019

@hzxuzhonghu have you example of job how to use ssh & mpi in userspace?

@k82cn
Copy link
Member

k82cn commented Nov 15, 2019

@hzxuzhonghu , please help to list expected result when --no-root & --ssh-key have different value.

@k82cn
Copy link
Member

k82cn commented Nov 15, 2019

@hzxuzhonghu have you example of job how to use ssh & mpi in userspace?

@dalfos , a initContainer or script is necessary to copy private/public key into ~/.ssh to run mpi job in userspace.

@dalfos
Copy link

dalfos commented Nov 15, 2019

@k82cn maybe add param --port $port which adds lines "Port $port" for master and workers in .ssh/config. User cannot start sshd on port 22 (I started for example on port 2222).

@dalfos
Copy link

dalfos commented Nov 15, 2019

@k82cn maybe add param --port $port which adds lines "Port $port" for master and workers in .ssh/config. User cannot start sshd on port 22 (I started for example on port 2222).

I found in mpirun:
-mca plm_rsh_args "-p 2222"

@hzxuzhonghu
Copy link
Collaborator Author

Yes, we donot care about the port of sshd in volcano.

@hzxuzhonghu have you example of job how to use ssh & mpi in userspace?

What do u mean by userspace?

@hzxuzhonghu , please help to list expected result when --no-root & --ssh-key have different value.

if --ssh-key-file-path is specified, no-root is not cared about, i want to remove the no-root flag in future.

@dalfos
Copy link

dalfos commented Nov 18, 2019

@hzxuzhonghu I mean case then sshd is executed by user (not by root).
All my questions are settled. Thank you!

@k82cn
Copy link
Member

k82cn commented Nov 18, 2019

if --ssh-key-file-path is specified, no-root is not cared about, i want to remove the no-root flag in future.

ok, so the default value of --ssh-key-file-path will be /root/.ssh ?

@hzxuzhonghu
Copy link
Collaborator Author

Yes

@k82cn
Copy link
Member

k82cn commented Nov 20, 2019

/lgtm
/approve

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 20, 2019
@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu, k82cn

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@volcano-sh-bot volcano-sh-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 20, 2019
@volcano-sh-bot volcano-sh-bot merged commit e5643e3 into volcano-sh:master Nov 20, 2019
@hzxuzhonghu hzxuzhonghu deleted the ssh branch November 21, 2019 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants