@@ -23,7 +23,6 @@ import (
2323 "github.com/containers/podman/v5/utils"
2424 vfConfig "github.com/crc-org/vfkit/pkg/config"
2525 "github.com/sirupsen/logrus"
26- "golang.org/x/sys/unix"
2726)
2827
2928// applehcMACAddress is a pre-defined mac address that vfkit recognizes
@@ -160,7 +159,7 @@ func (a AppleHVStubber) StartVM(mc *vmconfigs.MachineConfig) (func() error, func
160159 }
161160
162161 // Wait on gvproxy to be running and aware
163- if err := waitForGvProxy ( gvproxySocket ); err != nil {
162+ if err := sockets . WaitForSocketWithBackoffs ( gvProxyMaxBackoffAttempts , gvProxyWaitBackoff , gvproxySocket . GetPath (), "gvproxy" ); err != nil {
164163 return nil , nil , err
165164 }
166165
@@ -321,20 +320,6 @@ func (a AppleHVStubber) VMType() define.VMType {
321320 return define .AppleHvVirt
322321}
323322
324- func waitForGvProxy (gvproxySocket * define.VMFile ) error {
325- backoffWait := gvProxyWaitBackoff
326- logrus .Debug ("checking that gvproxy is running" )
327- for i := 0 ; i < gvProxyMaxBackoffAttempts ; i ++ {
328- err := unix .Access (gvproxySocket .GetPath (), unix .W_OK )
329- if err == nil {
330- return nil
331- }
332- time .Sleep (backoffWait )
333- backoffWait *= 2
334- }
335- return fmt .Errorf ("unable to connect to gvproxy %q" , gvproxySocket .GetPath ())
336- }
337-
338323func (a AppleHVStubber ) PrepareIgnition (_ * vmconfigs.MachineConfig , _ * ignition.IgnitionBuilder ) (* ignition.ReadyUnitOpts , error ) {
339324 return nil , nil
340325}
0 commit comments