Commit Graph

81295 Commits

Author SHA1 Message Date
Sage Weil
8dae6d198e ceph_test_objectstore: flush() before collection_list()
The one exception to the "immediately readable" it collection_list, which
is not readable until the kv transaction is applied.  Our choices are

1. Wait until kv to apply to trigger onreadable (for any create/remove
ops).  This wipes away much of the benefit of fully sync onreadable.

2. Add tracking for created/removed objects in BlueStore so that we can
incorporate those into collection_list.  This is complex.

3. flush() from collection_list.  Unfortunately we don't have osr linked
to Collection, so this doesn't quite work with the current ObjectStore
interface.

4. Require the caller flush() before list and put a big * next to the
"immediately onreadable" claim.  It turns out that because of FileStore,
the OSD already does flush() before collection_list anyway, so this does
not require any actual change... except to store_test tests.  (This didn't
affect filestore because store_test is using apply_transaction, which
waits for readable, and on filestore that also implies visible by
collection_list.)

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
354a6bab56 os/bluestore/BitmapFreelistManager: disable bluestore_debug_freelist
This doesn't work as implemented.  We are doing _txc_finalize_kv() from
queue_transactions, which calls into the freelist and does this verify
code.  However, we have no assurance that a previous txc in the sequencer
has applied its changes to the kv store, which means that a simple sequence
like

 - write object
 - delete object

can trigger if the write is waiting for aio.  This currently happens
with ObjectStore/StoreTest.SimpleRemount/2.

Comment out the verify, but leave _verify_range() helper in place in case
we can use it in the future in some other context.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
ec9f1fe4ca os/bluestore: fix _set_alloc_sizes dout
Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
dbb365de83 os/bluestore: avoid OpSequencer::parent
The parent may go away, so we need to keep our own copy of shard_hint in
OpSequencer to avoid a user-after-free (e.g., when the user drops their
osr and calls OpSequencer::discard()).

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
c77cb1b98d os/ObjectStore: expose is_sync_onreadable()
Only FileStore is false.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
6d7d8ba94b osd/PrimaryLogPG: sync_complete for C_OSD_AppliedRecoveryObject[Replica]
Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
779e01085b osd/PG: sync_complete for C_UpdateLastRollbackInfoTrimmedToApplied
One of these is attached to every write!

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
4df1645ee5 osd: allow BlessedContexts to finish synchronously
If bluestore chooses to it may try to call sync_finish() from the queueing
call chain (instead of finish() from a Finisher).  Allow it for several
Contexts in PG and PrimaryLogPG, including those used for the main IO
path.

We assume here that all Contexts that we bless can complete synchronously
by calling their normal finish() method.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
df1c7308c9 os/bluestore: simplify completion roll-ups
No need to wrap these in C_Contexts and do a new allocation; just slurp
up the list elements directly.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:05:38 -06:00
Sage Weil
7bca217ede os/bluestore: call onreadable from queue_transaction
Bluestore updates are immediately present in the cache and readable.  The
only exception are omap updates, but the read methods there block until
they commit, so we can still tell the OSD that they are readable.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:04:57 -06:00
Sage Weil
b877860e42 osd: flush before collection_list()
We would get this implicitly with FileStore if we waited for the onreadable
callbacks, but in some cases the OSD has already done that.  With BlueStore,
we need to explicitly flush().

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:04:57 -06:00
Sage Weil
eff2a4d24b include/Context: add sync_complete support to C_Contexts
Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:04:57 -06:00
Sage Weil
dfd52c2bc3 include/Context: add sync_complete() hook
Sometimes we are able to complete a context synchronously, within the same
callchain of the caller who queued it.  In this case the locking rules are
usually a bit different for the caller.  Add a generic Context hook that
allows this.

If a sync-capable Context implements sync_complete, it can do whatever
it needs to do for this particular event.  If it is not implemented, the
generic implementation will return false, and the caller can use the
normal complete() as it normally would have (presumably by calling it
asynchronously, e.g., in a Finisher).

If sync_complete() is implemented, it *must* return true.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:04:57 -06:00
Sage Weil
f46efeb47c common/Finisher: simplify
The second _rval list was a dumb idea.  A vector of pairs is simpler
and more efficient.

