You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
log.Infof("The Director doesn't have any advertisements for server with URL %s. Stopping director tests.", serverUrlStr)
180
+
returnfalse
181
+
}
182
+
currentServerAd:=adItem.Value().ServerAd
183
+
184
+
// Check if the server is in downtime by checking the filteredServers map
185
+
ifisServerInDowntime(currentServerAd.Name) {
186
+
log.Debugf("Skipping director test cycle for %s server %s: server is in downtime", currentServerAd.Type, currentServerAd.Name)
187
+
returntrue// Return true to continue the loop, but don't run the test
188
+
}
189
+
190
+
log.Debug(fmt.Sprintf("Starting a director test cycle for %s server %s at %s", currentServerAd.Type, currentServerAd.Name, currentServerAd.URL.String()))
reportMessage="Director test cycle succeeded at "+time.Now().Format(time.RFC3339)
178
206
healthStatus=HealthStatusOK
179
-
log.Debugf("Director file transfer test cycle succeeded at %s for %s server with URL at %s", time.Now().Format(time.RFC3339), serverAd.Type, serverUrl)
207
+
log.Debugf("Director file transfer test cycle succeeded at %s for %s server with URL at %s", time.Now().Format(time.RFC3339), currentServerAd.Type, currentServerAd.URL.String())
180
208
} else {
181
209
reportStatus="error"
182
-
reportMessage="Director file transfer test cycle failed for server: "+serverUrl
210
+
reportMessage="Director file transfer test cycle failed for server: "+currentServerAd.URL.String()
183
211
iftestErr!=nil {
184
212
reportMessage+=" "+testErr.Error()
185
213
}
186
214
healthStatus=HealthStatusError
187
-
log.Warningln("Director file transfer test cycle failed for ", serverAd.Type, " server: ", serverUrl, " ", testErr)
215
+
log.Warningln("Director file transfer test cycle failed for ", currentServerAd.Type, " server: ", currentServerAd.URL.String(), " ", testErr)
188
216
}
189
217
190
218
// Update healthTestUtils once per cycle
191
219
func() {
192
220
healthTestUtilsMutex.Lock()
193
221
deferhealthTestUtilsMutex.Unlock()
194
-
ifexistingUtil, ok:=healthTestUtils[serverAd.URL.String()]; ok {
222
+
ifexistingUtil, ok:=healthTestUtils[currentServerAd.URL.String()]; ok {
195
223
existingUtil.Status=healthStatus
196
224
} else {
197
-
log.Debugln("HealthTestUtil missing for ", serverAd.Type, " server: ", serverUrl, " Failed to update internal status")
225
+
log.Debugln("HealthTestUtil missing for ", currentServerAd.Type, " server: ", currentServerAd.URL.String(), " Failed to update internal status")
0 commit comments