Commit Graph

76698 Commits

Author SHA1 Message Date
xie xingguo
87952fc68d crush: automatically kill dead classes
If a class is no more referenced by any devices or crush rules,
it shall be considered as dead.

This patch makes Ceph automatically recycles those dead classes,
so user does not to explicitly call 'class rm', which is unsafe
and annoying.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-08-05 18:53:39 +08:00
xie xingguo
b863883ca7 crush: remove 'class rm' command
The current version is broken. E.g., it should only remove a class
which is never referenced by any device.

Since we now create new classes automatically, we shall automatically
recycle dead classes too. So this command is definitely unuseful.
(Actually it is weird that we keep 'class rm' without keeping the
 corresponding 'class create' command).

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-08-05 18:52:30 +08:00
xie xingguo
f1d80ff750 crush: do not automatically recycle class for 'rm-device-class'
This will prevent the current crush rule from referencing a non-existent
shadow tree and hence avoid a coredump such as below:

 0> 2017-08-05 09:54:19.943349 7f73887d6700 -1 /clove/vm/xxg/rpm/ceph/rpmbuild/BUILD/ceph-12.1.2.1/src/crush/CrushWrapper.cc: In function 'int CrushWrapper::get_rule_weight_osd_map(unsigned
 int, std::map<int, float>*)' thread 7f73887d6700 time 2017-08-05 09:54:19.941291
/clove/vm/xxg/rpm/ceph/rpmbuild/BUILD/ceph-12.1.2.1/src/crush/CrushWrapper.cc: 1631: FAILED assert(b)

 ceph version 12.1.2.1-11-gd0f812a (d0f812a3a757b319c26794f558b57770663ab324) luminous (rc)
 1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x110) [0x7f7398b66ea0]
 2: (CrushWrapper::get_rule_weight_osd_map(unsigned int, std::map<int, float, std::less<int>, std::allocator<std::pair<int const, float> > >*)+0x54e) [0x7f7398daac4e]
 3: (PGMap::get_rule_avail(OSDMap const&, int) const+0x68) [0x7f73989a6428]
 4: (PGMap::get_rules_avail(OSDMap const&, std::map<int, long, std::less<int>, std::allocator<std::pair<int const, long> > >*) const+0x35c) [0x7f73989b748c]
 5: (PGMap::encode_digest(OSDMap const&, ceph::buffer::list&, unsigned long) const+0x16) [0x7f73989b7506]
 6: (DaemonServer::send_report()+0x2a4) [0x7f73989f5474]
 7: (DaemonServer::maybe_ready(int)+0x2f9) [0x7f73989f6129]
 8: (DaemonServer::ms_dispatch(Message*)+0xce) [0x7f73989ff68e]
 9: (DispatchQueue::entry()+0x792) [0x7f7398dd2a22]
 10: (DispatchQueue::DispatchThread::entry()+0xd) [0x7f7398c1429d]
 11: (()+0x7df3) [0x7f739640cdf3]
 12: (clone()+0x6d) [0x7f73954f23ed]

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-08-05 18:44:59 +08:00
Jos Collin
f7c4c13775 Merge pull request #16791 from amitkumar50/cov-717285
messages: Initializing member variable in MMDSCacheRejoin

Reviewed-by: Jos Collin <jcollin@redhat.com>
2017-08-05 10:32:13 +00:00
Jos Collin
6c037ea5a8 Merge pull request #16783 from amitkumar50/cov-1414515
msg: Remove unused variable perf_counter in RDMAStack

Reviewed-by: Jos Collin <jcollin@redhat.com>
2017-08-05 09:51:55 +00:00
Jos Collin
a1b1d9bc94 Merge pull request #16810 from amitkumar50/cov-717293
messages: Initialize members in MMDSTableRequest

Reviewed-by: Jos Collin <jcollin@redhat.com>
2017-08-05 08:40:31 +00:00
Patrick Donnelly
04d8ba4b04
Merge PR #16833 into master
* refs/remotes/upstream/pull/16833/head:
	qa: whitelist expected MDS_CLIENT_OLDEST_TID warn
	qa: ignore insufficient standby during failover
	qa: fix read-only whitelist
	mds: MDS_DAMAGED to MDS_DAMAGE
	doc: remove duplicate CephFS health check doc