Also, extend support to any container type.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-12-11 15:04:57 -06:00
Gregory Farnum
da7d071654
Merge pull request #19191 from tchaikov/wip-mon-cleanup
mon: remove_is_write_ready()

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2017-12-11 11:46:19 -08:00
Casey Bodley
5d4da4598d
Merge pull request #17438 from mikulely/fix-mstop
vstart.sh: fix mstop.sh can not stop rgw

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
2017-12-11 14:11:06 -05:00
Patrick Donnelly
6f3553351d
Merge PR #19432 into master
* refs/pull/19432/head:
	doc: correct the new fs allow opts

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-12-11 08:18:11 -08:00
Jason Dillaman
f10904b617
Merge pull request #19416 from trociny/wip-flatten-cleanup
librbd: remove unused member in FlattenRequest

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-12-11 10:01:23 -05:00
Dan van der Ster
9d55d17c4e doc: correct the new fs allow opts
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
2017-12-11 13:32:59 +01:00
Kefu Chai
2d641bde20
Merge pull request #19426 from tchaikov/wip-cmake
cmake: disable FAIL_ON_WARNINGS for rocksdb
2017-12-11 16:34:41 +08:00
Kefu Chai
6559a85051 cmake: disable FAIL_ON_WARNINGS for rocksdb
otherwise -Werror=implicit-fallthrough will fail the build with GCC-7

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-12-11 14:09:45 +08:00
Patrick Donnelly
d2ebe22a49
Merge PR #19373 into master
* refs/pull/19373/head:
	client: drop duplicate friend

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-12-09 16:34:24 -08:00
Kefu Chai
717591016d
Merge pull request #19417 from tchaikov/wip-install-deps-gcc
install-deps.sh: install new gcc as the default the right way

Reviewed-by: Sage Weil <sage@redhat.com>
2017-12-10 00:38:59 +08:00
Kefu Chai
3882deae8c install-deps.sh: install new gcc as the default the right way
* should install software-properties-common beforehand, otherwise
  the `add-apt-repository` command will not be available.
* the update-alternative commandline were copied from ceph-build,
  should remove the escape characters.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-12-09 20:00:28 +08:00
Mykola Golub
41bdd8b6d4 librbd: remove unused member in FlattenRequest
Signed-off-by: Mykola Golub <to.my.trociny@gmail.com>
2017-12-09 11:47:01 +02:00
Kefu Chai
74a132d826
Merge pull request #19398 from tchaikov/wip-install-deps-use-dts
install-deps.sh: use DTS on centos if GCC is too old

Reviewed-by: Sage Weil <sage@redhat.com>
2017-12-09 11:51:33 +08:00
Kefu Chai
b38621f302 ceph.spec: use dts-7 on rhel
devtoolset-7 is available for RHEL, but not for centos. only dts-6 is
available for centos.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-12-09 11:18:27 +08:00
Sage Weil
a16ff1a7cd
Merge pull request #19382 from rishabh-d-dave/docfix-ceph-osd-ls
doc/man: add "ls" to "ceph osd" command's subcommands list
2017-12-08 18:31:35 -06:00
Jason Dillaman
53be4ef96c
Merge pull request #19005 from shinobu-x/src_krbd
rbd: drop unnecessary using declaration, etc

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-12-08 10:18:22 -05:00
Kefu Chai
4cedada14e install-deps.sh: enable testing repo on centos on aarch64
the DTS-6 is only available in the testing repo

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-12-08 21:15:53 +08:00
Jason Dillaman
899a2f9d38
Merge pull request #19338 from vshankar/rbd-mirror-image-map-timestamp
rbd-mirror: persist image map timestamp

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-12-08 07:15:30 -05:00
Jason Dillaman
7d0149e167
Merge pull request #19383 from trociny/wip-snapshot-copy
librbd: deep_copy: don't create snapshots above snap_id_end

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-12-08 07:15:06 -05:00
Kefu Chai
3f8647a7e8 install-deps.sh: use DTS on centos if GCC is too old
please note, run-make-check.sh sources install-deps.sh here to import
the $PATH and other environmental variables, which could be changed by
the the DTS "enable" script.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-12-08 19:36:58 +08:00
Sage Weil
604dc4decb
Merge pull request #19395 from tchaikov/wip-debian-control-upgrade
debian/control: adjust ceph-{osdomap,kvstore,monstore}-tool feature move

