Comments (5)
It seems that all the devices are showing up in LCOW as well. The only difference is that stdin/stdout/stderr
are sockets in LCOW and in pipes in Linux. Maybe that's causing the issue.
LCOW:
PS> docker run --rm --isolation=hyperv nginx readlink -f /var/log/nginx/access.log
/proc/1/fd/socket:[12131]
PS> docker run --rm --isolation=hyperv nginx readlink -f /var/log/nginx/error.log
/proc/1/fd/socket:[11395]
Linux:
# docker run --rm nginx readlink -f /var/log/nginx/error.log
/proc/1/fd/pipe:[657542]
# docker run --rm nginx readlink -f /var/log/nginx/access.log
/proc/1/fd/pipe:[658449]
from opengcs.
There are also issues with node.js because we are passing vsock sockets as stdin/out/err. We need to relay these sockets, unfortunately. We should only do it for container processes, not "external" processes so that we don't have perf overhead for tar2vhd and related processes.
from opengcs.
Ok looked into this. Just to be clear for container processes we need to wrap the socket based read/writes into a pipe and expose the pipe for /proc/$$/fd/{0, 1, 2}
. This unfortunately creates a copy given that the Connection
interface doesn't expose a stream based interface but overhead should be minimal if we reuse the buffer.
from opengcs.
Wouldn't it be easier to change the service\gcs\runtime\runc\runc.go file and change startProcess
to take in an isExternal
flag? If it's external, then call stdioSet.Files()
. If its not external, just hook up the transports directly. The documentation for os/exec
says this:
// Stdin specifies the process's standard input.
// If Stdin is nil, the process reads from the null device (os.DevNull).
// If Stdin is an *os.File, the process's standard input is connected
// directly to that file.
// Otherwise, during the execution of the command a separate
// goroutine reads from Stdin and delivers that data to the command
// over a pipe. In this case, Wait does not complete until the goroutine
// stops copying, either because it has reached the end of Stdin
// (EOF or a read error) or because writing to the pipe returned an error.
So, the wrapping up into a pipe stuff is already handled by Go.
from opengcs.
The problem is that when we do a runc exection, the process exits well before we are done copying the pipe data. So we actually need to spawn copying goroutines manually, and we need to track them, cancel the stdin one, etc. just like we do in the tty case.
from opengcs.
Related Issues (20)
- execProcess should handle v2 external process
- V2 should support hot add/remove of NIC
- V2 exec process should consider UVMId
- Shutdown of UVM should send response to HCS
- bridge should make sure kernel version is 4.14.23 or greater
- In stress test, failed to get SCSI device name HOT 2
- [feature request] add version parameter HOT 2
- Error on run container with transparent network HOT 2
- Unspecified Error (0X80004005) and Failed to connect NIC
- init does too little and too much
- File ULIMITs HOT 1
- Intermittent DNS failures when running Alpine containers in user-defined docker-compose network
- vet error: set declared but not used HOT 1
- some "docker exec" commands fail with a cryptic error HOT 3
- LCOW: Docker Volumes don't support some fs operations that bind mounts support - CreateFile access denied HOT 2
- json.Unmarshal is incorrectly used
- json.Unmarshal is incorrectly used
- I would like to ask for some wrong answers HOT 4
- OT: Where to find tools/information about Hyper-V root on Linux
- Who owns C:\Program Files\Linux Containers? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opengcs.