]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
7 years agoMerge pull request #18686 from xiexingguo/wip-bf-retry-interval
Yuri Weinstein [Fri, 3 Nov 2017 19:59:30 +0000 (12:59 -0700)]
Merge pull request #18686 from xiexingguo/wip-bf-retry-interval

osd/PG: use osd_backfill_retry_interval for schedule_backfill_retry()

Reviewed-by: Sage Weil <sage@redhat.com>
7 years agoMerge pull request #17923 from cbodley/wip-rgw-beast-update
Yehuda Sadeh [Fri, 3 Nov 2017 15:57:39 +0000 (08:57 -0700)]
Merge pull request #17923 from cbodley/wip-rgw-beast-update

rgw: pull up beast submodule and update frontend

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
7 years agoMerge pull request #18522 from C2python/cleanup_to_string
Casey Bodley [Fri, 3 Nov 2017 15:01:28 +0000 (11:01 -0400)]
Merge pull request #18522 from C2python/cleanup_to_string

rgw: Delete to_string functions. stringify defined in include/stringify.h can provide the same feature.

Reviewed-by: Adam Emerson <aemerson@redhat.com>
7 years agoMerge pull request #18536 from ZVampirEM77/wip-fix-loadgen
Casey Bodley [Fri, 3 Nov 2017 14:11:27 +0000 (10:11 -0400)]
Merge pull request #18536 from ZVampirEM77/wip-fix-loadgen

rgw: loadgen fix generate random object name rgw crash issue

Reviewed-by: Casey Bodley <cbodley@redhat.com>
7 years agoMerge pull request #18526 from tchaikov/wip-17454
Kefu Chai [Fri, 3 Nov 2017 12:10:37 +0000 (20:10 +0800)]
Merge pull request #18526 from tchaikov/wip-17454

mgr: In plugins 'module' classes need not to be called "Module" anymore.

Reviewed-by: John Spray <john.spray@redhat.com>
7 years agoMerge pull request #18678 from liu-chunmei/fix_dpdk_coremask
Kefu Chai [Fri, 3 Nov 2017 12:05:59 +0000 (20:05 +0800)]
Merge pull request #18678 from liu-chunmei/fix_dpdk_coremask

msg/async: fix ms_dpdk_coremask and ms_dpdk_coremask conflict

Reviewed-by: Haomai Wang <haomai@xsky.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agoMerge pull request #18670 from liewegas/wip-min-in-4
Sage Weil [Fri, 3 Nov 2017 11:55:23 +0000 (06:55 -0500)]
Merge pull request #18670 from liewegas/wip-min-in-4

qa/tasks/thrashosds: set min_in default to 4

Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agoMerge pull request #18671 from ifed01/wip-ifed-bluefs-empty-reclaiming-fix
Sage Weil [Fri, 3 Nov 2017 11:55:00 +0000 (06:55 -0500)]
Merge pull request #18671 from ifed01/wip-ifed-bluefs-empty-reclaiming-fix

os/bluestore: do not release empty bluefs_extents_reclaiming.

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
7 years agoMerge pull request #18653 from dillaman/wip-21391
Mykola Golub [Fri, 3 Nov 2017 09:27:56 +0000 (11:27 +0200)]
Merge pull request #18653 from dillaman/wip-21391

mgr/dashboard: added iSCSI IOPS/throughput metrics

Reviewed-by: Mykola Golub <to.my.trociny@gmail.com>
7 years agoms_dpdk_coremask and ms_async_op_threads has some relationship, 18678/head
chunmei [Thu, 2 Nov 2017 03:37:53 +0000 (20:37 -0700)]
ms_dpdk_coremask and ms_async_op_threads has some relationship,
dpdk library will create threasds as many as bit 1 number in
ms_dpdk_coremask and the thredas num should be equal ms_async_op_threads+1,
by ceph default confiuration,ms_async_op_threads =3,ms_dpdk_coremask =1,
so dpdk library can't create enough threads for dpdk workers. the sytem
will stuck at NetworkStack::start().so set ms_dpdk_coremask default 0xF.
and add assert to comapre the two configurations.

