Commit Graph

101338 Commits

Author SHA1 Message Date
Chang Liu
0b44a2d22b mon: show pool id in pool ls command
Fixes: http://tracker.ceph.com/issues/40287

Signed-off-by: Chang Liu <liuchang0812@gmail.com>
2019-08-20 16:44:56 +08:00
Kefu Chai
d153914865 osd: always initialize local variable
to silence a GCC warning like:

../src/osd/OSD.cc:4608:24: warning: ‘sender_delta_ub’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
 4608 |       ceph::signedspan sender_delta_ub;
      |                        ^~~~~~~~~~~~~~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-20 16:39:47 +08:00
NancySu05
57e8411578 mon: add a process that handle Callback Arguments
in C_AckMarkedDown,we add a process that handle _finish(int) Callback Arguments

Fixes: https://tracker.ceph.com/issues/41217
Signed-off-by: NancySu05 <su_nan@inspur.com>
2019-08-20 15:47:13 +08:00
Kefu Chai
3234fb3982 cmake,run-make-check.sh,deb,rpm: disable SPDK by default
but we still enable it in `run-make-check.sh`

* cmake: disable SPDK by default
* run-make-check.sh: enable WITH_SPDK so at least we can ensure it
  builds
* deb,rpm: add uuid-dev / libuuid-devel as a "make check" dependency

Fixes: https://tracker.ceph.com/issues/41330
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-20 15:38:33 +08:00
Kefu Chai
6fb738abb9 cmake: make WITH_SPDK a dependent option
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-20 15:38:33 +08:00
Zengran Zhang
521f095c65 osd: clear PG_STATE_CLEAN when repair object
there is a race be found, when we repair object on clean state,
we queue a DoRecovery peering event, but before the peering event
dequeue,a snaptrim event on the missing object's snap dequeue,
then we will get pass the context< SnapTrimmer >().can_trim()
and go to get the context of the missing object(snapdir)

we can avoid this by clear clean state when we found missing..

Fixes: https://tracker.ceph.com/issues/41348

Signed-off-by: Zengran Zhang <zhangzengran@sangfor.com.cn>
2019-08-20 15:19:41 +08:00
xie xingguo
1c582b7dd1 osd: do not invalidate clear_regions of missing item at boot
Seems we'll always mark clear_regions as all dirty
when reading pg logs and missing items off the disk,
which as a result turns incremental recovery off by default.
Also using std::move seems to be a bit more efficient
and robust here.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2019-08-20 13:27:34 +08:00
Kefu Chai
122c17f55f
Merge pull request #29753 from tchaikov/wip-sudo-sysctl
run-make-check.sh: run sudo with absolute path

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
2019-08-20 11:57:03 +08:00
Xie Xingguo
28e7feb3e7
Merge pull request #29726 from xiexingguo/wip-inc-recovery-1
osd/PrimaryLogPG: fix dirty range of write_full

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
2019-08-20 11:22:39 +08:00
Xie Xingguo
3062bd6b15
Merge pull request #29729 from xiexingguo/wip-inc-recovery-2
osd/PrimaryLogPG: finish_copyfrom - dirty omap if necessary

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2019-08-20 11:22:08 +08:00
Kefu Chai
11f9aae4ca run-make-check.sh: run sudo with absolute path
there is chance that `/sbin` is not listed in `secure_path`, see
sudoers(5) for more details

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-20 10:51:36 +08:00
Zengran Zhang
ac387844e1 osd: merge replica log on primary need according to replica log's crt
Fixes: https://tracker.ceph.com/issues/41194

