Commit Graph

51924 Commits

Author SHA1 Message Date
Sage Weil
723b46c801 Merge pull request #8330 from xiexingguo/xxg-wip-race
common: fix race during optracker switches between enabled/disabled mode

Reviewed-by: David Zafman <dzafman@redhat.com>
2016-03-30 08:22:30 -04:00
Sage Weil
9025d9f114 Merge pull request #8335 from liewegas/wip-13992
mon/MonClient: fix shutdown race

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-03-30 08:21:47 -04:00
Mykola Golub
3995cafae4 cls::rbd: read_peers: update last_read on next cls_cxx_map_get_vals
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-03-30 15:01:05 +03:00
John Spray
557955a233 qa: update rest test cephfs calls
Since the ceph task was already creating filesystems
during setup, I presume that these calls only ever
worked when they were using the same names as
the existing filesystem.

Fixes: http://tracker.ceph.com/issues/15309
Signed-off-by: John Spray <john.spray@redhat.com>
2016-03-30 11:43:22 +01:00
xie xingguo
c29895949e osd: skip heartbeat_check for osd which we haven't sent ping to
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-03-30 18:01:38 +08:00
xie xingguo
5c5c8dfefe osd: initialize last_pg_stats_ack correctly on first pg_stats message sending
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>
2016-03-30 18:01:38 +08:00
xie xingguo
9cf53022c3 osd: update osd_stat_updated field if we force to report to monitor
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>
2016-03-30 16:39:46 +08:00
Kefu Chai
dbd9bb1174 Merge pull request #7857 from tchaikov/wip-14844
ceph.spec.in: enable lttng and babeltrace explicitly

thanks to ktdreyer, we have lttng and babel in EPEL-7 now.

Reviewed-by: Nathan Cutler <ncutler@suse.com>
2016-03-30 14:47:34 +08:00
Kefu Chai
aacadad2a0 cmake: add StandardPolicy.cc to librbd
fixes the librbd build.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-03-30 14:32:33 +08:00
runsisi
383d48be2f rbd-mirror: fix missing increment of iterators
Signed-off-by: runsisi <runsisi@hust.edu.cn>
2016-03-30 10:34:26 +08:00
Josh Durgin
5b49e9fb41 Merge pull request #8287 from dillaman/wip-15232
rbd-mirror: initial failover / failback support

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2016-03-29 18:25:05 -07:00
Sage Weil
c7a0223f1e test/pybind/test_rados: force setting readonly cache mode
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-29 21:08:38 -04:00
Sage Weil
1ac3444626 Merge pull request #7712 from vitek/listbucket_encoding_type_fix
rgw: S3: set EncodingType in ListBucketResult

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2016-03-29 21:07:41 -04:00
Orit Wasserman
99c6f3095c Merge pull request #8363 from cbodley/wip-cmake-vstart
vstart: fix up cmake paths when VSTART_DEST is given
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
2016-03-29 23:24:28 +02:00
Sage Weil
5318be502c Merge pull request #8362 from jdurgin/wip-ceph-python-path
ceph.in: fix python libpath for automake as well
2016-03-29 15:46:52 -04:00
Samuel Just
4810928bdf Merge pull request #8364 from liewegas/wip-fix-update-op
os/ObjectStore: fix _update_op for split dest_cid

