Continue searching for leases even if one of the files cannot be read.

This commit is contained in:
Bob Brumfield 2018-06-22 18:09:27 -07:00
parent f79381c3d5
commit 591bfe3dfa

View File

@ -358,7 +358,8 @@ func (d *VmwareDriver) GuestIP(state multistep.StateBag) (string, error) {
// open up the lease and read its contents
fh, err := os.Open(dhcpLeasesPath)
if err != nil {
return "", err
log.Printf("Unable to open lease path, skipping: %s", dhcpLeasesPath)
continue
}
defer fh.Close()