Signed-off-by: Zengran Zhang <zhangzengran@sangfor.com.cn>
2019-08-20 09:26:20 +08:00
Brad Hubbard
002ced8a5f osd/OSDCap: Check for empty namespace
Fixes: http://tracker.ceph.com/issues/40835

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2019-08-20 11:25:23 +10:00
Greg Farnum
c9583d5aff test: switch to ldout; let users specify mon debug level
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
5a64cdf417 test: add new ElectionLogic unit test framework
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
a56f620d1f elector: const-ify a bunch of functions
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
fba2a0dd59 elector: swap order of parameters in ElectionLogic::receive_propose
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
521a622ea9 elector: Update Elector and ElectionLogic function documentation
The world has changed, and now so have the nice docs.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
b8f04c5e76 elector: persist the epoch in bump_epoch()
I somehow broke this when initially hoisting it out of Elector. Whoops!

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
28729ea192 elector: make some more ElectionLogic members private
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
94c2fd3da0 elector: fix privacy and restore dout in Elector
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
1261c44ca7 elector: don't clear peer_info in bump_epoch()
Not sure how I got that wrong, but we bump_epoch() on
winning an election, right before we start looking through
peer_info. So just do it on election start instead.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
8eac58354f elector: split ElectionLogic into its own compilation unit
Just copy the files, then delete the inappropriate bits.
Switched to using ldout in ElectionLogic.cc, added a few
functions I missed to the ElectionOwner interface, and moved
Elector() into the .cc so I could grab cct out of it.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
8a95e2c8fb elector: move all the elector callouts into the Elector
In the next commit we'll actually use the ElectionOwner interface.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
bf9523bc89 elector: make ElectionLogic private to Elector; undo most public shenanigans
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
40339cd405 elector: create declare_standlone_victory in Elector/Logic for Monitor
This lets us make a few more ElectionLogic functions private.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
c591bd4cd9 elector: make ElectionLogic::declare_victory private
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
b7a44c0a77 elector: route _bump_epoch through the interface-to-be
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
ba37ca9ccb elector: rename handle_propose_logic -> receive_propose
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
1d1c143fba elector: hoist handle_victory into ElectionLogic
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
925f132146 elector: hoist handle_ack into ElectionLogic
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
469910be5f elector: hoist victory into ElectionLogic
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
3ca09c98fa elector: hoist expire into ElectionLogic
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
952d785b7d elector: hoist start into ElectionLogic
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
b53b984daa elector: hoist participating into ElectionLogic
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
0205695046 elector: hoist init into ElectionLogic
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
a227a242ef elector: hoist defer into ElectionLogic
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
e24a73de09 elector: split handle_propose in two and hoist into ElectionLogic
Also add a bunch of utility functions that will need to
get better implementations later

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
2069016a15 elector: hoist bump_epoch into ElectionLogic
Mangle some pointers and the dout prefix to make things compile
during this transition.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
987630f204 elector: store accessors for ElectionLogic
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
cda3b250f2 elector: hoist Elector data bits out into a new ElectionLogic class
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Greg Farnum
0c85f8fe68 mon: Rearrange Paxos::dispatch to be a little cleaner
The Message is actually always a MMonPaxos (which is not a subtype of
PaxosServiceMessage, so that whole thing was wrong!). This lets
us clean up the switch quite a bit and correct the odd casts
going around.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-08-19 13:04:59 -07:00
Sage Weil
3a781f9577 qa/run-standalone.sh: fix python path
Signed-off-by: Sage Weil <sage@redhat.com>
2019-08-19 12:33:05 -05:00
Sage Weil
1e36be9567 qa/standalone/mon/health-mute.sh: fix up rachet test
Make sure we provide time for the mute to get cleared out by tick().

Signed-off-by: Sage Weil <sage@redhat.com>
2019-08-19 12:30:10 -05:00
Patrick Donnelly
0dd2d0fd7e
Merge PR #29518 into master
* refs/pull/29518/head:
	mount.ceph: properly handle -o strictatime

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-08-19 09:36:37 -07:00
Patrick Donnelly
b2eb9e435a
Merge PR #29411 into master
* refs/pull/29411/head:
	mds: fix InoTable::force_consume_to()

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-08-19 09:34:42 -07:00
Patrick Donnelly
0935ab2c4f
Merge PR #29543 into master
* refs/pull/29543/head:
	mds: move some MDCache member init to header

Reviewed-by: Jos Collin <jcollin@redhat.com>
2019-08-19 09:33:26 -07:00
Jason Dillaman
d9d4eb550b
Merge pull request #29429 from dillaman/wip-40834
doc/rbd: initial kubernetes / ceph-csi integration documentation

Reviewed-by: ShyamsundarR <srangana@redhat.com>
Reviewed-by: Humble Chirammal <hchiramm@redhat.com>
Reviewed-by: Madhu Rajanna <madhupr007@gmail.com>
2019-08-19 11:57:01 -04:00
Sage Weil
9352fc94ab qa/standalone/mon/health-mute.sh: s/kill daemons/kill_daemons/
Signed-off-by: Sage Weil <sage@redhat.com>
2019-08-19 09:27:51 -05:00
Sage Weil
329463b386 Merge PR #29719 into master
* refs/pull/29719/head:
	osd/PrimaryLogPG: kill obsolete ondisk_{read,write}_lock comments

Reviewed-by: Sage Weil <sage@redhat.com>
2019-08-19 09:09:06 -05:00