Commit Graph

69474 Commits

Author SHA1 Message Date
Kefu Chai
2f157ae3ff Merge pull request #11995 from SUSE/wip_timeouts_ceph-create-keys
ceph-create-keys: Add connection timeouts.

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2017-03-02 01:07:22 +08:00
Patrick Donnelly
c22c643540
mds: remove unused method
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-03-01 11:55:12 -05:00
Patrick Donnelly
8f5691e4c5
mds: remove redundant mds object count tracking
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-03-01 11:54:57 -05:00
Loic Dachary
c7311e141d crush: device classes mini cluster sanity check
Run a mini cluster and verify that modifying the crushmap,
sending it to the cluster produces the intended effect.

Refs: http://tracker.ceph.com/issues/18943

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2017-03-01 17:24:09 +01:00
Loic Dachary
154f3d3d27 crush: document the class qualifier
The class qualifier is documented for devices and step take
only. Although it shows in the buckets and could be set by the user, it
would be very error prone to do so.

Refs: http://tracker.ceph.com/issues/18943

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2017-03-01 17:24:09 +01:00
Loic Dachary
f9eb206943 crush: update device classes where relevant
The device classes are implemented by modifying:

- the argument of step TAKE in rules
- cloning bucket trees when required by a rule step

This happens (via populate_classes):

- before compiling a rule step TAKE

When the crush map is encoded, the device class information is stored
with it, independently from the rules and the buckets, as a map of
classes for each device & bucket and a map of classes for each rule step
TAKE.

The extra buckets created but not used by any rule do not need to be
preserved and they are removed (via cleanup_classes):

- before decompilation
- after compilation
- after decoding

The client and daemons that are not aware of the device classes are
compatible because the crushmap modified with the new buckets is fully
functional. The invalid names used in the for the generated
buckets (bucket~class) can be CrushWrapper::decode by any existing
client because there is no verification of the name validity during
decoding. It can also be CrushWrapper::dump or CrushCompiler::decompile
via ceph osd dump or crushtool. It cannot, however, be compiled again
because CrushCompiler::compile will try to set the name with
CrushWrapper::set_item_name and it will fail with EINVAL because of the
~.

Fixes: http://tracker.ceph.com/issues/18943

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2017-03-01 17:24:09 +01:00
Loic Dachary
57e66c6f2d crush: clear bucket class ids when removed
Refs: http://tracker.ceph.com/issues/18943

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2017-03-01 17:24:09 +01:00
Loic Dachary
fb111a813c crush: do not erase non existent name
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2017-03-01 17:24:09 +01:00
Loic Dachary
9cf9d814b3 crush: implement {populate,cleanup}_classes
Refs: http://tracker.ceph.com/issues/18943

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2017-03-01 17:24:09 +01:00
Loic Dachary
ad51404a99 crush: a bucket is also busy if a derived bucket uses it
The step take of a rule may reference a bucket that is cloned
from the original one, with the device class added. In this
case both buckets are busy because they are taken by the rule.

Refs: http://tracker.ceph.com/issues/18943

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2017-03-01 17:24:09 +01:00
Loic Dachary
c68c0c64ce crush: implement trim_roots_with_class
Refs: http://tracker.ceph.com/issues/18943

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2017-03-01 17:24:09 +01:00
Loic Dachary
09e4d4029f crush: implement split_id_class
Refs: http://tracker.ceph.com/issues/18943

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2017-03-01 17:24:08 +01:00
Loic Dachary
b3c50b1429 crush: implement device_class_clone
Refs: http://tracker.ceph.com/issues/18943

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2017-03-01 17:24:08 +01:00
Loic Dachary
fa2736927f crush: get_item_weight must not fail on root
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2017-03-01 17:24:08 +01:00
Loic Dachary
93c0e10033 crush: implement remove_unused_root
Refs: http://tracker.ceph.com/issues/18943

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2017-03-01 17:24:08 +01:00
Loic Dachary
df33e70d42 crush: emacs comment is obsolete
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2017-03-01 17:24:08 +01:00
Loic Dachary
3d5124683b crush: _bucket_is_in_use does not use cct
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2017-03-01 17:24:08 +01:00
Loic Dachary
0ca0b24f9f crush: item_exists is const
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2017-03-01 17:24:08 +01:00
Loic Dachary
09e26cb370 crush: parse "class XXX" after bucket id
Refs: http://tracker.ceph.com/issues/18943

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2017-03-01 17:24:08 +01:00
Loic Dachary
6c9cb09fe1 crush: parse "class XXX" after step take
Refs: http://tracker.ceph.com/issues/18943

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2017-03-01 17:24:08 +01:00
Loic Dachary
eb5a7c3805 crush: parse "class XXX" after device
Refs: http://tracker.ceph.com/issues/18943

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2017-03-01 17:24:08 +01:00
Haomai Wang
f104300156 msg/async: must destruct ConnectedSocket in the his own thread
Signed-off-by: Haomai Wang <haomai@xsky.com>
2017-03-02 00:05:06 +08:00
Haomai Wang
bc580b0a61 msg/async/rdma: refactor RDMAStack to accelerate tx handle
previously Dispatcher thread will poll both rx and tx events, then dispatch
these events to RDMAWorker and RDMAConnectedSocketImpl.

