Skip to content

Commit

Permalink
applehv: return socket path from setupAPIForwarding
Browse files Browse the repository at this point in the history
When starting podman machine with applehv, this warning is printed:
WARN[0025] API socket failed ping test

This is due to a bug in applehv.setupAPIForwarding which is not
returning the path to the socket, which causes `WaitAndPingAPI` to be
called with `""` as the socket path, triggering the warning.

This commit changes setupAPIForwarding to be similar to the
implementation in the other machine implementations.

I don't know how to add a test for this, but this can be handled in
podman-machine end to end tests by making sure that there are no
warnings when running `podman machine start` with applehv.

[NO NEW TESTS NEEDED]

Signed-off-by: Christophe Fergeau <[email protected]>
  • Loading branch information
cfergeau committed Jan 16, 2024
1 parent 90f6989 commit 3fef531
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/machine/applehv/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,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 3fef531

Please sign in to comment.