"git.curoverse.com/arvados.git/sdk/go/arvados"
"git.curoverse.com/arvados.git/sdk/go/auth"
"git.curoverse.com/arvados.git/sdk/go/httpserver"
- "github.com/Sirupsen/logrus"
+ "github.com/sirupsen/logrus"
)
var version = "dev"
// Timeout for outgoing http request/response cycle.
RequestTimeout arvados.Duration
+
+ // Destination filename for the list of lost block hashes, one
+ // per line. Updated atomically during each successful run.
+ LostBlocksFile string
}
// RunOptions controls runtime behavior. The flags/options that belong
Once bool
CommitPulls bool
CommitTrash bool
- Logger *logrus.Logger
- Dumper *logrus.Logger
+ Logger logrus.FieldLogger
+ Dumper logrus.FieldLogger
// SafeRendezvousState from the most recent balance operation,
// or "" if unknown. If this changes from one run to the next,
metrics *metrics
listening string // for tests
- Logger *logrus.Logger
- Dumper *logrus.Logger
+ Logger logrus.FieldLogger
+ Dumper logrus.FieldLogger
}
// NewServer returns a new Server that runs Balancers using the given
func (srv *Server) Run() (*Balancer, error) {
bal := &Balancer{
- Logger: srv.Logger,
- Dumper: srv.Dumper,
- Metrics: srv.metrics,
+ Logger: srv.Logger,
+ Dumper: srv.Dumper,
+ Metrics: srv.metrics,
+ LostBlocksFile: srv.config.LostBlocksFile,
}
var err error
srv.runOptions, err = bal.Run(srv.config, srv.runOptions)