mon: hunt for multiple mons in parallel
I use a few helper scripts to automate things, and those scripts
call ‘ceph’ command multiple times, like
ceph do something
ceph do something else
I get a delay when one monitor is down, until a working mon is found.
That is OK so far.
But I get that delay each times when I run a ‘ceph’ command. It would be great
if ceph remembers the last successful mon connection, so that such delays are avoided.
#1 Updated by Sage Weil over 3 years ago
- Subject changed from avoid cli delay when one mon is down to mon: hunt for multiple mons in parallel
When the MonClient is in "hunting" mode, we should open connections to multiple random monitors at once, and then use whichever responds first, and close the other connection.
This will require some refactoring in MonClient (probably moving the session-related state into a separate class/struct so that there can be multiple sessions doing an initial handshake in parallel?).