New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cluster-service: add version subcommand and change some startup logging #274
Conversation
consensus/raft/raft.go
Outdated
err := hraft.BootstrapCluster(cfg.RaftConfig, | ||
log, stable, snap, transport, srvCfg) | ||
if err != nil { | ||
logger.Error("bootstrapping cluster: ", err) | ||
return nil, err | ||
} | ||
} else { | ||
logger.Info("raft cluster is already bootstrapped") | ||
logger.Debug("raft cluster is already bootstrapped") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you changed bootstrapping to initializing above it seems like you should do it here too for consistency.
@@ -86,7 +86,7 @@ func NewCluster( | |||
return nil, err | |||
} | |||
|
|||
logger.Infof("IPFS Cluster v%s listening on:", Version) | |||
logger.Infof("IPFS Cluster v%s-%s listening on:", Version, Commit[0:8]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As TestClusterStateSync doesn't hit the cluster service version command this slice dereference seems to be the cause of the slice out of bounds error that Travis catches for these changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
The --version flag is default from our cli library so I left that. The version subcommand prints only the version number + the short commit so it's a bit more easy to parse. I have additionally reduced the amount of output on start up by converting some messages to debug. I wish there was a level between INFO and DEBUG though. License: MIT Signed-off-by: Hector Sanjuan <code@hector.link>
5c514a7
to
2b6dfa4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
The --version flag is default from our cli library so I left that. The
version subcommand prints only the version number + the short commit
so it's a bit more easy to parse.
I have additionally reduced the amount of output on start up by converting
some messages to debug. I wish there was a level between INFO and DEBUG
though.
Fixes #201
License: MIT
Signed-off-by: Hector Sanjuan code@hector.link