mon/MonClient: make get_mon_log_message() atomic
* LogClient: move reset_session() into get_mon_log_message() and add a
"flush" param to the latter. so it can get_mon_log_message()
atomically. otherwise another call changing the log queue could sneak
in between reset_session() and get_mon_log_message().
* MonClient: add a "flush" param to do_send() so we can reset the
LogClient session once we are connected to a monitor.
Fixes: http://tracker.ceph.com/issues/19427
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit
5215e291da2b527d85e129eda86043490843178e)
Conflicts:
src/mon/MonClient.cc: handle_auth: replaced 'log_client->reset_session();
send_log();' sequence with newly introduced 'send_log(true);' like
the original patch does