projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '19164-add-flags'
[arvados.git]
/
services
/
keepstore
/
handlers.go
diff --git
a/services/keepstore/handlers.go
b/services/keepstore/handlers.go
index 2a90705a56cbf0c1eec78a03dcd5b45463f84851..63a23687ece8f8a60213791006a78712bd19a67b 100644
(file)
--- a/
services/keepstore/handlers.go
+++ b/
services/keepstore/handlers.go
@@
-21,6
+21,7
@@
import (
"sync/atomic"
"time"
"sync/atomic"
"time"
+ "git.arvados.org/arvados.git/lib/cmd"
"git.arvados.org/arvados.git/sdk/go/arvados"
"git.arvados.org/arvados.git/sdk/go/ctxlog"
"git.arvados.org/arvados.git/sdk/go/health"
"git.arvados.org/arvados.git/sdk/go/arvados"
"git.arvados.org/arvados.git/sdk/go/ctxlog"
"git.arvados.org/arvados.git/sdk/go/health"
@@
-390,7
+391,7
@@
func (rtr *router) StatusHandler(resp http.ResponseWriter, req *http.Request) {
// populate the given NodeStatus struct with current values.
func (rtr *router) readNodeStatus(st *NodeStatus) {
// populate the given NodeStatus struct with current values.
func (rtr *router) readNodeStatus(st *NodeStatus) {
- st.Version =
version
+ st.Version =
strings.SplitN(cmd.Version.String(), " ", 2)[0]
vols := rtr.volmgr.AllReadable()
if cap(st.Volumes) < len(vols) {
st.Volumes = make([]*volumeStatusEnt, len(vols))
vols := rtr.volmgr.AllReadable()
if cap(st.Volumes) < len(vols) {
st.Volumes = make([]*volumeStatusEnt, len(vols))
@@
-708,7
+709,7
@@
func GetBlock(ctx context.Context, volmgr *RRVolumeManager, hash string, buf []b
if filehash != hash {
// TODO: Try harder to tell a sysadmin about
// this.
if filehash != hash {
// TODO: Try harder to tell a sysadmin about
// this.
- log.Error
("checksum mismatch for block %s (actual %s) on %s", hash, filehash
, vol)
+ log.Error
f("checksum mismatch for block %s (actual %s), size %d on %s", hash, filehash, size
, vol)
errorToCaller = DiskHashError
continue
}
errorToCaller = DiskHashError
continue
}
@@
-975,7
+976,7
@@
func CompareAndTouch(ctx context.Context, volmgr *RRVolumeManager, hash string,
// to tell which one is wanted if we have
// both, so there's no point writing it even
// on a different volume.)
// to tell which one is wanted if we have
// both, so there's no point writing it even
// on a different volume.)
- log.Error("collision in Compare(%s) on volume %s", hash, mnt.Volume)
+ log.Error
f
("collision in Compare(%s) on volume %s", hash, mnt.Volume)
return CollisionError
} else if os.IsNotExist(err) {
// Block does not exist. This is the only
return CollisionError
} else if os.IsNotExist(err) {
// Block does not exist. This is the only