projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
15003: Fix errant warnings on Workbench configs.
[arvados.git]
/
services
/
keepstore
/
config.go
diff --git
a/services/keepstore/config.go
b/services/keepstore/config.go
index 1f8c7e31a2997ac2884ae2936ea174a0d859e017..43a2191111376fbf86c6943ffffff6c22668aa38 100644
(file)
--- a/
services/keepstore/config.go
+++ b/
services/keepstore/config.go
@@
-13,7
+13,8
@@
import (
"time"
"git.curoverse.com/arvados.git/sdk/go/arvados"
"time"
"git.curoverse.com/arvados.git/sdk/go/arvados"
- "github.com/Sirupsen/logrus"
+ "github.com/prometheus/client_golang/prometheus"
+ "github.com/sirupsen/logrus"
)
type Config struct {
)
type Config struct {
@@
-46,8
+47,7
@@
type Config struct {
systemAuthToken string
debugLogf func(string, ...interface{})
systemAuthToken string
debugLogf func(string, ...interface{})
- ManagementToken string `doc: The secret key that must be provided by monitoring services
-wishing to access the health check endpoint (/_health).`
+ ManagementToken string
}
var (
}
var (
@@
-82,7
+82,7
@@
func DefaultConfig() *Config {
// Start should be called exactly once: after setting all public
// fields, and before using the config.
// Start should be called exactly once: after setting all public
// fields, and before using the config.
-func (cfg *Config) Start() error {
+func (cfg *Config) Start(
reg *prometheus.Registry
) error {
if cfg.Debug {
log.Level = logrus.DebugLevel
cfg.debugLogf = log.Printf
if cfg.Debug {
log.Level = logrus.DebugLevel
cfg.debugLogf = log.Printf
@@
-144,8
+144,9
@@
func (cfg *Config) Start() error {
return fmt.Errorf("no volumes found")
}
}
return fmt.Errorf("no volumes found")
}
}
+ vm := newVolumeMetricsVecs(reg)
for _, v := range cfg.Volumes {
for _, v := range cfg.Volumes {
- if err := v.Start(); err != nil {
+ if err := v.Start(
vm
); err != nil {
return fmt.Errorf("volume %s: %s", v, err)
}
log.Printf("Using volume %v (writable=%v)", v, v.Writable())
return fmt.Errorf("volume %s: %s", v, err)
}
log.Printf("Using volume %v (writable=%v)", v, v.Writable())
@@
-166,7
+167,7
@@
func (vl *VolumeList) UnmarshalJSON(data []byte) error {
for _, factory := range VolumeTypes {
t := factory().Type()
if _, ok := typeMap[t]; ok {
for _, factory := range VolumeTypes {
t := factory().Type()
if _, ok := typeMap[t]; ok {
- log.Fatal
("volume type %+q is claimed by multiple VolumeTypes"
)
+ log.Fatal
f("volume type %+q is claimed by multiple VolumeTypes", t
)
}
typeMap[t] = factory
}
}
typeMap[t] = factory
}