summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorShane Smith <shane.smith@shopify.com>2022-07-06 10:55:57 -0400
committerShane Smith <shane.smith@shopify.com>2022-07-06 11:00:47 -0400
commita5898129cfb88a0600f1f565fed1022ada25fdb0 (patch)
treef2fb34f8f9b9349f411860067a159f24f88d93a2 /pkg
parent49df3cc5cb7e6a1d9e28cacfa86562abbdf48fd9 (diff)
downloadpodman-a5898129cfb88a0600f1f565fed1022ada25fdb0.tar.gz
podman-a5898129cfb88a0600f1f565fed1022ada25fdb0.tar.bz2
podman-a5898129cfb88a0600f1f565fed1022ada25fdb0.zip
Fix qemu machine startHostNetworking always failing
Issue introduced in #14828 [NO NEW TESTS NEEDED] Signed-off-by: Shane Smith <shane.smith@shopify.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/machine/qemu/machine.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
index 879ed5109..ca7947e34 100644
--- a/pkg/machine/qemu/machine.go
+++ b/pkg/machine/qemu/machine.go
@@ -1217,7 +1217,10 @@ func (v *MachineVM) startHostNetworking() (string, apiForwardingState, error) {
fmt.Println(cmd)
}
_, err = os.StartProcess(cmd[0], cmd, attr)
- return forwardSock, state, fmt.Errorf("unable to execute: %q: %w", cmd, err)
+ if err != nil {
+ return "", 0, fmt.Errorf("unable to execute: %q: %w", cmd, err)
+ }
+ return forwardSock, state, nil
}
func (v *MachineVM) setupAPIForwarding(cmd []string) ([]string, string, apiForwardingState) {