Complete WSL implementation, refactor a few areas

Also addresses a number of issues:
- StopHostNetworking isn't plumbed, win-sshproxy leaks on hyperv
- Wait api and print output doesn't work properly on Windows
- API forwarding doesn't work on WSL
- Terminal corruption with after start/stop on Windows
- Gvproxy is forcefully killed vs gracefully quit
- Switching rootful/rootless does not update /var/run/docker.sock on the guest
- File already closed error on init
- HyperV backend is publishing Unix sockets when it should be named pipes
- User-mode networking doesn't always work
- Stop state outside of lock boundaries
- WSL blocks parallel machined (should be supported)

[NO NEW TESTS NEEDED]

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
This commit is contained in:
Jason T. Greene
2024-02-07 14:49:47 -06:00
parent d7cb66492b
commit 487219d809
44 changed files with 1710 additions and 276 deletions

View File

@ -3,7 +3,10 @@
package machine
import (
"context"
"errors"
"fmt"
"net"
"strings"
)
@ -32,3 +35,11 @@ func ParseVolumeFromPath(v string) (source, target, options string, readonly boo
}
return
}
func DialNamedPipe(ctx context.Context, path string) (net.Conn, error) {
return nil, errors.New("not implemented")
}
func GetEnvSetString(env string, val string) string {
return fmt.Sprintf("export %s='%s'", env, val)
}