2017-08-04 20:26:09 -07:00
Patrick Donnelly
64fed4b413
Merge PR #16825 into master
* refs/remotes/upstream/pull/16825/head:
	Changing 'int const' to 'const int'

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-08-04 20:26:07 -07:00
Patrick Donnelly
8b4c41b2b4
Merge PR #16751 into master
* refs/remotes/upstream/pull/16751/head:
	mds: Added NULL check before dereference

Reviewed-by: Jos Collin <jcollin@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-08-04 20:26:05 -07:00
Patrick Donnelly
e8a2d61396
Merge PR #16750 into master
* refs/remotes/upstream/pull/16750/head:
	client: Added NULL check before dereference

Reviewed-by: John Spray <john.spray@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-08-04 20:26:03 -07:00
Patrick Donnelly
caaf11fb0f
Merge PR #16725 into master
* refs/remotes/upstream/pull/16725/head:
	mds: Removing unused variables from StrayManager

Reviewed-by: Jos Collin <jcollin@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-08-04 20:26:01 -07:00
Patrick Donnelly
acd815d297
Merge PR #16671 into master
* refs/remotes/upstream/pull/16671/head:
	Client: Add function "get_default_data_pool_name" for java client

Reviewed-by: Zheng Yan <zyan@redhat.com>
2017-08-04 20:25:59 -07:00
Patrick Donnelly
3ebecb3f65
Merge PR #16570 into master
* refs/remotes/upstream/pull/16570/head:
	mds: clean up obsolete declarations/headers

Reviewed-by: Zheng Yan <zyan@redhat.com>
2017-08-04 20:25:56 -07:00
Patrick Donnelly
29e5f0a450
qa: whitelist expected MDS_CLIENT_OLDEST_TID warn
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-08-04 20:21:43 -07:00
Patrick Donnelly
06f53e4a82
qa: ignore insufficient standby during failover
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-08-04 20:14:59 -07:00
Patrick Donnelly
42cd1c7122
qa: fix read-only whitelist
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-08-04 20:14:48 -07:00
amitkuma
b35719dc25 Changing 'int const' to 'const int'
As per coding Guidelines 'const int' is recommended over 'int const'
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md

NL.26: Use conventional const notation
Example:
const int x = 7;    // OK
int const y = 9;    // bad

Note
We are well aware that you could claim the "bad" examples more logical than the ones marked "OK", but they also confuse more people, especially novices relying on teaching material using the far more common, conventional OK style.
As ever, remember that the aim of these naming and layout rules is consistency and that aesthetics vary immensely.

Enforcement
Flag const used as a suffix for a type.

Signed-off-by: Amit Kumar amitkuma@redhat.com
2017-08-05 03:28:21 +05:30
Patrick Donnelly
b327451d0d
Merge PR #16761 into master
* refs/remotes/upstream/pull/16761/head:
	doc/cephfs: Document ceph auth fs
	mon/AuthMonitor: Add special syntax for cephfs

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-08-04 13:33:51 -07:00
Gregory Farnum
d45fbf136d Merge pull request #16811 from amitkumar50/cov-717296
messages: Initializing uninitialized members MMonGetVersion

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2017-08-04 13:31:06 -07:00
Patrick Donnelly
8d4f3e3045
mds: MDS_DAMAGED to MDS_DAMAGE
We had both and MDS_DAMAGE looks to be the right/intended one.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-08-04 13:01:33 -07:00
Sage Weil
de4ddb63a2 debian: include ceph-volume python
Be careful not to grab ceph_volume_client.py