Signed-off-by: chunmei <chunmei.liu@intel.com>
7 years agoMerge pull request #18695 from cooboos/wip-doc-wrongspell
Kefu Chai [Fri, 3 Nov 2017 05:21:07 +0000 (13:21 +0800)]
Merge pull request #18695 from cooboos/wip-doc-wrongspell

doc/release-notes: fix typo 'psd' to 'osd'

Reviewed-By: Kefu Chai <kchai@redhat.com>
7 years agodoc: correct wrong spell 'psd' to 'osd' 18695/head
wangsongbo [Fri, 3 Nov 2017 04:49:11 +0000 (12:49 +0800)]
doc: correct wrong spell 'psd' to 'osd'

Signed-off-by: wangsongbo wangsongbo@cloudin.cn
7 years agorgw: loadgen fix rgw crash issue 18536/head
Enming Zhang [Wed, 25 Oct 2017 13:10:56 +0000 (21:10 +0800)]
rgw: loadgen fix rgw crash issue

When generating random bucket name and object name during
loadgen processing, RGW will crash. The reason is calling
"gen_rand_alphanumeric" with "cct = NULL".

Fixes: http://tracker.ceph.com/issues/22006
Signed-off-by: Enming Zhang <enming.zhang@umcloud.com>
7 years agoMerge pull request #13992 from dreamhost/wip-19264
Yuri Weinstein [Thu, 2 Nov 2017 16:47:31 +0000 (09:47 -0700)]
Merge pull request #13992 from dreamhost/wip-19264

rgw: fix Swift container naming rules.

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
7 years agoMerge pull request #18606 from adamemerson/wip-op-perm-refactor
Yuri Weinstein [Thu, 2 Nov 2017 16:46:20 +0000 (09:46 -0700)]
Merge pull request #18606 from adamemerson/wip-op-perm-refactor

rgw: Small refactor and two bug fixes

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Matt Benjamin <mbenjami@redhat.com>
7 years agoMerge pull request #14955 from aclamk/fix-civetweb-cryptopp
Kefu Chai [Thu, 2 Nov 2017 15:59:03 +0000 (23:59 +0800)]
Merge pull request #14955 from aclamk/fix-civetweb-cryptopp

radosgw: Make compilation with CryptoPP possible.

Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agoMerge pull request #18664 from oritwas/wip-rgw-21996
Orit Wasserman [Thu, 2 Nov 2017 14:31:08 +0000 (16:31 +0200)]
Merge pull request #18664 from oritwas/wip-rgw-21996

rgw: init oldest period after setting run_sync_thread
Reviewed-by: Casey Bodley <cbodley@redhat.com>
7 years agoMerge pull request #18680 from tchaikov/wip-doc-mgr
Kefu Chai [Thu, 2 Nov 2017 12:39:25 +0000 (20:39 +0800)]
Merge pull request #18680 from tchaikov/wip-doc-mgr

doc/mgr: document facilities methods using `automethod` directive

Reviewed-by: John Spray <john.spray@redhat.com>
7 years agoMerge pull request #18685 from jcsp/wip-mgr-load-module
Kefu Chai [Thu, 2 Nov 2017 12:20:52 +0000 (20:20 +0800)]
Merge pull request #18685 from jcsp/wip-mgr-load-module

qa: fix mgr _load_module helper

Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agoosd/PG: use osd_backfill_retry_interval for schedule_backfill_retry() 18686/head
xie xingguo [Thu, 2 Nov 2017 12:17:22 +0000 (20:17 +0800)]
osd/PG: use osd_backfill_retry_interval for schedule_backfill_retry()

