Skip to content

Commit

Permalink
Merge pull request containers#21437 from openshift-cherrypick-robot/c…
Browse files Browse the repository at this point in the history
…herry-pick-21264-to-v4.9

[v4.9] applehv: return socket path from setupAPIForwarding
  • Loading branch information
openshift-merge-bot[bot] authored Jan 31, 2024
2 parents 009c7b0 + 574587e commit a6690f2
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions pkg/machine/applehv/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -587,12 +587,6 @@ func (m *MacMachine) Start(name string, opts machine.StartOptions) error {
return machine.ErrVMAlreadyRunning
}

ioEater, err := os.OpenFile(os.DevNull, os.O_WRONLY, 0755)
if err != nil {
return err
}
defer ioEater.Close()

// TODO handle returns from startHostNetworking
forwardSock, forwardState, err := m.startHostNetworking()
if err != nil {
Expand Down Expand Up @@ -656,8 +650,6 @@ func (m *MacMachine) Start(name string, opts machine.StartOptions) error {
cmd.Args = append(cmd.Args, "--gui") // add command line switch to pop the gui open
}

cmd.ExtraFiles = []*os.File{ioEater, ioEater, ioEater}

readSocketBaseDir := filepath.Dir(m.ReadySocket.GetPath())
if err := os.MkdirAll(readSocketBaseDir, 0755); err != nil {
return err
Expand Down Expand Up @@ -1054,7 +1046,8 @@ func (m *MacMachine) setupAPIForwarding(cmd gvproxy.GvproxyCommand) (gvproxy.Gvp
}
}

return cmd, "", machine.MachineLocal
return cmd, socket.GetPath(), machine.MachineLocal

}

func (m *MacMachine) dockerSock() (string, error) {
Expand Down

0 comments on commit a6690f2

Please sign in to comment.