mirror of
https://github.com/kemko/nomad.git
synced 2026-01-09 03:45:41 +03:00
Improve rkt driver network status poll loop
The network status poll loop will now report any networks it ignored, as well as a no-networks situations.
This commit is contained in:
@@ -599,6 +599,7 @@ networkLoop:
|
||||
if status, err := rktGetStatus(uuid); err == nil {
|
||||
for _, net := range status.Networks {
|
||||
if !net.IP.IsGlobalUnicast() {
|
||||
d.logger.Printf("[DEBUG] driver.rkt: network %s for pod %q (UUID %s) for task %q ignored", net.IP.String(), img, uuid, d.taskName)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -625,6 +626,12 @@ networkLoop:
|
||||
}
|
||||
break networkLoop
|
||||
}
|
||||
|
||||
if len(status.Networks) == 0 {
|
||||
lastErr = fmt.Errorf("no networks found")
|
||||
} else {
|
||||
lastErr = fmt.Errorf("no good driver networks out of %d returned", len(status.Networks))
|
||||
}
|
||||
} else {
|
||||
lastErr = err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user