These two options currently share the same value and I have no particular
preference, but using osd_backfill_retry_interval for the specific scenario
gives us more flexible choices.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
7 years agoqa: fix mgr _load_module helper 18685/head
John Spray [Thu, 2 Nov 2017 11:42:56 +0000 (07:42 -0400)]
qa: fix mgr _load_module helper

I inadvertently broke this with the latest change
to the module ls output.

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agoMerge pull request #18656 from ceph/ceph-volume-bluestore-tests
Alfredo Deza [Thu, 2 Nov 2017 11:30:39 +0000 (07:30 -0400)]
Merge pull request #18656 from ceph/ceph-volume-bluestore-tests

ceph-volume: adds functional testing for bluestore

7 years agoMerge pull request #18399 from jcsp/wip-20950
John Spray [Thu, 2 Nov 2017 10:37:09 +0000 (10:37 +0000)]
Merge pull request #18399 from jcsp/wip-20950

mon: don't blow away bootstrap-mgr on upgrades

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
Reviewed-by: Sage Weil <sage@redhat.com>
7 years agoMerge pull request #18681 from tchaikov/wip-msg-async-popcnt
Haomai Wang [Thu, 2 Nov 2017 09:54:48 +0000 (04:54 -0500)]
Merge pull request #18681 from tchaikov/wip-msg-async-popcnt

msg/async: use bitset<> to do the popcnt

Reviewed-by: Haomai Wang <haomai@xsky.com>
7 years agoMerge pull request #18652 from idryomov/wip-qa-krbd-blkroset
Ilya Dryomov [Thu, 2 Nov 2017 09:10:39 +0000 (10:10 +0100)]
Merge pull request #18652 from idryomov/wip-qa-krbd-blkroset

qa/suites/krbd: add krbd BLKROSET test

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
7 years agomsg/async: use bitset<> to do the popcnt 18681/head
Kefu Chai [Thu, 2 Nov 2017 07:20:24 +0000 (15:20 +0800)]
msg/async: use bitset<> to do the popcnt

libstdc++ uses popcnt to count the bits. it's faster and simpler.

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agodoc/mgr: document mgr/plugin using automethod 18680/head
Kefu Chai [Thu, 2 Nov 2017 04:19:33 +0000 (12:19 +0800)]
doc/mgr: document mgr/plugin using automethod

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agopybind/mgr: sync the docstring with the doc/mgr
Kefu Chai [Thu, 2 Nov 2017 06:29:46 +0000 (14:29 +0800)]
pybind/mgr: sync the docstring with the doc/mgr

also update the docstring to confirm to
http://www.sphinx-doc.org/en/stable/domains.html#info-field-lists.

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agomgr: In plugins 'module' classes need not to be called "Module" anymore. 18526/head
bhavishyagopesh [Mon, 9 Oct 2017 05:40:41 +0000 (11:10 +0530)]
mgr: In plugins 'module' classes need not to be called "Module" anymore.

Fixes: http://tracker.ceph.com/issues/17454
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: bhavishyagopesh <bhavishyagopesh@gmail.com>
7 years agoMerge pull request #18619 from trociny/wip-qa-mirror-remove
Jason Dillaman [Thu, 2 Nov 2017 01:34:35 +0000 (21:34 -0400)]
Merge pull request #18619 from trociny/wip-qa-mirror-remove

qa/workunits/rbd: unnecessary sleep after failed remove

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
7 years agoMerge pull request #17983 from liewegas/wip-balancer
Sage Weil [Wed, 1 Nov 2017 19:46:07 +0000 (14:46 -0500)]
Merge pull request #17983 from liewegas/wip-balancer

mgr/balancer: make crush-compat mode work

Reviewed-by: John Spray <john.spray@redhat.com>
7 years agorgw: add missing current_history initialization 18664/head
Orit Wasserman [Wed, 1 Nov 2017 15:49:46 +0000 (17:49 +0200)]
rgw: add missing current_history initialization

