open-nomad/helper/raftutil
Michael Schurter 4949488217 cli: return error from raft commands if db is open
Before this change trying to run `nomad operator raft {info,logs}` on an
inuse raft.db would cause the command to block until the agent using
raft.db is closed.

After this change the command will block for 1s before returning a
(hopefully) helpful error message.

This change also sets the ReadOnly mode on the underlying BoltDb to
ensure diagnostics make no changes to the underlying store. We have no
evidence this has ever occurred, but it seems like a useful safety
measure.

No changelog added since this is a minor tweak in a "new" feature (it
was hidden in previous relases).
2021-12-16 11:41:01 -08:00
..
fsm.go Raft Debugging Improvements (#11414) 2021-11-04 10:16:12 -04:00
fsm_oss.go gofmt all the files 2021-10-01 10:14:28 -04:00
generate.go add helper commands for debugging state 2020-08-31 08:45:59 -04:00
generate_msgtypes.sh Update generate_msgtypes.sh now that iota is gone 2020-10-22 15:26:32 -07:00
msgpack.go reverting export of fixTime 2020-09-29 01:21:03 -04:00
msgpack_test.go reverting export of fixTime 2020-09-29 01:21:03 -04:00
msgtypes.go RPC endpoints to support 'nomad ui -login' 2021-03-10 08:17:56 -05:00
sample_test.go Raft Debugging Improvements (#11414) 2021-11-04 10:16:12 -04:00
snapshot.go Raft Debugging Improvements (#11414) 2021-11-04 10:16:12 -04:00
state.go cli: return error from raft commands if db is open 2021-12-16 11:41:01 -08:00
state_test.go cli: return error from raft commands if db is open 2021-12-16 11:41:01 -08:00