Actually tx event handling is a lightweight task and we make these handling
inline now. rx event dispatching is still working.

Another change is adding tx cq to make event polling separated.

removing lots of codes yet.

Signed-off-by: Haomai Wang <haomai@xsky.com>
2017-03-02 00:04:59 +08:00
Loic Dachary
46e0a2c2fb crush: add --dump to crushtool
So it can display the same as ceph osd crush dump from a file instead of
a live cluster. The default format is json-pretty and can be modified
via -f or --format in the same way as the ceph cli.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2017-03-01 17:04:46 +01:00
Haomai Wang
26d1845d43 msg/async: set thread name for msgr worker
Signed-off-by: Haomai Wang <haomai@xsky.com>
2017-03-02 00:00:19 +08:00
Jason Dillaman
445cac55c0 librbd: eliminate compiler warnings
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-03-01 10:34:58 -05:00
Sage Weil
e6e83659f5 Merge pull request #13343 from liewegas/wip-faster-dispatch
osd: faster dispatch

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2017-03-01 09:21:55 -06:00
Igor Fedotov
5b4e6b6d1c os/bluestore: fix a bug in small write handling on sharded extents
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
2017-03-01 15:01:21 +00:00
Radoslaw Zarzynski
d40a318f63 Merge pull request #13557 from prallabh/healthcheck
rgw: Correct the return codes for the health check feature

Reviewed-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
2017-03-01 13:06:06 +01:00
Kefu Chai
fec59e80ef Merge pull request #13685 from tchaikov/wip-19097
mgr/MgrClient: use unique_ptr for MgrClient::session

Reviewed-by: Sage Weil <sage@redhat.com>
2017-03-01 18:12:14 +08:00
Haomai Wang
3955caca28 Merge pull request #13716 from Adirl/move_counter
msg/async/rdma: move active_queue_pairs perf counter dec to polling

Reviewed-by: Haomai Wang <haomai@xsky.com>
2017-03-01 15:54:17 +08:00
DanielBar-On
b364d24a57 msg/async/rdma: move active_queue_pairs perf counter dec to polling
removing dead qp's is actually done at polling. if polling is busy then
dead qp will not be removed and active_queue_pair counter is not correct.

issue: 992513

Change-Id: I825e813ce0632fd01f6d29adc87e0e33a2bc13d9
Signed-off-by: DanielBar-On <danielbo@mellanox.com>
2017-03-01 09:02:28 +02:00
root
4da2bf310f rgw: Correct the return codes for the health check feature
Fixes: http://tracker.ceph.com/issues/19025
Signed-off-by: Pavan Rallabhandi <PRallabhandi@walmartlabs.com>
2017-03-01 11:49:24 +05:30
wangzhengyong
8a7e8bfa85 os/bluestore: remove unused local variable "pos"
Signed-off-by: wangzhengyong@cmss.chinamobile.com
2017-03-01 11:18:38 +08:00
Kefu Chai
27d4dcdf2d mon/MonClient: do not assert on auth in build_authorizer()
* there is chance that some connections is still trying to authorize
  itself after the MonClient is shut down. do not assert in this case,
  but it is a sign of bug, or bad shutdown sequence, so print a message to
  dout().
