-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
16 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 465800edc7739aa6ec3e447ec366d4fbbe4c8b91 Mon Sep 17 00:00:00 2001 | ||
From 30e7c2796af55536c63637a34df2031870fa0cdd Mon Sep 17 00:00:00 2001 | ||
From: Arthur Sengileyev <[email protected]> | ||
Date: Mon, 31 Jul 2023 10:28:47 +0300 | ||
Subject: [PATCH 2/3] Implement Unix domain socket support for VLAN | ||
|
@@ -20,12 +20,12 @@ Signed-off-by: Arthur Sengileyev <[email protected]> | |
--- | ||
pkg/machine/machine_windows.go | 11 ++ | ||
pkg/machine/qemu/config.go | 26 +++- | ||
pkg/machine/qemu/machine.go | 198 +++++++++++++++++----------- | ||
pkg/machine/qemu/machine_unix.go | 52 +++++--- | ||
pkg/machine/qemu/machine.go | 202 +++++++++++++++++----------- | ||
pkg/machine/qemu/machine_unix.go | 52 ++++--- | ||
pkg/machine/qemu/machine_windows.go | 58 ++++++-- | ||
pkg/machine/wsl/machine.go | 2 +- | ||
pkg/machine/wsl/util_windows.go | 7 - | ||
7 files changed, 238 insertions(+), 116 deletions(-) | ||
7 files changed, 241 insertions(+), 117 deletions(-) | ||
|
||
diff --git a/pkg/machine/machine_windows.go b/pkg/machine/machine_windows.go | ||
index 237264448..5aea8c33d 100644 | ||
|
@@ -108,7 +108,7 @@ index 632848bd0..90c1cb48c 100644 | |
} | ||
|
||
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go | ||
index 5b1045823..5c9537e19 100644 | ||
index 5b1045823..8ea1bfa2d 100644 | ||
--- a/pkg/machine/qemu/machine.go | ||
+++ b/pkg/machine/qemu/machine.go | ||
@@ -42,6 +42,7 @@ const ( | ||
|
@@ -436,9 +436,14 @@ index 5b1045823..5c9537e19 100644 | |
cmd.PidFile = v.PidFilePath.GetPath() | ||
cmd.SSHPort = v.Port | ||
|
||
@@ -1344,9 +1377,9 @@ func (v *MachineVM) startHostNetworking() (string, machine.APIForwardingState, e | ||
@@ -1342,11 +1375,13 @@ func (v *MachineVM) startHostNetworking() (string, machine.APIForwardingState, e | ||
} | ||
|
||
c := cmd.Cmd(binary) | ||
c.ExtraFiles = []*os.File{dnr, dnw, dnw} | ||
- c.ExtraFiles = []*os.File{dnr, dnw, dnw} | ||
+ c.Stdin = dnr | ||
+ c.Stdout = dnw | ||
+ c.Stderr = dnw | ||
if err := c.Start(); err != nil { | ||
- return "", 0, fmt.Errorf("unable to execute: %q: %w", cmd.ToCmdline(), err) | ||
+ return "", 0, nil, fmt.Errorf("unable to execute: %q: %w", cmd.ToCmdline(), err) | ||
|
@@ -448,7 +453,7 @@ index 5b1045823..5c9537e19 100644 | |
} | ||
|
||
func (v *MachineVM) setupAPIForwarding(cmd gvproxy.GvproxyCommand) (gvproxy.GvproxyCommand, string, machine.APIForwardingState) { | ||
@@ -1364,10 +1397,10 @@ func (v *MachineVM) setupAPIForwarding(cmd gvproxy.GvproxyCommand) (gvproxy.Gvpr | ||
@@ -1364,10 +1399,10 @@ func (v *MachineVM) setupAPIForwarding(cmd gvproxy.GvproxyCommand) (gvproxy.Gvpr | ||
forwardUser = "root" | ||
} | ||
|
||
|
@@ -463,15 +468,15 @@ index 5b1045823..5c9537e19 100644 | |
|
||
// The linking pattern is /var/run/docker.sock -> user global sock (link) -> machine sock (socket) | ||
// This allows the helper to only have to maintain one constant target to the user, which can be | ||
@@ -1577,6 +1610,7 @@ func (v *MachineVM) Inspect() (*machine.InspectInfo, error) { | ||
@@ -1577,6 +1612,7 @@ func (v *MachineVM) Inspect() (*machine.InspectInfo, error) { | ||
return nil, err | ||
} | ||
connInfo.PodmanSocket = podmanSocket | ||
+ connInfo.PodmanPipe = podmanPipe(v.Name) | ||
return &machine.InspectInfo{ | ||
ConfigPath: v.ConfigPath, | ||
ConnectionInfo: *connInfo, | ||
@@ -1643,6 +1677,18 @@ func (v *MachineVM) editCmdLine(flag string, value string) { | ||
@@ -1643,6 +1679,18 @@ func (v *MachineVM) editCmdLine(flag string, value string) { | ||
} | ||
} | ||
|
||
|