projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
14538: Merge branch 'master' into 14538-async-write
[arvados.git]
/
sdk
/
go
/
health
/
aggregator.go
diff --git
a/sdk/go/health/aggregator.go
b/sdk/go/health/aggregator.go
index 3f3a918004e58255ca06a99b142d825fb5f75354..564331327a8d53ad250b044112f25e1b07730444 100644
(file)
--- a/
sdk/go/health/aggregator.go
+++ b/
sdk/go/health/aggregator.go
@@
-113,8
+113,8
@@
func (agg *Aggregator) ClusterHealth(cluster *arvados.Cluster) ClusterHealthResp
mtx := sync.Mutex{}
wg := sync.WaitGroup{}
mtx := sync.Mutex{}
wg := sync.WaitGroup{}
- for
node, nodeConfig := range cluster.SystemNod
es {
- for svc, addr := range
nodeConfig
.ServicePorts() {
+ for
profileName, profile := range cluster.NodeProfil
es {
+ for svc, addr := range
profile
.ServicePorts() {
// Ensure svc is listed in resp.Services.
mtx.Lock()
if _, ok := resp.Services[svc]; !ok {
// Ensure svc is listed in resp.Services.
mtx.Lock()
if _, ok := resp.Services[svc]; !ok {
@@
-128,10
+128,10
@@
func (agg *Aggregator) ClusterHealth(cluster *arvados.Cluster) ClusterHealthResp
}
wg.Add(1)
}
wg.Add(1)
- go func(
nod
e string, svc arvados.ServiceName, addr string) {
+ go func(
profileNam
e string, svc arvados.ServiceName, addr string) {
defer wg.Done()
var result CheckResult
defer wg.Done()
var result CheckResult
- url, err := agg.pingURL(
nod
e, addr)
+ url, err := agg.pingURL(
profileNam
e, addr)
if err != nil {
result = CheckResult{
Health: "ERROR",
if err != nil {
result = CheckResult{
Health: "ERROR",
@@
-152,7
+152,7
@@
func (agg *Aggregator) ClusterHealth(cluster *arvados.Cluster) ClusterHealthResp
} else {
resp.Health = "ERROR"
}
} else {
resp.Health = "ERROR"
}
- }(
nod
e, svc, addr)
+ }(
profileNam
e, svc, addr)
}
}
wg.Wait()
}
}
wg.Wait()
@@
-217,7
+217,7
@@
func (agg *Aggregator) ping(url string, cluster *arvados.Cluster) (result CheckR
}
func (agg *Aggregator) checkAuth(req *http.Request, cluster *arvados.Cluster) bool {
}
func (agg *Aggregator) checkAuth(req *http.Request, cluster *arvados.Cluster) bool {
- creds := auth.
NewCredentialsFromHTTP
Request(req)
+ creds := auth.
CredentialsFrom
Request(req)
for _, token := range creds.Tokens {
if token != "" && token == cluster.ManagementToken {
return true
for _, token := range creds.Tokens {
if token != "" && token == cluster.ManagementToken {
return true