Fixes: http://tracker.ceph.com/issues/21996
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
7 years agorgw: init oldest period after setting run_sync_thread
Orit Wasserman [Wed, 1 Nov 2017 10:15:35 +0000 (12:15 +0200)]
rgw: init oldest period after setting run_sync_thread

Fixes: http://tracker.ceph.com/issues/21996
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
7 years agoMerge pull request #18657 from cbodley/wip-21990
Matt Benjamin [Wed, 1 Nov 2017 15:47:24 +0000 (11:47 -0400)]
Merge pull request #18657 from cbodley/wip-21990

rgw: remove placement_rule from rgw_link_bucket()

7 years agoMerge pull request #18534 from ZVampirEM77/wip-emlc-contentmd5
Yuri Weinstein [Wed, 1 Nov 2017 15:27:29 +0000 (08:27 -0700)]
Merge pull request #18534 from ZVampirEM77/wip-emlc-contentmd5

rgw: lc support Content-MD5 request header and fix a rgw crash bug

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
Reviewed-by: Adam Emerson <aemerson@redhat.com>
Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
7 years agoMerge pull request #18610 from cbodley/wip-osd-subop-num
Yuri Weinstein [Wed, 1 Nov 2017 15:24:13 +0000 (08:24 -0700)]
Merge pull request #18610 from cbodley/wip-osd-subop-num

osd: add processed_subop_count for cls_cxx_subop_version()

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
7 years agoMerge pull request #18641 from joke-lee/rgw_modify_subuser_access_error
Yuri Weinstein [Wed, 1 Nov 2017 15:22:12 +0000 (08:22 -0700)]
Merge pull request #18641 from joke-lee/rgw_modify_subuser_access_error

rgw: modify s3 type subuser access permissions fail through admin rest api

Reviewed-by: Casey Bodley <cbodley@redhat.com>
7 years agoMerge pull request #18659 from tchaikov/wip-21993
Kefu Chai [Wed, 1 Nov 2017 15:08:55 +0000 (23:08 +0800)]
Merge pull request #18659 from tchaikov/wip-21993

qa: stop testing deprecated "ceph osd create"

Reviewed-by: Sage Weil <sage@redhat.com>
7 years agoMerge pull request #15193 from mynaramana/arraycode
Kefu Chai [Wed, 1 Nov 2017 14:50:24 +0000 (22:50 +0800)]
Merge pull request #15193 from mynaramana/arraycode

osd: introduce sub-chunks to erasure code plugin interface

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agoos/bluestore: do not release empty bluefs_extents_reclaiming. 18671/head
Igor Fedotov [Wed, 1 Nov 2017 14:14:25 +0000 (07:14 -0700)]
os/bluestore: do not release empty bluefs_extents_reclaiming.
This saves us one mutex lock attempt in Stupid Allocator.

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
7 years agoMerge pull request #18637 from yaozongyou/fix-dashboard-bug
John Spray [Wed, 1 Nov 2017 14:07:36 +0000 (15:07 +0100)]
Merge pull request #18637 from yaozongyou/fix-dashboard-bug

osd: make stat_bytes and stat_bytes_used counters PRIO_USEFUL

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: John Spray <john.spray@redhat.com>
7 years agoMerge pull request #18347 from Synesis-LLC/fix-21773
Sage Weil [Wed, 1 Nov 2017 13:39:11 +0000 (08:39 -0500)]
Merge pull request #18347 from Synesis-LLC/fix-21773

mgr: skip first non-zero incremental in PGMap::apply_incremental()

Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agoMerge pull request #18453 from liewegas/wip-osd-devs
Sage Weil [Wed, 1 Nov 2017 13:36:59 +0000 (08:36 -0500)]
Merge pull request #18453 from liewegas/wip-osd-devs

osd: enumerate device names in a simple way

Reviewed-by: John Spray <john.spray@redhat.com>
7 years agoMerge pull request #18509 from tchaikov/wip-osd-cleanups
Sage Weil [Wed, 1 Nov 2017 13:36:37 +0000 (08:36 -0500)]
Merge pull request #18509 from tchaikov/wip-osd-cleanups

