timer.Reset(interval)
if err := kc.DiscoverKeepServers(); err != nil {
- log.Println("Error retrieving services list: %v (retrying in %v)", err, errInterval)
+ log.Printf("WARNING: Error retrieving services list: %v (retrying in %v)", err, errInterval)
timer.Reset(errInterval)
continue
}
newRoots := []map[string]string{kc.LocalRoots(), kc.GatewayRoots()}
if !reflect.DeepEqual(previousRoots, newRoots) {
- log.Printf("Updated services list: locals %v gateways %v", newRoots[0], newRoots[1])
+ DebugPrintf("DEBUG: Updated services list: locals %v gateways %v", newRoots[0], newRoots[1])
previousRoots = newRoots
}
// replicasPerService is 1 for disks; unknown or unlimited otherwise
this.replicasPerService = 1
- this.Using_proxy = false
for _, service := range list.Items {
scheme := "http"
listed[url] = true
localRoots[service.Uuid] = url
- if service.SvcType == "proxy" {
- this.Using_proxy = true
- }
-
if service.ReadOnly == false {
writableLocalRoots[service.Uuid] = url
if service.SvcType != "disk" {
}
}
+ if service.SvcType != "disk" {
+ this.foundNonDiskSvc = true
+ }
+
// Gateway services are only used when specified by
// UUID, so there's nothing to gain by filtering them
// by service type. Including all accessible services
gatewayRoots[service.Uuid] = url
}
- if this.Using_proxy {
- this.setClientSettingsProxy()
+ if this.foundNonDiskSvc {
+ this.setClientSettingsNonDisk()
} else {
this.setClientSettingsDisk()
}