Signed-off-by: Sage Weil <sage@redhat.com>
2017-08-04 15:47:47 -04:00
Patrick Donnelly
81be13b34c
doc: remove duplicate CephFS health check doc
These are documented in doc/cephfs/health-messages.rst.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-08-04 12:28:38 -07:00
Sage Weil
62e51661e6 Merge branch 'wip-qa-rbd-health' of git://github.com/dillaman/ceph
# Conflicts:
#	qa/tasks/ceph.py
2017-08-04 15:07:22 -04:00
Gregory Farnum
7f341205b8 Merge pull request #16815 from amitkumar50/cov-717299
messages: Initializing uninitialized members MMonProbe

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2017-08-04 12:04:38 -07:00
Gregory Farnum
95e481f9e5 Merge pull request #16817 from amitkumar50/cov-messages-branch
messages: Initializing uninitialized members module messages

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2017-08-04 12:04:16 -07:00
Gregory Farnum
adc3d8361a Merge pull request #16816 from amitkumar50/cov-717300
messages: Initializing uninitialized members MOSDAlive

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2017-08-04 12:01:49 -07:00
Gregory Farnum
435932e772 Merge pull request #16814 from amitkumar50/cov-717298
messages: Initializing uninitialized members MMonPaxos

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2017-08-04 12:00:56 -07:00
Gregory Farnum
a72e75cf69 Merge pull request #16813 from amitkumar50/cov-717297
messages: Initializing uninitialized members MMonGetVersionReply

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2017-08-04 12:00:13 -07:00
Gregory Farnum
62a2e420bf Merge pull request #16803 from dmick/master
common/buffer: off-by-one error in max iov length blocking

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2017-08-04 11:58:41 -07:00
Josh Durgin
a09e29ec2e Merge pull request #16675 from Jeegn-Chen/skip-err-entries
osd/PGLog: skip ERROR entires in _merge_object_divergent_entries

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2017-08-04 11:47:38 -07:00
Josh Durgin
91ad2e6423 Merge pull request #16744 from joscollin/wip-osd-warning
osd: silence warning from -Wint-in-bool-context

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Eric Ivancich <ivancich@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-08-04 11:45:42 -07:00
Sage Weil
ffd171fd46 Merge pull request #16820 from liewegas/wip-more-whitelist
qa/suites/rados: a bit more whitelisting

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2017-08-04 13:44:08 -05:00
J. Eric Ivancich
dec1aeeffd doc: op queue and mclock related options
Additionally makes sure when unexpected values are provided for config
options osd_op_queue or osd_op_queue_cut_off that the default values
are assigned.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
2017-08-04 14:32:37 -04:00
Sage Weil
6a39c5a229 Merge pull request #16614 from neha-ojha/recovery_sleep_hybrid
osd: Check whether journal is rotational or not

Reviewed-by: Sage Weil <sage@redhat.com>
2017-08-04 13:23:38 -05:00
Sage Weil
8b7700782e Merge pull request #16809 from jdurgin/wip-20904
osd/PG: fix lost unfound + delete when there are no missing objects

Reviewed-by: Sage Weil <sage@redhat.com>
2017-08-04 13:20:32 -05:00
Sage Weil
bd119910f5 Merge pull request #16812 from xiexingguo/wip-class-startup
osd/OSD: tolerate any 'set-device-class' error on OSD startup

Reviewed-by: Sage Weil <sage@redhat.com>
2017-08-04 13:13:23 -05:00
Neha Ojha
139cc382ab osd: use recovery sleep hdd for ssd store and hdd journal case
Signed-off-by: Neha Ojha <nojha@redhat.com>
2017-08-04 11:07:19 -07:00
Sage Weil
24c8d7e5d8 Merge pull request #16827 from liewegas/wip-more-more-more
qa/suites/rados/basic/tasks/rados_python: POOL_APP_NOT_ENABLED
2017-08-04 12:39:47 -05:00
Sage Weil
82cf3046de qa/suites/rados/basic/tasks/rados_python: POOL_APP_NOT_ENABLED
Signed-off-by: Sage Weil <sage@redhat.com>
2017-08-04 13:39:13 -04:00
amitkuma
a05bf91bde messages: Initializing uninitialized members module messages
Fixes coverity Issue:

** 2. uninit_member: Non-static class member flags is not initialized in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member epoch is not initialized in this constructor nor in any functions that it calls.
CID 717301 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
6. uninit_member: Non-static class member failed_for is not initialized in this constructor nor in any functions that it calls.

2. uninit_member: Non-static class member oldest_map is not initialized in this constructor nor in any functions that it calls.
CID 717302 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
4. uninit_member: Non-static class member newest_map is not initialized in this constructor nor in any functions that it calls.