osd,mgrclient: pass daemon_status by rvalue ref and other cleanups

Reviewed-by: John Spray <john.spray@redhat.com>
7 years agoqa/tasks/thrashosds: set min_in default to 4 18670/head
Sage Weil [Wed, 1 Nov 2017 13:31:31 +0000 (08:31 -0500)]
qa/tasks/thrashosds: set min_in default to 4

We have EC tests with k=2,m=2, so we need a min of 4.

Fixes: http://tracker.ceph.com/issues/21997
Signed-off-by: Sage Weil <sage@redhat.com>
7 years agorgw: remove placement_rule from cls_user_bucket_entry 18657/head
Casey Bodley [Tue, 31 Oct 2017 20:56:01 +0000 (16:56 -0400)]
rgw: remove placement_rule from cls_user_bucket_entry

placement_rule is no longer needed in cls_user_bucket_entry, because the
only time that it's needed, we can read it from the bucket instance in
RGWRados::update_containers_stats()

Signed-off-by: Casey Bodley <cbodley@redhat.com>
7 years agoMerge pull request #18504 from badone/wip-GroupSnapshotNamespace-group_pool-uninitialised
Jason Dillaman [Wed, 1 Nov 2017 13:08:33 +0000 (09:08 -0400)]
Merge pull request #18504 from badone/wip-GroupSnapshotNamespace-group_pool-uninitialised

cls/rbd: Silence gcc7 maybe-uninitialized warning

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
7 years agorgw: remove placement_rule from rgw_link_bucket()
Casey Bodley [Tue, 31 Oct 2017 20:29:31 +0000 (16:29 -0400)]
rgw: remove placement_rule from rgw_link_bucket()

with the fallback in RGWRados::update_containers_stats(), we no longer
need to pass placement_rule into the cls_user_bucket_entry

this removes the dependency between bucket entrypoint metadata and its
bucket instance metadata during multisite sync

Fixes: http://tracker.ceph.com/issues/21990
Signed-off-by: Casey Bodley <cbodley@redhat.com>
7 years agorgw: take placement_rule from bucket info in update_containers_stats
Casey Bodley [Tue, 31 Oct 2017 20:26:54 +0000 (16:26 -0400)]
rgw: take placement_rule from bucket info in update_containers_stats

in case the cls_user_bucket_entry doesn't contain a placement_rule, take
it from the bucket instance info

Signed-off-by: Casey Bodley <cbodley@redhat.com>
7 years agomgr/balancer: simplify pool_info tracking 17983/head
Sage Weil [Fri, 27 Oct 2017 17:53:52 +0000 (12:53 -0500)]
mgr/balancer: simplify pool_info tracking

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr/balancer: less verbose on 'eval' by default; add 'eval-verbose'
Sage Weil [Thu, 26 Oct 2017 03:47:02 +0000 (22:47 -0500)]
mgr/balancer: less verbose on 'eval' by default; add 'eval-verbose'

The verbose output is helpful for debugging and understanding what is
being measured, but most of the time all that you care about is the score.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr/balancer: fix pg vs object terminology
Sage Weil [Sat, 21 Oct 2017 15:46:27 +0000 (10:46 -0500)]
mgr/balancer: fix pg vs object terminology

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr/balancer: restrict to time of day
Sage Weil [Tue, 24 Oct 2017 22:12:54 +0000 (17:12 -0500)]
mgr/balancer: restrict to time of day

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr/module: adjust osd_weight min step to .005
Sage Weil [Thu, 5 Oct 2017 22:31:06 +0000 (17:31 -0500)]
mgr/module: adjust osd_weight min step to .005

That should be ~1 PG or less on average; no real sense it taking a
step smaller than that!

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr/balancer: if score regresses, take a few more steps
Sage Weil [Thu, 5 Oct 2017 22:26:16 +0000 (17:26 -0500)]
mgr/balancer: if score regresses, take a few more steps

