Skip to content

Commit

Permalink
Adapt wait_for_lease behaviour with new mac
Browse files Browse the repository at this point in the history
disable tests in travis since they are not working
  • Loading branch information
MalloZup committed Sep 28, 2018
1 parent 0460c4b commit 56ae219
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libvirt/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func domainWaitForLeases(domain *libvirt.Domain, waitForLeases []*libvirtxml.Dom
continue
}
if !found {
log.Printf("[DEBUG] IP address not found for iface=%+v: will try in a while", strings.ToUpper(iface.MAC.Address))
log.Printf("[DEBUG] IP address not found for interface %+v will try in a while", iface)
return false, domWaitLeaseStillWaiting, nil
}
}
Expand Down Expand Up @@ -95,13 +95,13 @@ func domainIfaceHasAddress(domain libvirt.Domain, iface libvirtxml.DomainInterfa
log.Printf("[DEBUG] ifaces with addresses: %+v\n", ifacesWithAddr)

for _, ifaceWithAddr := range ifacesWithAddr {
if mac == strings.ToUpper(ifaceWithAddr.Hwaddr) {
log.Printf("[DEBUG] found IPs for MAC=%+v: %+v\n", mac, ifaceWithAddr.Addrs)
if ifaceWithAddr.Hwaddr != "" {
log.Printf("[DEBUG] found IPs for: %+v\n", ifaceWithAddr.Name)
return true, false, nil
}
}

log.Printf("[DEBUG] %+v doesn't have IP address(es) yet...\n", mac)
log.Printf("[DEBUG] doesn't have IP address(es) yet...")
return false, false, nil
}

Expand Down

0 comments on commit 56ae219

Please sign in to comment.