So we don't potentially make an incorrect judgement in the tick_without_osd_lock()
procedure if OSD's first pg_stats message was sent, which as a result shall cause
an unnecessary hunting of new monitor.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
On tick_without_osd_lock() waking up, we will force an immediate
report to monitor if a long enough period has elapsed since our
last report was sent.
However, the send_pg_stats() procedure is a noop unless either
osd_stat_updated field is set or pg_stat_queue is empty.
Since the latter condition is non-deterministic, we shall
manually set osd_stat_updated here to kick a pg relevant report
off.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
mstart.sh uses VSTART_DEST to tell vstart.sh where to create the
cluster. in the cmake case, it needs to get a relative path from there
to the built binaries and libraries - update these paths to use the new
'lib' and 'bin' directories
Signed-off-by: Casey Bodley <cbodley@redhat.com>
This new state will protect against the case of an rbd-mirror crash
between registering with the remote and starting the image sync.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The journal policy will return -EPERM if attempting to acquire the
exclusive lock when the image is non-primary.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This event will be used as a placeholder to ensure that the demotion journal
tag is properly processed by rbd-mirror. Without an event associated with
the demotion journal tag, the demotion event will be missed.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
When rbd-mirror initially creates a replicated image in the
local pool, the journal should be flagged as non-primary to
(1) prevent local ops againsts the image and (2) provide a
clean chain of replicated tags.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The image is already closed -- it just needs to be destroyed
in a thread context outside of librbd.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Allocating tags for the local journal will always be based off the local
commit position. For remote journals, the local commit position doesn't
reflect actual events replayed by rbd-mirror, so it needs to provide the
remote journal commit position.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
For the first stage, acquiring the exclusive-lock will no longer
automatically result in the allocation of a journal tag.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This will allow rbd-mirror to override the allocation of a new
tag and to restart rbd-mirror's image replayer when a watch error
forces the loss of the exclusive lock.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This will be used when force promoting an image to primary -- when
rbd-mirror receives the forced request, it will immediately abort
playback.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The rbd-mirror daemon will need to interlock with the request for the lock
from another client with the successful sync of remote journal events.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>