To avoid getting stuck in a local minima, take a few additional
steps if our score drops and see if it gets better.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr/balancer: allow 5% misplaced
Sage Weil [Thu, 5 Oct 2017 22:25:19 +0000 (17:25 -0500)]
mgr/balancer: allow 5% misplaced

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr/balancer: more aggressive steps
Sage Weil [Thu, 5 Oct 2017 22:25:06 +0000 (17:25 -0500)]
mgr/balancer: more aggressive steps

We are smart enough to back off if we misplace too much.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoqa/suites/rados/thrash/d-balancer: enable balancer in various modes
Sage Weil [Sun, 1 Oct 2017 21:00:06 +0000 (16:00 -0500)]
qa/suites/rados/thrash/d-balancer: enable balancer in various modes

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr/balancer: crush-compat: phase out osd_weights
Sage Weil [Wed, 27 Sep 2017 21:05:05 +0000 (17:05 -0400)]
mgr/balancer: crush-compat: phase out osd_weights

Phase out the osd_weight values as we optimize the crush compat
weight set.  Allow a small regression in overall score if it means
we are taking a step to remove the osd_weight value.

Fix the 'osd reweightn' invocation.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr/balancer: crush_compat: cope with 'out' osds
Sage Weil [Wed, 27 Sep 2017 19:12:54 +0000 (15:12 -0400)]
mgr/balancer: crush_compat: cope with 'out' osds

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr/balancer: stop if we get a perfect score
Sage Weil [Wed, 27 Sep 2017 19:12:36 +0000 (15:12 -0400)]
mgr/balancer: stop if we get a perfect score

..and fix the 'worse' threshold (we're just working around floating
point imprecision; 1.01 was too coarse).

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr/balancer: more dead code
Sage Weil [Wed, 27 Sep 2017 15:40:36 +0000 (11:40 -0400)]
mgr/balancer: more dead code

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr/balancer: crush-compat: throttle changes based on max_misplaced
Sage Weil [Wed, 27 Sep 2017 15:27:42 +0000 (11:27 -0400)]
mgr/balancer: crush-compat: throttle changes based on max_misplaced

Take smaller steps if we overshoot max_misplaced.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr/balancer: remove dead code
Sage Weil [Wed, 27 Sep 2017 15:19:30 +0000 (11:19 -0400)]
mgr/balancer: remove dead code

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr/balancer: include pg up mapping in MappingState
Sage Weil [Wed, 27 Sep 2017 15:19:23 +0000 (11:19 -0400)]
mgr/balancer: include pg up mapping in MappingState

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr/balancer: normalize weight-set weights to sum to target weight
Sage Weil [Tue, 26 Sep 2017 22:36:06 +0000 (18:36 -0400)]
mgr/balancer: normalize weight-set weights to sum to target weight

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr/balancer: note root id in Eval
Sage Weil [Tue, 26 Sep 2017 22:35:42 +0000 (18:35 -0400)]
mgr/balancer: note root id in Eval

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr/balancer: make crush-compat mode work!
Sage Weil [Tue, 26 Sep 2017 22:00:08 +0000 (18:00 -0400)]
mgr/balancer: make crush-compat mode work!

- it does multiple iterations, like the upmap optimizer.
- it decreases the step size if it isn't improving, in the hope
that it is overshooting the minimum
- debug output is cleaned up a bit (the info level should be
genuinely useful)

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoMerge pull request #16651 from jcsp/wip-mgr-module-interface
Sage Weil [Wed, 1 Nov 2017 12:27:20 +0000 (07:27 -0500)]
Merge pull request #16651 from jcsp/wip-mgr-module-interface

mgr: python interface rework + enable modules to run in standby mode

Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agomon: include disabled modules in `mgr module ls` 16651/head
John Spray [Wed, 1 Nov 2017 10:35:14 +0000 (06:35 -0400)]
mon: include disabled modules in `mgr module ls`

