xie xingguo
1b87784f49
crush: reuse find_roots to implement find_nonshadow_roots
...
to reduce code redundance...
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-26 22:34:51 +08:00
xie xingguo
32fb548797
crush: guard set-device-class
...
If a device has already been bounded to a class,
do not allow to change its class silently.
Require user call rm-device-class first.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-26 22:34:08 +08:00
xie xingguo
e4e83a0dd7
crush: fix class_is_in_use()
...
A class can be considered as in-use only if it is referenced by
any of the existing crush rules.
The patch also makes the output more human readable. For example:
./bin/ceph osd crush rule create-replicated myrule default host ssd
./bin/ceph osd crush class rm ssd
Error EBUSY: class 'ssd' still referenced by crush_rule 'myrule'
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-26 22:31:39 +08:00
xie xingguo
f3a3180cca
crush: rebuild shadow tree on "crush create-or-move/move"
...
This patch solves the problem below:
./bin/ceph osd crush move osd.0 root=foo rack=foo-rack host=foo-host
moved item id 0 name 'osd.0' to location {host=foo-host,rack=foo-rack,root=foo} in crush map
./bin/ceph osd crush rule create-replicated foo-rule foo host ssd
Error EINVAL: root foo has no devices with class ssd
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-26 22:30:59 +08:00
xie xingguo
10bf2a633f
crush: fix "crush create-or-move/move" would drop osd's class
...
Was:
./bin/ceph osd tree
ID CLASS WEIGHT TYPE NAME UP/DOWN REWEIGHT PRI-AFF
-1 3.00000 root default
-2 3.00000 host gitbuilder-ceph-rpm-centos7-amd64-basic
0 ssd 1.00000 osd.0 up 1.00000 1.00000
1 ssd 1.00000 osd.1 up 1.00000 1.00000
2 ssd 1.00000 osd.2 up 1.00000 1.00000
./bin/ceph osd crush move osd.0 root=foo rack=foo-rack host=foo-host
moved item id 0 name 'osd.0' to location {host=foo-host,rack=foo-rack,root=foo} in crush map
./bin/ceph osd tree
ID CLASS WEIGHT TYPE NAME UP/DOWN REWEIGHT PRI-AFF
-7 1.00000 root foo
-6 1.00000 rack foo-rack
-5 1.00000 host foo-host
0 1.00000 osd.0 up 1.00000 1.00000
-1 2.00000 root default
-2 2.00000 host gitbuilder-ceph-rpm-centos7-amd64-basic
1 ssd 1.00000 osd.1 up 1.00000 1.00000
2 ssd 1.00000 osd.2 up 1.00000 1.00000
Now:
./bin/ceph osd tree
ID CLASS WEIGHT TYPE NAME UP/DOWN REWEIGHT PRI-AFF
-1 3.00000 root default
-2 3.00000 host gitbuilder-ceph-rpm-centos7-amd64-basic
0 ssd 1.00000 osd.0 up 1.00000 1.00000
1 ssd 1.00000 osd.1 up 1.00000 1.00000
2 ssd 1.00000 osd.2 up 1.00000 1.00000
./bin/ceph osd crush move osd.0 root=foo rack=foo-rack host=foo-host
moved item id 0 name 'osd.0' to location {host=foo-host,rack=foo-rack,root=foo} in crush map
./bin/ceph osd tree
ID CLASS WEIGHT TYPE NAME UP/DOWN REWEIGHT PRI-AFF
-7 1.00000 root foo
-6 1.00000 rack foo-rack
-5 1.00000 host foo-host
0 ssd 1.00000 osd.0 up 1.00000 1.00000
-1 2.00000 root default
-2 2.00000 host gitbuilder-ceph-rpm-centos7-amd64-basic
1 ssd 1.00000 osd.1 up 1.00000 1.00000
2 ssd 1.00000 osd.2 up 1.00000 1.00000
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-26 22:30:26 +08:00
xie xingguo
6af733464a
mon/OSDMonitor: optional show-shadow for "crush tree" command
...
./bin/ceph osd crush tree --show-shadow
ID WEIGHT TYPE NAME
-4 3.00000 root default~ssd
-3 3.00000 host gitbuilder-ceph-rpm-centos7-amd64-basic~ssd
0 1.00000 osd.0
1 1.00000 osd.1
2 1.00000 osd.2
-1 3.00000 root default
-2 3.00000 host gitbuilder-ceph-rpm-centos7-amd64-basic
0 1.00000 osd.0
1 1.00000 osd.1
2 1.00000 osd.2
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-26 22:30:04 +08:00
Sage Weil
742005bd75
Merge pull request #16579 from liewegas/wip-fix-nonregression
...
qa/suites/rados/singleton/all/erasure-code-nonregression: fix typo
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Amik Kumar <amitkuma@redhat.com>
2017-07-26 08:46:43 -05:00
Sage Weil
c1bdd36d8f
qa/workunits/erasure-code/encode-decode-nonregression: do not require git checkout
...
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-26 09:35:46 -04:00
Sage Weil
35f096ed19
Merge pull request #16580 from liewegas/wip-20767
...
pybind/mgr/zabbix: fix health in non-compat mode
Reviewed-by: Wido den Hollander <wido@widodh.nl>
2017-07-26 08:24:00 -05:00
Alfredo Deza
1ef25e9d58
Merge pull request #16573 from liewegas/wip-osd-manual
...
doc/install/manual-deployment: update osd creation steps
Reviewed-by: Alfredo Deza <adeza@redhat.com>
2017-07-26 09:19:17 -04:00
Jason Dillaman
5d6eebcf26
Merge pull request #14868 from wangzhengyong/librbd
...
librbd: add compare and write API
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-07-26 08:00:57 -04:00
Jason Dillaman
d36cb4ec7e
test/librbd: fixed compiler warnings
...
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-07-26 08:00:06 -04:00
Jason Dillaman
5837977006
test/librbd: improved compare_and_write testing
...
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-07-26 08:00:06 -04:00
wangzhengyong
c8698edd54
test/librbd: add compare_and_write test for fsx
...
Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
2017-07-26 08:00:06 -04:00
wangzhengyong
52e3abd8b7
test/librbd: add compare_and_write testcase
...
Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
2017-07-26 08:00:06 -04:00
wangzhengyong
ad10d615e6
test/librbd: add Mock Image cache for compare_and_write
...
Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
2017-07-26 08:00:06 -04:00
wangzhengyong
da6bbe5ce6
test/librbd: handle compare_and_write op in test_mock_Replay
...
Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
2017-07-26 08:00:06 -04:00
wangzhengyong
971ff26ed2
librbd/journal: handle compare_and_write event
...
Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
2017-07-26 08:00:06 -04:00
wangzhengyong
5891b57a6f
test/librbd: handle cmpext request in LibradosTestStub
...
Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
2017-07-26 08:00:06 -04:00
wangzhengyong
e70d48933c
librbd: add compare_and_write/aio_compare_and_write API
...
Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
2017-07-26 08:00:06 -04:00
wangzhengyong
789c05336e
librbd: add compare_and_write perfcounter
...
Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
2017-07-26 08:00:06 -04:00
wangzhengyong
ead121bf9e
librbd: handle compare_and_write imagerequest in ImageRequestWQ
...
Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
2017-07-26 08:00:05 -04:00
wangzhengyong
d201c850de
librbd: add compare_and_write ImageRequest
...
Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
2017-07-26 08:00:05 -04:00
wangzhengyong
cd61316857
librbd: add CompareAndWrite ObjectRequest
...
Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
2017-07-26 08:00:05 -04:00
Sage Weil
fa1b19d9a5
Merge pull request #16595 from wjwithagen/wip-wjw-freebsd-run-standalone
...
qa: make run-standalone work on FreeBSD
Reviewed-by: Sage Weil <sage@redhat.com>
2017-07-26 06:58:37 -05:00
Willem Jan Withagen
ae88edd25d
qa: make run-standalone work on FreeBSD
...
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2017-07-26 12:01:37 +02:00
Kefu Chai
fb9a3e908a
Merge pull request #16543 from dillaman/wip-service-daemon-c-api
...
librados: add missing implementations for C service daemon API methods
Reviewed-by: Sage Weil <sage@redhat.com>
2017-07-26 17:19:33 +08:00
Kefu Chai
483efafb56
Merge pull request #16519 from liewegas/wip-20754
...
osd: populate last_epoch_split during build_initial_pg_history
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2017-07-26 17:17:24 +08:00
Kefu Chai
d85a7889fd
Merge pull request #16446 from xiexingguo/wip-destroyed
...
mon: show destroyed status in tree view; do not auto-out destroyed osds
Reviewed-by: Sage Weil <sage@redhat.com>
2017-07-26 17:15:53 +08:00
xie xingguo
1e867d757e
mon/OSDMonitor: introduce mon_osd_destroyed_out_interval for destroyed out control
...
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-26 15:18:49 +08:00
xie xingguo
c81097cfd9
osd/OSD: abort booting if osd is marked as destroyed
...
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-26 15:13:32 +08:00
xie xingguo
96eb0a9887
mon/OSDMonitor: apply new 'destroyed' status to 'osd tree' filter
...
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-26 15:13:32 +08:00
xie xingguo
3b6bbc416d
osd/OSDMap: show "destroyed" status in tree view
...
It would be a pain if we destroyed an osd and there is no obvious way
to find it out.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-26 15:13:32 +08:00
Kefu Chai
6ce96c7474
Merge pull request #16123 from ddiss/fix-journal-supression
...
ceph-disk: don't activate suppressed journal devices
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-07-26 12:02:14 +08:00
Sage Weil
8fef273702
pybind/mgr/zabbix: fix health in non-compat mode
...
This was apparently written/tested with mon_health_preluminous_compat
enabled. Fix to behave with or without that option.
Fixes: http://tracker.ceph.com/issues/20767
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-25 22:57:12 -04:00
Sage Weil
f0b5900025
Merge pull request #16498 from Songweibin/wip-doc-rbd-trash-cli
...
doc: add rbd new trash cli and cleanups in release-notes.rst
2017-07-25 21:49:26 -05:00
Sage Weil
705676797a
Merge pull request #16552 from tchaikov/wip-doc-fixes
...
doc: document mClock related options
Reviewed-by: Sage Weil <sage@redhat.com>
2017-07-25 21:48:12 -05:00
Sage Weil
454fdb6720
doc/install/manual-deployment: update osd creation steps
...
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-25 22:41:52 -04:00
Sage Weil
a3b4f08d20
Merge pull request #16534 from liewegas/wip-20751
...
mon/OSDMonitor: ensure UP is not set for newly-created OSDs
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-07-25 21:31:47 -05:00
Sage Weil
2ef8614f67
qa/suites/rados/singleton/all/erasure-code-nonregression: fix typo
...
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-25 22:26:43 -04:00
Sage Weil
d2c31a8114
Merge pull request #16469 from xiexingguo/wip-fix-test
...
test: s/osd_objectstore_type/osd_objectstore
2017-07-25 21:04:22 -05:00
songweibin
34efaab49e
doc: add new trash cli in rados-rbd-cmds.rst
...
Signed-off-by: songweibin <song.weibin@zte.com.cn>
2017-07-26 08:47:53 +08:00
songweibin
3860421425
doc: cleanups in release-notes.rst
...
Signed-off-by: songweibin <song.weibin@zte.com.cn>
2017-07-26 08:47:35 +08:00
Josh Durgin
5a1f595bb3
Merge pull request #15693 from dillaman/wip-osd-cmpext-ec-pool
...
osd: support cmpext operation on EC-backed pools
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2017-07-25 13:52:20 -07:00
Sage Weil
b4b51d12ff
Merge pull request #16527 from jcsp/wip-options-followup
...
common: follow up to new options infrastructure
Reviewed-by: Sage Weil <sage@redhat.com>
2017-07-25 15:48:45 -05:00
Yuri Weinstein
65185cf09e
Merge pull request #16511 from c744402859/master
...
OSDMonitor: check mon_max_pool_pg_num when set pool pg_num
Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-25 13:46:25 -07:00
Sage Weil
759da47c0c
Merge pull request #16560 from nrdmn/patch-3
...
pybind/mgr/restful: fix typo
Reviewed-by: Sage Weil <sage@redhat.com>
2017-07-25 15:21:50 -05:00
nrdmn
4f826e10d9
Fixed typo in src/pybind/mgr/restful/api/__init__.py
...
Signed-off-by: Nick Erdmann <n@nirf.de>
Fixed typo
2017-07-25 22:10:06 +02:00
Sage Weil
6ef3a8ed4d
Merge pull request #16536 from jdurgin/wip-20747
...
osd: PrimaryLogPG, PGBackend: complete callback even if interval changes
Reviewed-by: Sage Weil <sage@redhat.com>
2017-07-25 14:05:15 -05:00
Sage Weil
cbe92f1790
Merge pull request #16539 from jdurgin/wip-20753
...
osd/PGLog: fix inaccurate missing assert
Reviewed-by: Sage Weil <sage@redhat.com>
2017-07-25 14:04:17 -05:00