Skip to content

Commit

Permalink
Fix a fmt in SetInstanceMonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
cvaroqui committed Aug 11, 2023
1 parent 78072b3 commit dbd83a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions daemon/imon/main_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ func (o *imon) onSetInstanceMonitor(c *msgbus.SetInstanceMonitor) {
continue
}
if instMon.GlobalExpectUpdatedAt.After(o.state.GlobalExpectUpdatedAt) {
err := fmt.Errorf("%w: %s: %s", instance.ErrSameGlobalExpect, *c.Value.GlobalExpect)
err := fmt.Errorf("%w: %s: more recent value %s on node %s", instance.ErrInvalidGlobalExpect, *c.Value.GlobalExpect, instMon.GlobalExpect, node)
sendError(err)
o.log.Info().Msgf("refuse to set global expect '%s': node %s global expect is already '%s'", instMon.GlobalExpect, node, *c.Value.GlobalExpect)
o.log.Info().Msgf("%s", err)
globalExpectRefused()
return
}
Expand Down
2 changes: 1 addition & 1 deletion daemon/nmon/main_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func (o *nmon) onSetNodeMonitor(c *msgbus.SetNodeMonitor) {
if *c.Value.GlobalExpect != node.MonitorGlobalExpectAborted {
for nodename, data := range o.nodeMonitor {
if data.GlobalExpect == *c.Value.GlobalExpect {
err := fmt.Errorf("%w: already targeting %s (on node %s)", node.ErrInvalidGlobalExpect, *c.Value.GlobalExpect, nodename)
err := fmt.Errorf("%w: %s: more recent value %s on node %s", node.ErrInvalidGlobalExpect, *c.Value.GlobalExpect, data.GlobalExpect, nodename)
sendError(err)
o.log.Info().Msgf("%s", err)
return
Expand Down

0 comments on commit dbd83a1

Please sign in to comment.