Merge branch '20529-container-deadlocks' refs #20529
[arvados.git] / services / keep-balance / main.go
index f0b0df5bd331d6a97a2cdaab0a8d968cfdbfc550..6bc998958979fc41288cd051bb40eaae4a10de4e 100644 (file)
@@ -38,6 +38,8 @@ func (command) RunCommand(prog string, args []string, stdin io.Reader, stdout, s
                "send trash requests (delete unreferenced old blocks, and excess replicas of overreplicated blocks)")
        flags.BoolVar(&options.CommitConfirmedFields, "commit-confirmed-fields", true,
                "update collection fields (replicas_confirmed, storage_classes_confirmed, etc.)")
+       flags.StringVar(&options.ChunkPrefix, "chunk-prefix", "",
+               "operate only on blocks with the given prefix (experimental, see https://dev.arvados.org/issues/19923)")
        // These options are implemented by service.Command, so we
        // don't need the vars here -- we just need the flags
        // to pass flags.Parse().
@@ -112,7 +114,7 @@ func (command) RunCommand(prog string, args []string, stdin io.Reader, stdout, s
                                Routes: health.Routes{"ping": srv.CheckHealth},
                        }
 
-                       go srv.run()
+                       go srv.run(ctx)
                        return srv
                }).RunCommand(prog, args, stdin, stdout, stderr)
 }