bugfix possible host selection
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
6
main.go
6
main.go
@@ -457,6 +457,12 @@ func main() {
|
||||
failedHost = checkActualTime[0].Host.Name
|
||||
outageStart = checkActualTime[0].CreatedTime.In(location)
|
||||
restartTime = vmRestartTime
|
||||
} else if len(checkActualTime) > 1 {
|
||||
lastIndex := len(checkActualTime) - 1
|
||||
log.Printf("Found multiple hosts corresponding to actual VM restart time. Failed host was '%s', using outage start time of '%s'\n", checkActualTime[lastIndex].Host.Name, checkActualTime[lastIndex].CreatedTime.In(location))
|
||||
failedHost = checkActualTime[lastIndex].Host.Name
|
||||
outageStart = checkActualTime[lastIndex].CreatedTime.In(location)
|
||||
restartTime = vmRestartTime
|
||||
} else {
|
||||
// if using the actual VM restart time doesn't narrow things down then go back to using the last host failure time before the fuzzy VM restart time
|
||||
lastIndex := len(possibleHosts) - 1
|
||||
|
Reference in New Issue
Block a user