[ARVADOS] created: 2.1.0-1622-gb24cc8345
Git user
git at public.arvados.org
Tue Nov 16 21:33:31 UTC 2021
at b24cc8345bb814d0df60ca9504eaeb1572af3095 (commit)
commit b24cc8345bb814d0df60ca9504eaeb1572af3095
Author: Tom Clegg <tom at curii.com>
Date: Tue Nov 16 16:32:00 2021 -0500
18387: Fix incorrect version reported in logs.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/services/keepstore/command.go b/services/keepstore/command.go
index 2a426936e..519f45d2c 100644
--- a/services/keepstore/command.go
+++ b/services/keepstore/command.go
@@ -15,6 +15,7 @@ import (
"os"
"sync"
+ "git.arvados.org/arvados.git/lib/cmd"
"git.arvados.org/arvados.git/lib/config"
"git.arvados.org/arvados.git/lib/service"
"git.arvados.org/arvados.git/sdk/go/arvados"
@@ -26,7 +27,6 @@ import (
)
var (
- version = "dev"
Command = service.Command(arvados.ServiceNameKeepstore, newHandlerOrErrorHandler)
)
@@ -168,7 +168,7 @@ func (h *handler) setup(ctx context.Context, cluster *arvados.Cluster, token str
return errors.New("no volumes configured")
}
- h.Logger.Printf("keepstore %s starting, pid %d", version, os.Getpid())
+ h.Logger.Printf("keepstore %s starting, pid %d", cmd.Version.String(), os.Getpid())
// Start a round-robin VolumeManager with the configured volumes.
vm, err := makeRRVolumeManager(h.Logger, h.Cluster, serviceURL, newVolumeMetricsVecs(reg))
diff --git a/services/keepstore/handlers.go b/services/keepstore/handlers.go
index 2a90705a5..52683d971 100644
--- a/services/keepstore/handlers.go
+++ b/services/keepstore/handlers.go
@@ -21,6 +21,7 @@ import (
"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"
@@ -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) {
- 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))
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list