Otherwise, when someone wants to see what's possible
to do with `mgr module enable` they have to trawl
through the whole mgr map dump.

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agodoc: describe using `mgr module ...` commands
John Spray [Wed, 1 Nov 2017 10:34:36 +0000 (06:34 -0400)]
doc: describe using `mgr module ...` commands

...including the new "mgr services" command.

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agodoc: describe how to implement standby modules
John Spray [Wed, 1 Nov 2017 10:28:30 +0000 (06:28 -0400)]
doc: describe how to implement standby modules

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agoqa: fix mgr caps
John Spray [Mon, 23 Oct 2017 09:37:49 +0000 (05:37 -0400)]
qa: fix mgr caps

This was still using Kraken era settings

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agoqa: expand mgr testing
John Spray [Thu, 19 Oct 2017 11:50:19 +0000 (07:50 -0400)]
qa: expand mgr testing

Some extra coverage of the dashboard, including its standby
redirect mode and the publishing of URIs.

Also invoking the command_spam mode of the selftest module.

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr/selftest: extend test and add background spam mode
John Spray [Tue, 17 Oct 2017 22:39:17 +0000 (18:39 -0400)]
mgr/selftest: extend test and add background spam mode

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr: drop GIL around set_uri, set_health_checks
John Spray [Tue, 17 Oct 2017 22:16:22 +0000 (18:16 -0400)]
mgr: drop GIL around set_uri, set_health_checks

These didn't need to keep the GIL to go and do their
pure C++ parts, and by keeping it they could deadlock
while trying to take ActiveMgrModules::lock.

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr: fix ~MonCommandCompletion
John Spray [Tue, 17 Oct 2017 22:14:43 +0000 (18:14 -0400)]
mgr: fix ~MonCommandCompletion

This was doing a Py_DECREF outside of the Gil.

Fixes: http://tracker.ceph.com/issues/21593
Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr: update for SafeThreadState
John Spray [Mon, 16 Oct 2017 14:51:34 +0000 (10:51 -0400)]
mgr: update for SafeThreadState

A bunch of the previous commits were done
before this class existed, so updating in
one go instead of trying to edit history
in fine detail.

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr: refactor PyOSDMap etc implementation
John Spray [Fri, 13 Oct 2017 15:31:22 +0000 (11:31 -0400)]
mgr: refactor PyOSDMap etc implementation

Implement real python classes from the C side,
rather than exposing only module methods.

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr/PyOSDMap: add CRUSH get_item_weight
Sage Weil [Tue, 26 Sep 2017 22:35:29 +0000 (18:35 -0400)]
mgr/PyOSDMap: add CRUSH get_item_weight

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr: fix py_module_registry shutdown
John Spray [Mon, 16 Oct 2017 10:33:48 +0000 (06:33 -0400)]
mgr: fix py_module_registry shutdown

Was calling way too early, which did a
Py_Finalize before the modules had been
joined.

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr: fix thread naming
John Spray [Thu, 12 Oct 2017 17:14:02 +0000 (13:14 -0400)]
mgr: fix thread naming

Was passing a reference to a local stringstream into
Thread::create, not realising that it was taking a char*
reference instead of a copy.  Result was garbage (or usually,
all threads having the name of the last one created)

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr: cut down duplication between active+standby
John Spray [Fri, 6 Oct 2017 15:02:44 +0000 (11:02 -0400)]
mgr: cut down duplication between active+standby

...by using PyModuleRunner class from ActivePyModule too.

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr: fix os._exit overrides
John Spray [Wed, 4 Oct 2017 17:13:25 +0000 (13:13 -0400)]
mgr: fix os._exit overrides

