ceph/ceph — pull request #557 by jecluis (2013-08-29 16:22:03+00:00)
Title: mon: MonmapMonitor: don't rerun command if we updated & bootstrapped 

MonMap changes lead to bootstraps. Callbacks waiting for a proposal to
finish can have several fates, depending on what happens: finished, rerun
or aborted.

In the case of a bootstrap right after a monmap change, callbacks are
rerun. Considering we queued the message that lead to the monmap change
on this queue, if we instead of finishing it end up reruning it, we will
end up trying to perform the same modification twice -- the last one will
try to modify an already existing state and we will return just that:
whatever you're attempting to do has already been done.

This patch adds a new callback class that will check if we are attempting
at rerunning a monmap change, and if so, we will check if what we're
attempting to do has already been accomplished by the message we're
rerunning; if so, we finish the message instead.