mon/AuthMonitor: provide auth_lock-safe _assign_global_id()
Break assign_global_id() into two parts:
- _assign_global_id(), called under auth_lock, that does nothing but
assign an id (or fail). This makes use of the num_mon and num_rank
values, which means it only works while we are in quorum.
- increase_max_global_id(), if it looks like we should.
Also, adjust _should_increase_max_global_id() to also work under auth_lock
since we are looking at last_allocated_id. All last_allocated_id users
are not protected by auth_lock.
Fixes: http://tracker.ceph.com/issues/38372 Signed-off-by: Sage Weil <sage@redhat.com>