These would throw an exception when passed
a status code.

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomon/MgrMonitor: reset services map on drop_active
John Spray [Thu, 24 Aug 2017 18:07:37 +0000 (14:07 -0400)]
mon/MgrMonitor: reset services map on drop_active

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr/dashboard: implement standby mode
John Spray [Tue, 22 Aug 2017 18:47:10 +0000 (14:47 -0400)]
mgr/dashboard: implement standby mode

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agopybind/mgr: add MgrStandbyModule
John Spray [Tue, 22 Aug 2017 15:41:26 +0000 (11:41 -0400)]
pybind/mgr: add MgrStandbyModule

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr: standby modules come up and run now
John Spray [Tue, 22 Aug 2017 18:42:11 +0000 (14:42 -0400)]
mgr: standby modules come up and run now

...they still don't have access to any config though.

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr: enable running modules in standby mode
John Spray [Wed, 16 Aug 2017 14:23:59 +0000 (10:23 -0400)]
mgr: enable running modules in standby mode

Modules can implement a second, separate class
that has access to very little state about the
system and can't implement commands.

They have just enough information to redirect
or forward incoming requests/traffic to the
active instance of the module on the active mgr.

This enables module authors to create modules
that end users can access via any (running) mgr node
at any time, rather than having to first work out
which mgr node is active.

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr: clean up python source file naming
John Spray [Tue, 15 Aug 2017 10:53:18 +0000 (06:53 -0400)]
mgr: clean up python source file naming

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr: refactor python module management
John Spray [Mon, 14 Aug 2017 10:31:18 +0000 (06:31 -0400)]
mgr: refactor python module management

Separate out the *loading* of modules from
the *running* of modules.

This is a precursor to enabling modules to run
in standby mode.

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agopybind/mgr: use set_uri hook from dashboard+restful modules
John Spray [Thu, 27 Jul 2017 17:49:27 +0000 (13:49 -0400)]
pybind/mgr: use set_uri hook from dashboard+restful modules

No more guessing the URL!

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr: enable python modules to advertise their service URI
John Spray [Thu, 27 Jul 2017 15:50:23 +0000 (11:50 -0400)]
mgr: enable python modules to advertise their service URI

Fixes: http://tracker.ceph.com/issues/17460
Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomon/MgrMonitor: store services in map and expose with command
John Spray [Thu, 27 Jul 2017 15:49:45 +0000 (11:49 -0400)]
mon/MgrMonitor: store services in map and expose with command

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomessages: `services` in MMgrBeacon
John Spray [Thu, 27 Jul 2017 15:46:40 +0000 (11:46 -0400)]
messages: `services` in MMgrBeacon

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomon/MgrMap: store list of services
John Spray [Thu, 27 Jul 2017 15:45:53 +0000 (11:45 -0400)]
mon/MgrMap: store list of services

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr: carry PyModules ref in MonCommandCompletion
John Spray [Thu, 27 Jul 2017 10:31:01 +0000 (06:31 -0400)]
mgr: carry PyModules ref in MonCommandCompletion

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agopybind: update MgrModule for ceph_state->ceph_module
John Spray [Wed, 26 Jul 2017 16:31:13 +0000 (12:31 -0400)]
pybind: update MgrModule for ceph_state->ceph_module

& tidy up the places where ceph_state was getting
used outside of MgrModule.

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr: refactor python interface
John Spray [Wed, 26 Jul 2017 11:44:00 +0000 (07:44 -0400)]
mgr: refactor python interface

Expose a python class instead of a module,
so that we have a place to carry our reference
to our MgrPyModule* and to PyModules*, rather than
passing a handle for the former and using
a global pointer for the latter.

Signed-off-by: John Spray <john.spray@redhat.com>
7 years agomgr/dashboard: remove blue highlight on scrubbing pg states
John Spray [Thu, 3 Aug 2017 10:22:35 +0000 (06:22 -0400)]
mgr/dashboard: remove blue highlight on scrubbing pg states

This was kind of unnecessary, highlighting a completely normal
and healthy situation in a different colour.  The blue was
also really hard to read against a grey background.

Signed-off-by: John Spray <john.spray@redhat.com>