Reviewed-by: Samuel Just <sjust@redhat.com>
2016-03-29 12:46:14 -07:00
Casey Bodley
23336a3c7c vstart: fix up cmake paths when VSTART_DEST is given
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>
2016-03-29 15:26:31 -04:00
Sage Weil
e3dc7c772f os/ObjectStore: fix _update_op for split dest_cid
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-29 15:24:59 -04:00
Jason Dillaman
ded7a77931 qa/workunits/rbd: add basic failover/fallback test case
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:19:26 -04:00
Jason Dillaman
9665b5b276 rbd-mirror: use 32bit image creation bid to avoid overflow
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:19:26 -04:00
Jason Dillaman
4c2747fba1 rbd-mirror: initial support for primary/non-primary handling
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:19:26 -04:00
Jason Dillaman
a6eaa837c8 librbd: accessor for journal tag data
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:19:26 -04:00
Jason Dillaman
3f15853f29 librbd: link primary mirror uuid to non-primary journal tag
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:19:25 -04:00
Jason Dillaman
882bc06f54 rbd-mirror: update mirror peer sync state after completion
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:19:25 -04:00
Jason Dillaman
668b41d1e8 librbd: track mirror peer replay state
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>
2016-03-29 15:19:25 -04:00
Jason Dillaman
276e2eb21b rbd-mirror: allocate local journal tags from mirror remote peer tags
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:19:25 -04:00
Jason Dillaman
bdee02cb57 journal: helper method for retrieving tag struct
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:19:25 -04:00
Jason Dillaman
4adc57ecfb rbd: use consistent "non-primary" verbiage for image mirroring
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:19:25 -04:00
Jason Dillaman
04892961d2 librbd: image demotion should record new demote journal event
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:19:25 -04:00
Jason Dillaman
970a17368a librbd: blacklist journal error while attempting to acquire lock
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>
2016-03-29 15:19:25 -04:00
Jason Dillaman
e1c61f59ae librbd: new demote journal event
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>
2016-03-29 15:19:25 -04:00
Jason Dillaman
f42e7610fb rbd-mirror: framework for replay allocating tags in local journal
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:19:25 -04:00
Jason Dillaman
5de360dd64 librbd: journal reset should re-register the local client
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:19:25 -04:00
Jason Dillaman
d624e65a30 rbd-mirror: cleanup debug log messages
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:19:25 -04:00
Jason Dillaman
476da1011c rbd-mirror: cross-reference local image via global image id
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:19:25 -04:00
Jason Dillaman
909eb43d73 cls_rbd: mirroring directory reverse lookup from global id to image id
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:19:25 -04:00
Jason Dillaman
347349c3f5 rbd-mirror: bootstrap requires the global image id
The global image id can be used to cross-reference images that
have been replicated amongst peers.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:19:25 -04:00
Jason Dillaman
6541e3566a rbd-mirror: fix state output stream formatter
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:19:25 -04:00
Jason Dillaman
7a3ffc9d70 librbd: support creating images with non-primary journals
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>
2016-03-29 15:19:25 -04:00
Jason Dillaman
f01efc8ce6 rbd-mirror: don't acquire lock for primary local images
Abort the image replay for any local images that are marked as primary.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:12:29 -04:00
Jason Dillaman
511039eca9 rbd-mirror: tweaks to support creating mock test cases
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:12:29 -04:00
Jason Dillaman
8e8deb35a2 rbd-mirror: bootstrap now has initial support for existing images
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:12:29 -04:00
Jason Dillaman
d9ee1e7270 rbd-mirror: properly initialize image copy start/end objects
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:12:29 -04:00
Jason Dillaman
18e849f01c rbd-mirror: only delete ImageCtx after open failure
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>
2016-03-29 15:12:29 -04:00
Jason Dillaman
cb72ac120c cls_journal: disallow client registration against missing journal
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:12:29 -04:00
Jason Dillaman
0b0b2244a0 journal: added helper to query single client record from disk
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:12:29 -04:00
Jason Dillaman
418b4746a1 rbd-mirror: convert ImageReplayer into templated class
This will facilitate create mock test cases.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-29 15:12:29 -04:00
Jason Dillaman
7d10eb01c0 librbd: helper methods to allocate tags associated to remote journals
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>
2016-03-29 15:12:29 -04:00
Jason Dillaman
0f99d88dc9 rbd-mirror: initial integration with librbd lock/journal policies
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>
2016-03-29 15:12:29 -04:00
Jason Dillaman
a9549d6643 librbd: basic policy for journal handling
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>
2016-03-29 15:12:28 -04:00