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
fsm_oss.go
generate.go
generate_msgtypes.sh
msgpack.go
msgpack_test.go
msgtypes.go
sample_test.go
snapshot.go
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