opencontainers / opencontainers/runc
Run runc container over SSH
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 13.5k
- Forks
- 2.3k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 30
Description
I am working on a cluster of runc containers running in AWS EC2 Ubuntu 18.04 x86_64 instances. I intend to have one master node run the containers in all the other nodes via SSH. I am using the following bash script in the master node:
#!/bin/bash
while read node
do
ssh user@$node "cd ~/mycont; sudo runc run mycont"
done <active
The "active" file contains list of remote IPs for the EC2 instances. Running this results in an error similar to the one below
level=error msg="open /dev/tty: no such device or address"
Running the runc command by directly accessing the remote terminal via SSH works, but not in this inline format. Also, using ssh -t works as inline in the local terminal, but not in the bash script.
I am not sure what I am missing here. I don't have an in-depth knowledge of how SSH issues the commands: in the remote terminal, or by creating a terminal in the local machine. Also, will restoring the container via inline SSH have any issues? Any help would be appreciated.
Edit: Does it have anything to do with terminal: true in config.json?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the bash loop, the active host list, and config.json's terminal setting; reproduce runc run mycont through direct SSH and the scripted command, including ssh -t. Check how the command receives /dev/tty and determine whether restoring the container through inline SSH is supported; document the required invocation or clarify the limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, bash, go, ubuntu
- Domain
- cli, cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100