2. uninit_member: Non-static class member client_inc is not initialized in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member osdmap_epoch is not initialized in this constructor nor in any functions that it calls.
6. uninit_member: Non-static class member flags is not initialized in this constructor nor in any functions that it calls.
8. uninit_member: Non-static class member retry_attempt is not initialized in this constructor nor in any functions that it calls.
CID 717303 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
10. uninit_member: Non-static class member features is not initialized in this constructor nor in any functions that it calls.

2. uninit_member: Non-static class member flags is not initialized in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member user_version is not initialized in this constructor nor in any functions that it calls.
6. uninit_member: Non-static class member osdmap_epoch is not initialized in this constructor nor in any functions that it calls.
CID 717304 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
8. uninit_member: Non-static class member retry_attempt is not initialized in this constructor nor in any functions that it calls.

2. uninit_member: Non-static class member op is not initialized in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member map_epoch is not initialized in this constructor nor in any functions that it calls.
CID 717305 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
6. uninit_member: Non-static class member query_epoch is not initialized in this constructor nor in any functions that it calls.

CID 717306 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member epoch is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
2017-08-04 22:16:04 +05:30
Jason Dillaman
7350fa65d7 Merge pull request #16724 from amitkumar50/cov-1403249
librbd: Uninitialized variable used handle_refresh()

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-08-04 12:34:29 -04:00
Jason Dillaman
cb9af1d4a8 Merge pull request #16742 from scienceluo/wip-luo-coverity-fix-branch
test/librbd/fsx: Add break in case OP_WRITESAME and OP_COMPARE_AND_WRITE

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-08-04 12:32:34 -04:00
Jason Dillaman
7560c58ed0 Merge pull request #16729 from amitkumar50/cov-1402141
rbd: Drop unused member variable reopen in C_OpenComplete

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-08-04 12:30:44 -04:00
Sage Weil
d09606619f qa/tasks/ceph: wait longer for scrub
Signed-off-by: Sage Weil <sage@redhat.com>
2017-08-04 12:06:27 -04:00
Sage Weil
9c7a653fee Merge pull request #16769 from liewegas/wip-20295-b
os/bluestore: allow multiple DeferredBatches in flight at once

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-08-04 11:04:38 -05:00
Abhishek L
0a5b0021b4 Merge pull request #16787 from liewegas/wip-bluestore-docs
doc/release-notes: fix bluestore links

Reviewed-by: Abhishek Lekshmanan <abhishek@suse.com>
2017-08-04 17:37:47 +02:00
Douglas Fuller
f249e3d2d5 doc/cephfs: Document ceph auth fs
Change the CephFS auth caps documentation to reflect the new ceph auth
fs command.

Signed-off-by: Douglas Fuller <dfuller@redhat.com>
2017-08-04 11:10:07 -04:00
Sage Weil
9d95f1a4df Merge pull request #16632 from ceph/wip-volume
ceph-volume: initial take on ceph-volume CLI tool

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Andrew Schoen <aschoen@redhat.com>
2017-08-04 09:51:27 -05:00
amitkuma
ddb8aacd07 messages: Initializing uninitialized members MOSDAlive
Fixes coverity Issue:

** 717300 Uninitialized scalar field
CID 717300 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member want is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
2017-08-04 20:20:08 +05:30
amitkuma
afb604ba7c messages: Initializing uninitialized members MMonProbe
Fixes coverity Issue:

** 717299 Uninitialized scalar field
2. uninit_member: Non-static class member op is not initialized in this constructor nor in any functions that it calls.
  	4. uninit_member: Non-static class member paxos_first_version is not initialized in this constructor nor in any functions that it calls.
   	6. uninit_member: Non-static class member paxos_last_version is not initialized in this constructor nor in any functions that it calls.
   	8. uninit_member: Non-static class member has_ever_joined is not initialized in this constructor nor in any functions that it calls.

CID 717299 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
10. uninit_member: Non-static class member required_features is not initialized in this constructor nor in any functions that it calls

Signed-off-by: Amit Kumar amitkuma@redhat.com
2017-08-04 20:14:55 +05:30