* do not use active_con->get_auth() as an alternative to `this->auth` if
  it is not available. because we promote the authorized conn in
  pending_cons as the active_con, and std::swap(active_conn->auth, this->auth)
  with the monc_lock. so there is no point to return active_con->get_auth(),
  as it's always null.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-03-01 10:11:12 +08:00
Drunkard Zhang
da094e7a16 doc: command typo fix
Signed-off-by: Drunkard Zhang <gongfan193@gmail.com>
2017-03-01 09:52:29 +08:00
Drunkard Zhang
7ddf1f2018 doc: remove dead doc from index
Signed-off-by: Drunkard Zhang <gongfan193@gmail.com>
2017-03-01 09:52:10 +08:00
Drunkard Zhang
f763bacab3 doc: hyperlink fix
Signed-off-by: Drunkard Zhang <gongfan193@gmail.com>
2017-03-01 09:51:01 +08:00
Tamil Muthamizhan
3afb889540 qa: add supported distros for ceph-ansible
Add only distros supported by ceph-ansible

Signed-off-by: Tamil Muthamizhan <tmuthami@redhat.com>
2017-02-28 16:28:06 -08:00
Matt Benjamin
2bcd9d7dde Merge pull request #13703 from linuxbox2/wip-is-linked
rgw_file:  use fh_hook::is_linked() to check residence
verified by hand f23
2017-02-28 16:16:16 -05:00
Matt Benjamin
c0aa515f8d rgw_file: use fh_hook::is_linked() to check residence
Previously we assumed that !deleted handles were resident--there
is an observed case where a !deleted handle is !linked.  Since
we currently use safe_link mode, an is_linked() check is
available, and exhaustive.

Fixes: http://tracker.ceph.com/issues/19111

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2017-02-28 15:56:40 -05:00
Sage Weil
7884fbff04 Merge pull request #13671 from liewegas/wip-filestore-omap
os/filestore: debug which omap keys are set

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2017-02-28 14:27:10 -06:00
Matt Benjamin
af7f0483ab Merge pull request #13546 from cbodley/wip-19019
rgw: RGWMetaSyncShardControlCR retries with backoff on all error codes
tested by-had, using fault injection
2017-02-28 15:06:15 -05:00
Sage Weil
3212ba75cf Merge pull request #13415 from ifed01/wip-fix-storetest
test/store_test: add deferred test case setup to support explicit min…

Reviewed-by: Varada Kari <varada.kari@sandisk.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2017-02-28 13:19:20 -06:00
Sage Weil
9fcef127df Merge pull request #13476 from songbaisen/s18
osd: small clear up and optimize on _recover_now and should_share_map function

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-02-28 13:18:08 -06:00
Sage Weil
0565b11c19 common/TrackedOp: make TrackedOp::reset_desc() safe
It is possible for a reset_desc() call to clear the desc char* while
get_desc() is executing such that it will return a nullptr to the caller.
This can lead to bad results, like a crash in std::string() (which does
not like to take null).

Fix this by not clearing desc.  Instead, set a separate flag to indicate
that desc should be (safely) rebuilt on the next get_desc() call.

Fixes: http://tracker.ceph.com/issues/19110
Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-28 12:23:53 -06:00
Jason Dillaman
0ca0a0a8fe Merge pull request #13686 from wjwithagen/wip-wjw-fsx-linux-2
test: Need to exclude the fsx executable also on FreeBSD

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-02-28 12:25:52 -05:00
Jason Dillaman
b4861a5cfe rbd-mirror: eliminate context switch from close image state machine
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-02-28 11:26:35 -05:00
Jason Dillaman
5fb1277eec librbd: eliminate context switch from remove state machine
Also cleaned up formatting issues within the state machine.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-02-28 11:06:28 -05:00
Kefu Chai
1f0824b72d Merge pull request #13523 from wjwithagen/wip-wjw-clang-mempool
include/mempool.h: fix Clangs complaint about types

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-03-01 00:02:29 +08:00