Addressing feedback

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
This commit is contained in:
Hector Sanjuan 2018-03-13 10:37:47 +01:00
parent 740f314976
commit 4f9fccde72
2 changed files with 13 additions and 11 deletions

View File

@ -429,15 +429,17 @@ func (c *Cluster) ready(timeout time.Duration) {
timer := time.NewTimer(timeout)
select {
case <-timer.C:
logger.Error("**************************************************")
logger.Error("***** ipfs-cluster consensus start timed out *****")
logger.Error("This peer was not able to become part of the cluster.")
logger.Error("This might be due to one or several causes:")
logger.Error(` - Check that there is connectivity to the "bootstrap" and "peers" multiaddresses`)
logger.Error(` - Check that all cluster peers are using the same "secret"`)
logger.Error(` - Check that this peer is reachable on its "listen_multiaddress"`)
logger.Error(` - Check that there is a majority of available peers`)
logger.Error("**************************************************")
logger.Error("***** ipfs-cluster consensus start timed out (tips below) *****")
logger.Error(`
**************************************************
This peer was not able to become part of the cluster.
This might be due to one or several causes:
- Check that there is connectivity to the "bootstrap" and "peers" multiaddresses
- Check that all cluster peers are using the same "secret"
- Check that this peer is reachable on its "listen_multiaddress"
- Check that there is a majority of available peers
**************************************************
`)
c.Shutdown()
return
case <-c.consensus.Ready():

View File

@ -63,8 +63,8 @@ func (fw *logForwarder) repeated(t int, msg string) bool {
fw.lastTip = make(map[int]time.Time)
}
// We we haven't tipped about repeated log messages
// in while, do it and forget the list
// We haven't tipped about repeated log messages
// in a while, do it and forget the list
if time.Now().After(fw.lastTip[t].Add(repeatReset)) {
fw.lastTip[t] = time.Now()
fw.lastMsgs[t] = nil