X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a7a482db3954fa6470be74f0e00f6e1e105e0b6c..166f27869b2f530aa3dd05b02cdc46f787dd8216:/services/keep-balance/main.go diff --git a/services/keep-balance/main.go b/services/keep-balance/main.go index 6e89df9a55..65bd8d4cf0 100644 --- a/services/keep-balance/main.go +++ b/services/keep-balance/main.go @@ -9,6 +9,7 @@ import ( "flag" "fmt" "io" + "net/http" "os" "git.arvados.org/arvados.git/lib/config" @@ -50,10 +51,17 @@ func runCommand(prog string, args []string, stdin io.Reader, stdout, stderr io.W options.Dumper = dumper } - // Only pass along the version flag, which gets handled in RunCommand + // Drop our custom args that would be rejected by the generic + // service.Command args = nil + dropFlag := map[string]bool{ + "once": true, + "commit-pulls": true, + "commit-trash": true, + "dump": true, + } flags.Visit(func(f *flag.Flag) { - if f.Name == "version" { + if !dropFlag[f.Name] { args = append(args, "-"+f.Name, f.Value.String()) } }) @@ -75,6 +83,7 @@ func runCommand(prog string, args []string, stdin io.Reader, stdout, stderr io.W } srv := &Server{ + Handler: http.NotFoundHandler(), Cluster: cluster, ArvClient: ac, RunOptions: options,