[ARVADOS] updated: 1c470ee799e6b085929155a3942d2a3d47276954

Git user git at public.curoverse.com
Wed May 25 15:43:34 EDT 2016


Summary of changes:
 build/run-build-packages-one-target.sh |  3 ++-
 build/run-build-packages.sh            |  2 ++
 services/keep-balance/balance.go       | 18 ++++++++++++------
 services/keep-balance/main.go          |  2 +-
 4 files changed, 17 insertions(+), 8 deletions(-)

       via  1c470ee799e6b085929155a3942d2a3d47276954 (commit)
       via  b364188ab1e87030997168a2cfddac2a41f5b5b9 (commit)
       via  a52ae537be1f877ae4242dc6e9d580073999f3e8 (commit)
      from  a4c0045623e096ce5950f137e014e0a9bf9fc5d7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 1c470ee799e6b085929155a3942d2a3d47276954
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed May 25 15:43:28 2016 -0400

    9162: Remove superfluous type spec.

diff --git a/services/keep-balance/main.go b/services/keep-balance/main.go
index 607ba87..48b1a74 100644
--- a/services/keep-balance/main.go
+++ b/services/keep-balance/main.go
@@ -42,7 +42,7 @@ type RunOptions struct {
 	Dumper      *log.Logger
 }
 
-var debugf func(string, ...interface{}) = func(string, ...interface{}) {}
+var debugf = func(string, ...interface{}) {}
 
 func main() {
 	var config Config

commit b364188ab1e87030997168a2cfddac2a41f5b5b9
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed May 25 15:42:47 2016 -0400

    9162: Add missing comments.

diff --git a/services/keep-balance/balance.go b/services/keep-balance/balance.go
index d077123..5659878 100644
--- a/services/keep-balance/balance.go
+++ b/services/keep-balance/balance.go
@@ -91,6 +91,7 @@ func (bal *Balancer) Run(config Config, runOptions RunOptions) (err error) {
 	return
 }
 
+// SetKeepServices sets the list of KeepServices to operate on.
 func (bal *Balancer) SetKeepServices(srvList arvados.KeepServiceList) error {
 	bal.KeepServices = make(map[string]*KeepService)
 	for _, srv := range srvList.Items {
@@ -99,16 +100,21 @@ func (bal *Balancer) SetKeepServices(srvList arvados.KeepServiceList) error {
 	return nil
 }
 
+// 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 {
 	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 {
-		for _, t := range okTypes {
-			if t == srv.ServiceType {
-				bal.KeepServices[srv.UUID] = &KeepService{KeepService: srv}
-				return nil
-			}
+		if ok[srv.ServiceType] {
+			bal.KeepServices[srv.UUID] = &KeepService{KeepService: srv}
+		} else {
+			bal.logf("skipping %v with service type %q", srv.UUID, srv.ServiceType)
 		}
-		bal.logf("skipping %v with service type %q", srv.UUID, srv.ServiceType)
 		return nil
 	})
 }

commit a52ae537be1f877ae4242dc6e9d580073999f3e8
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed May 25 15:42:00 2016 -0400

    9162: Build keep-balance package.

diff --git a/build/run-build-packages-one-target.sh b/build/run-build-packages-one-target.sh
index 7034e3f..5d89ca1 100755
--- a/build/run-build-packages-one-target.sh
+++ b/build/run-build-packages-one-target.sh
@@ -128,9 +128,10 @@ if test -z "$packages" ; then
         arvados-src
         arvados-workbench
         crunchstat
+        keep-balance
+        keep-block-check
         keepproxy
         keep-rsync
-        keep-block-check
         keepstore
         keep-web
         libarvados-perl"
diff --git a/build/run-build-packages.sh b/build/run-build-packages.sh
index c16141a..777a5dc 100755
--- a/build/run-build-packages.sh
+++ b/build/run-build-packages.sh
@@ -382,6 +382,8 @@ package_go_binary services/keepstore keepstore \
     "Keep storage daemon, accessible to clients on the LAN"
 package_go_binary services/keepproxy keepproxy \
     "Make a Keep cluster accessible to clients that are not on the LAN"
+package_go_binary services/keep-balance keep-balance \
+    "Rebalance and garbage-collect data blocks stored in Arvados Keep"
 package_go_binary services/keep-web keep-web \
     "Static web hosting service for user data stored in Arvados Keep"
 package_go_binary services/datamanager arvados-data-manager \

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list