X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/52b7b2934d5d74ee67ca13f8d1cc95f1379faddc..e86ee860d99036ff4ac61f6635b738f3a408e446:/services/keep-balance/balance.go diff --git a/services/keep-balance/balance.go b/services/keep-balance/balance.go index 3471d50fe3..e50b0b505a 100644 --- a/services/keep-balance/balance.go +++ b/services/keep-balance/balance.go @@ -95,8 +95,7 @@ func (bal *Balancer) Run(client *arvados.Client, cluster *arvados.Cluster, runOp bal.lostBlocks = ioutil.Discard } - diskService := []string{"disk"} - err = bal.DiscoverKeepServices(client, diskService) + err = bal.DiscoverKeepServices(client) if err != nil { return } @@ -173,15 +172,11 @@ func (bal *Balancer) SetKeepServices(srvList arvados.KeepServiceList) error { // DiscoverKeepServices sets the list of KeepServices by calling the // API to get a list of all services, and selecting the ones whose -// ServiceType is in okTypes. -func (bal *Balancer) DiscoverKeepServices(c *arvados.Client, okTypes []string) error { +// ServiceType is "disk" +func (bal *Balancer) DiscoverKeepServices(c *arvados.Client) error { bal.KeepServices = make(map[string]*KeepService) - ok := make(map[string]bool) - for _, t := range okTypes { - ok[t] = true - } return c.EachKeepService(func(srv arvados.KeepService) error { - if ok[srv.ServiceType] { + if srv.ServiceType == "disk" { bal.KeepServices[srv.UUID] = &KeepService{ KeepService: srv, ChangeSet: &ChangeSet{},