Reviewed-by: Sage Weil <sage@redhat.com>
2017-12-08 02:34:22 -06:00
Kefu Chai
ec16e941f1
Merge pull request #19341 from tchaikov/wip-22301
ceph.spec: use devtoolset-6-gcc-c++ on aarch64
2017-12-08 15:24:48 +08:00
Kefu Chai
ee14a079ba
Merge pull request #19336 from amitkumar50/cov-misc-14
osd,os,io: Initializing C_ProxyChunkRead members,queue,request

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-12-08 15:24:11 +08:00
Kefu Chai
b939ab88f1
Merge pull request #19295 from kungf/scrub_delayed
osd: change op delayed state to 'waiting for scrub'

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-12-08 15:23:30 +08:00
Kefu Chai
572bae9b44
Merge pull request #19345 from ivancich/wip-bring-in-dmclock
osd: pull latest dmclock subtree

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-12-08 15:19:59 +08:00
Kefu Chai
e6973f8b0f
Merge pull request #19027 from tangwenjun3/wip-flush-reduce
os/bluestore: reduce meaningless flush

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-12-08 15:19:01 +08:00
Kefu Chai
1b9ba1a5fd
Merge pull request #19348 from adamemerson/wip-murdering-diagnostics
Add noreturn attribute to silence uninitialized warning

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-12-08 15:17:49 +08:00
Kefu Chai
809a0ce816 debian/control: adjust ceph-{osdomap,kvstore,monstore}-tool feature move
this is a follow-up of #19328. we need to get this change into 12.2.3.
so better off do the switch somewhere after 12.2.2 which has been
tagged, and before 12.2.3, which is not tagged yet.

please note, this is not targetting master, because i want to make
sure the change number (the <num> in << 12.2.2-<num>) is correct. it
does not hurt if it's not, as long as it is ">> 12.2.2", so the replace
machinery in 12.2.3 works, and it covers the releases where the
ceph-{osdomap,kvstore,monstore}-tool are not move yet. but why don't
make it more right?

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit cdf49ba664)
2017-12-08 14:51:08 +08:00
Sage Weil
9271d52851 debian/control: adjust ceph-{osdomap,kvstore,monstore}-tool feature move
The backport didn't make 12.2.2, but it will be in 12.2.3.

Fixes: http://tracker.ceph.com/issues/22319
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit e0c814266f)
2017-12-08 14:51:08 +08:00
Sage Weil
788d88a9ef
Merge pull request #18752 from liewegas/wip-peering-queue
osd: put peering events in main sharded wq

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2017-12-07 19:43:16 -06:00
Mykola Golub
9ca3f46b96 librbd: deep_copy: move set_head to snapshot_copy state machine
Signed-off-by: Mykola Golub <to.my.trociny@gmail.com>
2017-12-08 00:17:16 +02:00
Mykola Golub
644c319181 librbd: deep_copy: don't create snapshots above snap_id_end
Signed-off-by: Mykola Golub <to.my.trociny@gmail.com>
2017-12-08 00:16:58 +02:00
vasukulkarni
8a6434c20e
Merge pull request #19244 from ceph/wip-cd-volume
qa/tasks: update ceph-deploy task to use newer ceph-volume syntax
2017-12-07 10:54:47 -08:00
Kefu Chai
4bc6269f15
Merge pull request #19276 from tchaikov/wip-volume-key
ceph-volume: do not use --key during mkfs

Reviewed-by: Alfredo Deza <adeza@redhat.com>
2017-12-07 23:31:10 +08:00
Rishabh Dave
39cd6f993f doc/man: mention "ls" in the ceph osd's subcommands list
Though "ls" command is explained and it's usage shown in the man page,
it is not mentioned in the subcommands list of "ceph osd" in the
beginning.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2017-12-07 20:04:19 +05:30
Alfredo Deza
09f88ce543
Merge pull request #19381 from ceph/fix_cephvol_doc
ceph-volume/doc: add missing subcommand in examples

Reviewed-by: Alfredo Deza <adeza@redhat.com>
2017-12-07 08:45:52 -05:00
Guillaume Abrioux
a284f164f3 doc: add missing subcommand in examples
Add the missing 'lvm' subcommand in examples in the documentation of
ceph-volume.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-12-07 14:12:48 +01:00