]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
6 years agoMerge pull request #25178 from joke-lee/wip-fix-rgw-multisite-info-get-set-caps-check
Casey Bodley [Fri, 30 Nov 2018 16:41:35 +0000 (11:41 -0500)]
Merge pull request #25178 from joke-lee/wip-fix-rgw-multisite-info-get-set-caps-check

rgw: get or set realm zonegroup zone need check user's caps

Reviewed-by: Casey Bodley <cbodley@redhat.com>
6 years agoMerge pull request #25240 from cbodley/wip-rgw-list-buckets-cleanup 25338/head
Casey Bodley [Thu, 29 Nov 2018 21:19:02 +0000 (16:19 -0500)]
Merge pull request #25240 from cbodley/wip-rgw-list-buckets-cleanup

rgw: remove duplicated RGWRados::list_buckets_ helpers

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
6 years agoMerge PR #25196 into master
Sage Weil [Thu, 29 Nov 2018 20:25:44 +0000 (14:25 -0600)]
Merge PR #25196 into master

* refs/pull/25196/head:
mon: auto clean up stale upmap items
osd/OSDMap: add pg-existence sanity check

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoMerge PR #25303 into master
Sage Weil [Thu, 29 Nov 2018 20:25:19 +0000 (14:25 -0600)]
Merge PR #25303 into master

* refs/pull/25303/head:
mgr/DaemonState: fix get_config_defaults locking

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agorgw: removed unused RGWRados::list_buckets_* 25240/head
Casey Bodley [Fri, 23 Nov 2018 16:50:36 +0000 (11:50 -0500)]
rgw: removed unused RGWRados::list_buckets_*

Signed-off-by: Casey Bodley <cbodley@redhat.com>
6 years agoradosgw-admin: use metadata mgr to list buckets
Casey Bodley [Fri, 23 Nov 2018 16:48:13 +0000 (11:48 -0500)]
radosgw-admin: use metadata mgr to list buckets

Signed-off-by: Casey Bodley <cbodley@redhat.com>
6 years agoMerge pull request #25331 from jtlayton/wip-volumes
jtlayton [Thu, 29 Nov 2018 19:30:39 +0000 (14:30 -0500)]
Merge pull request #25331 from jtlayton/wip-volumes

volumes mgr module fixes

6 years agoMerge pull request #25161 from wjwithagen/wjw-fix-stringlist
Casey Bodley [Thu, 29 Nov 2018 19:25:10 +0000 (14:25 -0500)]
Merge pull request #25161 from wjwithagen/wjw-fix-stringlist

rgw: need to give a type in list constructor

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Abhishek Lekshmanan <abhishek@suse.com>
6 years agoMerge pull request #25145 from adamemerson/wip-23817
Casey Bodley [Thu, 29 Nov 2018 19:24:25 +0000 (14:24 -0500)]
Merge pull request #25145 from adamemerson/wip-23817

Don't treat colons specially when matching resource field of ARNs in S3 Policy

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Pritha Srivastava <prsrivas@redhat.com>
6 years agoMerge pull request #25123 from yehudasa/wip-37281
Casey Bodley [Thu, 29 Nov 2018 19:21:56 +0000 (14:21 -0500)]
Merge pull request #25123 from yehudasa/wip-37281

rgw: change the way sysobj filters raw attributes, fix bucket sync state xattrs

Reviewed-by: Casey Bodley <cbodley@redhat.com>
6 years agoMerge pull request #25078 from mkoderer/rgw-ux
Casey Bodley [Thu, 29 Nov 2018 19:20:58 +0000 (14:20 -0500)]
Merge pull request #25078 from mkoderer/rgw-ux

[rgw]: Fix help of radosgw-admin user info in case no uid

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Lenz Grimmer <lgrimmer@suse.com>
Reviewed-by: Abhishek Lekshmanan <abhishek@suse.com>
6 years agoMerge pull request #25068 from cbodley/wip-rgw-rados-yield
Casey Bodley [Thu, 29 Nov 2018 19:18:54 +0000 (14:18 -0500)]
Merge pull request #25068 from cbodley/wip-rgw-rados-yield

rgw: RADOS::Obj::operate takes optional_yield

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
6 years agoMerge pull request #25310 from cbodley/wip-37448
Casey Bodley [Thu, 29 Nov 2018 19:18:12 +0000 (14:18 -0500)]
Merge pull request #25310 from cbodley/wip-37448

rgw: data sync accepts ERR_PRECONDITION_FAILED on remove_object()

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
6 years agoMerge pull request #25081 from cbodley/wip-37091
Casey Bodley [Thu, 29 Nov 2018 19:17:32 +0000 (14:17 -0500)]
Merge pull request #25081 from cbodley/wip-37091

rgw: catch exceptions from librados::NObjectIterator

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
6 years agoMerge pull request #25329 from jtlayton/wip-orchestrator
jtlayton [Thu, 29 Nov 2018 17:52:53 +0000 (12:52 -0500)]
Merge pull request #25329 from jtlayton/wip-orchestrator

orchestrator_cli: fix HandleCommandResult invocations in _status()

6 years agoMerge pull request #25314 from tchaikov/wip-37432
Kefu Chai [Thu, 29 Nov 2018 17:49:40 +0000 (01:49 +0800)]
Merge pull request #25314 from tchaikov/wip-37432

qa/suites/rados/upgrade: set require-osd-release to nautilus

Reviewed-by: Mykola Golub <mgolub@suse.com>
6 years agomgr/volumes: fix "perm" field on ceph fs volume commands 25331/head
Jeff Layton [Thu, 29 Nov 2018 17:13:16 +0000 (12:13 -0500)]
mgr/volumes: fix "perm" field on ceph fs volume commands

They're all currently set as "r" but most of them should be "rw".

Signed-off-by: Jeff Layton <jlayton@redhat.com>
6 years agomgr/volumes: fix description text for ceph fs volume create
Jeff Layton [Thu, 29 Nov 2018 16:59:30 +0000 (11:59 -0500)]
mgr/volumes: fix description text for ceph fs volume create

Signed-off-by: Jeff Layton <jlayton@redhat.com>
6 years agomgr/volumes: call correct method to wait for the orchestrator
Jeff Layton [Thu, 29 Nov 2018 16:58:34 +0000 (11:58 -0500)]
mgr/volumes: call correct method to wait for the orchestrator

We need to use _orchestrator_wait here.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
6 years agoorchestrator_cli: fix HandleCommandResult invocations in _status() 25329/head
Jeff Layton [Thu, 29 Nov 2018 15:49:11 +0000 (10:49 -0500)]
orchestrator_cli: fix HandleCommandResult invocations in _status()

These strings were being passed in as positional parameters, but we
need to pass them in as odata=.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
6 years agoMerge pull request #25128 from dragonylffly/rb
Kefu Chai [Thu, 29 Nov 2018 15:41:22 +0000 (23:41 +0800)]
Merge pull request #25128 from dragonylffly/rb

tools/rados: allow reuse object for write test

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #25317 from tchaikov/wip-37444
Kefu Chai [Thu, 29 Nov 2018 15:38:12 +0000 (23:38 +0800)]
Merge pull request #25317 from tchaikov/wip-37444

mgr: don't write to output if EOPNOTSUPP

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoMerge pull request #25318 from javacruft/collections.abc
Kefu Chai [Thu, 29 Nov 2018 15:36:44 +0000 (23:36 +0800)]
Merge pull request #25318 from javacruft/collections.abc

qa,pybind,tools: Correct usage of collections.abc

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #24822 from Rjerk/wip-fix-devicehealth-typo-error
Kefu Chai [Thu, 29 Nov 2018 15:34:05 +0000 (23:34 +0800)]
Merge pull request #24822 from Rjerk/wip-fix-devicehealth-typo-error

mgr/devicehealth: fix is_valid_daemon_name typo error

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #25323 from sebastian-philipp/orchestrator-utf8
Sebastian Wagner [Thu, 29 Nov 2018 14:11:31 +0000 (15:11 +0100)]
Merge pull request #25323 from sebastian-philipp/orchestrator-utf8

mgr/orchestrator: remove unicode whitespaces

Reviewed-by: Jeff Layton <jlayton@redhat.com>
6 years agomgr/orchestrator: remove unicode whitespaces 25323/head
Sebastian Wagner [Thu, 29 Nov 2018 12:50:58 +0000 (13:50 +0100)]
mgr/orchestrator: remove unicode whitespaces

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
6 years agoMerge pull request #25311 from wjwithagen/wjw-fix-cores-EXPECT_DEATH
Kefu Chai [Thu, 29 Nov 2018 11:26:45 +0000 (19:26 +0800)]
Merge pull request #25311 from wjwithagen/wjw-fix-cores-EXPECT_DEATH

test: suppress core dumping in there tests as well

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoCorrect usage of collections.abc 25318/head
James Page [Thu, 29 Nov 2018 09:47:07 +0000 (09:47 +0000)]
Correct usage of collections.abc

Some classes should still be imported directly from collections;
only OrderedDict, Iterable and Callable (in the context of the
ceph codebase) are found in collections.abc.

The current code works due to the fallback support for Python 2.

Signed-off-by: James Page <james.page@ubuntu.com>
6 years agotest: suppress core dumping in there tests as well 25311/head
Willem Jan Withagen [Wed, 28 Nov 2018 21:17:53 +0000 (22:17 +0100)]
test: suppress core dumping in there tests as well

On FreeBSD coredumps are enabled by default.
And thus tests in teardown() in ceph-helpers.sh can fail because of
unwaranted cores.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
6 years agotools/rados: allow reuse object for write test 25128/head
Li Wang [Thu, 29 Nov 2018 09:12:10 +0000 (09:12 +0000)]
tools/rados: allow reuse object for write test

Currently, for rados bench write test, it always
creates new objects for testing. Create operation
refers to non-neglectable metadata overhead, especially
for small write performance. This patch allows to
reuse objects for write testing

Signed-off-by: Li Wang <laurence.liwang@gmail.com>
6 years agoMerge pull request #20952 from shangfufei/wip-async-external-event
Kefu Chai [Thu, 29 Nov 2018 09:12:15 +0000 (17:12 +0800)]
Merge pull request #20952 from shangfufei/wip-async-external-event

msg/async: Skip the duplicated processing of the same link

Reviewed-by: Haomai Wang <haomai@xsky.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #25302 from wjwithagen/wjw-wip-build-kv_store_2
Kefu Chai [Thu, 29 Nov 2018 09:11:15 +0000 (17:11 +0800)]
Merge pull request #25302 from wjwithagen/wjw-wip-build-kv_store_2

include: define errnos if not defined for better portablity

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #25264 from tchaikov/wip-mds-mem-frag
Kefu Chai [Thu, 29 Nov 2018 09:10:25 +0000 (17:10 +0800)]
Merge pull request #25264 from tchaikov/wip-mds-mem-frag

denc: fix internal fragmentation when decoding ptr in bl

Reviewed-by: Casey Bodley <cbodley@redhat.com>
6 years agoMerge pull request #24878 from trociny/wip-36656
Kefu Chai [Thu, 29 Nov 2018 09:09:25 +0000 (17:09 +0800)]
Merge pull request #24878 from trociny/wip-36656

mgr: race between daemon state and service map in 'service status'

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #24733 from tchaikov/wip-19348
Kefu Chai [Thu, 29 Nov 2018 09:05:41 +0000 (17:05 +0800)]
Merge pull request #24733 from tchaikov/wip-19348

pybind: simplify timeout handling in run_in_thread()

Reviewed-by: Rishabh Dave <ridave@redhat.com>
6 years agomgr: don't write to output if EOPNOTSUPP 25317/head
Kefu Chai [Thu, 29 Nov 2018 07:44:55 +0000 (15:44 +0800)]
mgr: don't write to output if EOPNOTSUPP

if process_pg_map_command() fails to fulfill the request, we should keep
the odata intact. and let the module take care of it.

before this change, we always write to odata even if
process_pg_map_command() returns -EOPNOTSUPP, this leaves unnecessary
leftover in the output, like pg_info,pg_ready.

after this change, we won't touch odata if process_pg_map_command()
returns -EOPNOTSUPP. and odata will be filled with whatever the python
module returns.

Fixes: http://tracker.ceph.com/issues/37444
Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agomsg/async: Skip the duplicated processing of the same link. 20952/head
shangfufei [Tue, 13 Nov 2018 03:10:28 +0000 (11:10 +0800)]
msg/async: Skip the duplicated processing of the same link.

Update Event.cc

Signed-off-by: shangfufei <shangfufei@inspur.com>
6 years agoqa/suites/rados/upgrade: set require-osd-release to nautilus 25314/head
Kefu Chai [Thu, 29 Nov 2018 06:35:01 +0000 (14:35 +0800)]
qa/suites/rados/upgrade: set require-osd-release to nautilus

* add qa/releases/nautilus.yaml so it can be reused.
* use releases/nautilus.yaml in luminous-x upgrade test, so
  test_librbd_python.sh is able to use the feature introduced in
  nautilus.

Fixes: http://tracker.ceph.com/issues/37432
Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge PR #24580 into master
Patrick Donnelly [Thu, 29 Nov 2018 03:54:13 +0000 (19:54 -0800)]
Merge PR #24580 into master

* refs/pull/24580/head:
mds: bump mds protocol version
mds: handle fragment notify race

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
6 years agoqa/rgw: add credentials to zone 'remove' in test_zonegroup_remove() 25178/head
Casey Bodley [Wed, 28 Nov 2018 18:18:05 +0000 (13:18 -0500)]
qa/rgw: add credentials to zone 'remove' in test_zonegroup_remove()

zone credentials are required to 'period update --commit' from
--rgw-zone remove

Signed-off-by: Casey Bodley <cbodley@redhat.com>
Conflicts:
src/test/rgw/rgw_multi/tests.py

6 years agorgw: get or set realm zonegroup zone need check user's caps
yuliyang [Tue, 20 Nov 2018 09:19:38 +0000 (17:19 +0800)]
rgw: get or set realm zonegroup zone need check user's caps

fix: https://tracker.ceph.com/issues/37352

Signed-off-by: yuliyang <yuliyang@cmss.chinamobile.com>
6 years agorgw: data sync accepts ERR_PRECONDITION_FAILED on remove_object() 25310/head
Casey Bodley [Wed, 28 Nov 2018 18:45:54 +0000 (13:45 -0500)]
rgw: data sync accepts ERR_PRECONDITION_FAILED on remove_object()

sync of deletes uses an If-UnModified-Since precondition, but does not
handle the corresponding ERR_PRECONDITION_FAILED error. treating this as
a failure means that we'll keep retrying the delete which will never
succeed. break this loop by treating ERR_PRECONDITION_FAILED as a
success

Fixes: http://tracker.ceph.com/issues/37448
Signed-off-by: Casey Bodley <cbodley@redhat.com>
6 years agoMerge PR #25272 into master
Sage Weil [Wed, 28 Nov 2018 17:34:57 +0000 (11:34 -0600)]
Merge PR #25272 into master

* refs/pull/25272/head:
qa: add simple test-volumes.sh workunit and run it from fs/basic_functional
vstart.sh: create default fs via 'fs volume create'
mgr/volumes: fix oremote
mon/MgrMonitor: enable volumes module by default
mgr: create `volumes` module
mgr: cleaner constructor for CommandResult
mgr: block for latest osdmap after command execution
mgr: add MgrModule.mon_command helper
ceph_volume_client: enable using existing rados inst
mon: give ceph-mgr access to 'fs' commands

Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Jan Fajerski <jfajerski@suse.com>
6 years agoMerge pull request #25160 from theanalyst/rgw-empty-zg-fix
Casey Bodley [Wed, 28 Nov 2018 15:24:13 +0000 (10:24 -0500)]
Merge pull request #25160 from theanalyst/rgw-empty-zg-fix

rgw: handle cases around zone deletion

Reviewed-by: Casey Bodley <cbodley@redhat.com>
6 years agoMerge pull request #24662 from theanalyst/reshard-stale-cleanup
Matt Benjamin [Wed, 28 Nov 2018 15:22:46 +0000 (10:22 -0500)]
Merge pull request #24662 from theanalyst/reshard-stale-cleanup

rgw: reshard stale instance cleanup

6 years agoqa: add simple test-volumes.sh workunit and run it from fs/basic_functional 25272/head
Sage Weil [Wed, 28 Nov 2018 14:50:00 +0000 (08:50 -0600)]
qa: add simple test-volumes.sh workunit and run it from fs/basic_functional

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agobuild: FreeBSD allow kv_store tools to be build 25302/head
Willem Jan Withagen [Wed, 28 Nov 2018 13:00:57 +0000 (14:00 +0100)]
build: FreeBSD allow kv_store tools to be build

This requires defining
`EUCLEAN`
`EKEYREJECTED`
which are defined in Linux asm-generic/error.h

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
6 years agomgr/DaemonState: fix get_config_defaults locking 25303/head
Mykola Golub [Wed, 28 Nov 2018 13:00:55 +0000 (15:00 +0200)]
mgr/DaemonState: fix get_config_defaults locking

A fixup for 1c2bc53df73d9891330cf0b18f5193167d64df61.

Fixes: http://tracker.ceph.com/issues/36590
Signed-off-by: Mykola Golub <mgolub@suse.com>
6 years agoMerge pull request #25290 from noahdesu/dashboard-tox-workdir
Lenz Grimmer [Wed, 28 Nov 2018 11:17:39 +0000 (12:17 +0100)]
Merge pull request #25290 from noahdesu/dashboard-tox-workdir

mgr/dashboard: use dedicated tox working dir

Reviewed-by: Ricardo Dias <rdias@suse.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
6 years agoMerge pull request #25179 from tspmelo/wip-check-i18n
Lenz Grimmer [Wed, 28 Nov 2018 10:19:06 +0000 (11:19 +0100)]
Merge pull request #25179 from tspmelo/wip-check-i18n

mgr/dashboard: Add i18n validation script

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Patrick Nawracay <pnawracay@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
6 years agoMerge pull request #24900 from zmc/wip-minimal-health
Lenz Grimmer [Wed, 28 Nov 2018 09:56:40 +0000 (10:56 +0100)]
Merge pull request #24900 from zmc/wip-minimal-health

mgr/dashboard: Replace dashboard service

Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
6 years agomon: auto clean up stale upmap items 25196/head
xie xingguo [Wed, 21 Nov 2018 06:25:45 +0000 (14:25 +0800)]
mon: auto clean up stale upmap items

See https://www.spinics.net/lists/ceph-users/msg49518.html

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
6 years agoMerge pull request #25280 from tchaikov/wip-ceph-py3
Kefu Chai [Wed, 28 Nov 2018 05:14:19 +0000 (13:14 +0800)]
Merge pull request #25280 from tchaikov/wip-ceph-py3

ceph.in: write bytes to stdout in raw_write()

Reviewed-by: Alfredo Deza <adeza@redhat.com>
6 years agoMerge pull request #25261 from sebastian-philipp/mgr-handle-command-result
Kefu Chai [Wed, 28 Nov 2018 05:12:05 +0000 (13:12 +0800)]
Merge pull request #25261 from sebastian-philipp/mgr-handle-command-result

mgr: Add `HandleCommandResult` namedtuple

6 years agoMerge pull request #25255 from tchaikov/wip-ceph-dencoder-without-cephfs
Kefu Chai [Wed, 28 Nov 2018 05:10:05 +0000 (13:10 +0800)]
Merge pull request #25255 from tchaikov/wip-ceph-dencoder-without-cephfs

tools/ceph-dencoder: conditionally link against mds

6 years agoMerge pull request #25244 from trociny/wip-crash-procname
Kefu Chai [Wed, 28 Nov 2018 05:08:53 +0000 (13:08 +0800)]
Merge pull request #25244 from trociny/wip-crash-procname

mgr/crash: add process name to crash metadata

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #24990 from dragonylffly/wip-fix-bench
Kefu Chai [Wed, 28 Nov 2018 05:07:59 +0000 (13:07 +0800)]
Merge pull request #24990 from dragonylffly/wip-fix-bench

tools/rados: always call rados.shutdown() before exit()

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #24939 from marcosps/simplify_examples
Kefu Chai [Wed, 28 Nov 2018 05:04:07 +0000 (13:04 +0800)]
Merge pull request #24939 from marcosps/simplify_examples

examples/librados: Remove not needed else clauses

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge PR #24502 into master
Sage Weil [Wed, 28 Nov 2018 03:32:04 +0000 (21:32 -0600)]
Merge PR #24502 into master

* refs/pull/24502/head:
crushtool: implement --rebuild-class-roots command
crushtool: make --reweight re-sum choose_args weight-sets too
crushtool: --reweight should only reweight nonshadow roots
crush/CrushWrapper: reclassify: use default parent for created buckets
crush/CrushWrapper: reclassify: handle to-be-created buckets that we need twice
test/cli/crushtool/reclassify: add second gabe test case
crushtool: add --set-subtree-class; do not set class via --reclassify-root
test/cli/crushtool/reclassify: add reclassify test cases
doc/rados/operations/crush*: document reclassify
doc/rados/operations/crush: remove instructions for separate crush trees for ssd
crushtool: add --compare command
crushtool: implement --reclassify
crush/CrushCompiler: fix id scan to include class ids

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
6 years agocrushtool: implement --rebuild-class-roots command 24502/head
Sage Weil [Fri, 26 Oct 2018 17:40:32 +0000 (12:40 -0500)]
crushtool: implement --rebuild-class-roots command

This simply rebuilds the class roots.  Normally this should create no
change in the map since whatever was making changes to the map before
should have rebuild the shadow roots at that point.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agocrushtool: make --reweight re-sum choose_args weight-sets too
Sage Weil [Fri, 26 Oct 2018 14:32:27 +0000 (09:32 -0500)]
crushtool: make --reweight re-sum choose_args weight-sets too

This ensures that the weights add us for each weight-set (and each
position).  Note that since we don't have anything that actually
creates positional weight-sets, the behavior here might not be what we
want in the end, but for the compat weight-sets (no position), we *do*
keep the weights as a properly summing tree.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agocrushtool: --reweight should only reweight nonshadow roots
Sage Weil [Thu, 25 Oct 2018 20:16:34 +0000 (15:16 -0500)]
crushtool: --reweight should only reweight nonshadow roots

The shadow roots will be then be rebuilt accordingly.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agocrush/CrushWrapper: reclassify: use default parent for created buckets
Sage Weil [Tue, 23 Oct 2018 19:16:17 +0000 (14:16 -0500)]
crush/CrushWrapper: reclassify: use default parent for created buckets

Note that these last 2 fixes also fix the 'h' test case.  \o/

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agocrush/CrushWrapper: reclassify: handle to-be-created buckets that we need twice
Sage Weil [Tue, 23 Oct 2018 19:15:25 +0000 (14:15 -0500)]
crush/CrushWrapper: reclassify: handle to-be-created buckets that we need twice

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agotest/cli/crushtool/reclassify: add second gabe test case
Sage Weil [Tue, 16 Oct 2018 13:45:35 +0000 (08:45 -0500)]
test/cli/crushtool/reclassify: add second gabe test case

New adjusted test map from Dan.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agocrushtool: add --set-subtree-class; do not set class via --reclassify-root
Sage Weil [Sun, 14 Oct 2018 19:57:59 +0000 (14:57 -0500)]
crushtool: add --set-subtree-class; do not set class via --reclassify-root

Sometimes we don't want the --reclassify-root to set the class of every
device because a small number of them are (correctly) a different class.
Allow both behaviors by adding a new, separate command to set the class
of all devices beneath a point in the hierarchy and do not implicitly do
that relabeling as part of --reclassify-root.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agotest/cli/crushtool/reclassify: add reclassify test cases
Sage Weil [Tue, 9 Oct 2018 17:54:34 +0000 (12:54 -0500)]
test/cli/crushtool/reclassify: add reclassify test cases

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agodoc/rados/operations/crush*: document reclassify
Sage Weil [Mon, 8 Oct 2018 21:51:11 +0000 (16:51 -0500)]
doc/rados/operations/crush*: document reclassify

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomgr/dashboard: Replace dashboard service 24900/head
Zack Cerza [Mon, 29 Oct 2018 22:07:27 +0000 (16:07 -0600)]
mgr/dashboard: Replace dashboard service

This splits out the collection of health and log data from the
/api/dashboard/health controller into /api/health/{full,minimal} and
/api/logs/all.

/health/full contains all the data (minus logs) that /dashboard/health
did, whereas /health/minimal contains only what is needed for the health
component to function. /logs/all contains exactly what the logs portion
of /dashboard/health did.

By using /health/minimal, on a vstart cluster we pull ~1.4KB of data
every 5s, where we used to pull ~6KB; those numbers would get larger
with larger clusters. Once we split out log data, that will drop to
~0.4KB.

Fixes: http://tracker.ceph.com/issues/36675
Signed-off-by: Zack Cerza <zack@redhat.com>
6 years agoMerge PR #24923 into master
Patrick Donnelly [Tue, 27 Nov 2018 22:47:03 +0000 (14:47 -0800)]
Merge PR #24923 into master

* refs/pull/24923/head:
mds: properly update freeze_tree_state when fragmenting dirfrags

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
6 years agomgr/dashboard: use dedicated tox working dir 25290/head
Noah Watkins [Tue, 27 Nov 2018 20:46:53 +0000 (12:46 -0800)]
mgr/dashboard: use dedicated tox working dir

Avoids conflicting with other test environments.

Fixes: https://tracker.ceph.com/issues/37405
Signed-off-by: Noah Watkins <nwatkins@redhat.com>
6 years agoMerge PR #24849 into master
Patrick Donnelly [Tue, 27 Nov 2018 22:23:20 +0000 (14:23 -0800)]
Merge PR #24849 into master

* refs/pull/24849/head:
client: remove redundant abort logic during dentry invalidation test

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Zheng Yan <zyan@redhat.com>
6 years agoMerge PR #24886 into master
Patrick Donnelly [Tue, 27 Nov 2018 21:58:26 +0000 (13:58 -0800)]
Merge PR #24886 into master

* refs/pull/24886/head:
qa: fix delay type config name

Reviewed-by: Zheng Yan <zyan@redhat.com>
6 years agoMerge PR #24839 into master
Patrick Donnelly [Tue, 27 Nov 2018 21:53:50 +0000 (13:53 -0800)]
Merge PR #24839 into master

* refs/pull/24839/head:
ceph-volume-client: allow setting mode of CephFS volumes

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
6 years agoAllow specifying a schema for unknown JObj keys
Zack Cerza [Thu, 8 Nov 2018 00:00:22 +0000 (17:00 -0700)]
Allow specifying a schema for unknown JObj keys

Signed-off-by: Zack Cerza <zack@redhat.com>
6 years agovstart.sh: create default fs via 'fs volume create'
Sage Weil [Tue, 27 Nov 2018 19:14:07 +0000 (13:14 -0600)]
vstart.sh: create default fs via 'fs volume create'

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomgr/volumes: fix oremote
Sage Weil [Tue, 27 Nov 2018 04:05:01 +0000 (22:05 -0600)]
mgr/volumes: fix oremote

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MgrMonitor: enable volumes module by default
Sage Weil [Tue, 27 Nov 2018 03:43:06 +0000 (21:43 -0600)]
mon/MgrMonitor: enable volumes module by default

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomgr: create `volumes` module
John Spray [Tue, 7 Aug 2018 14:19:41 +0000 (10:19 -0400)]
mgr: create `volumes` module

This encapsulates and extends ceph_volume_client, providing
similar functionality as a service from ceph-mgr.

We used to call CephFS namespaces "filesystems", and the
ceph_volume_client-created directories "volumes".  That
terminology changes in this module: namespaces are now "volumes",
and the directory-based entity is a "subvolume".

External systems can use librados to access the command
interface provided by this module, instead of using
ceph_volume_client directly.

Signed-off-by: John Spray <john.spray@redhat.com>
6 years agoMerge PR #25020 into master
Patrick Donnelly [Tue, 27 Nov 2018 18:36:03 +0000 (10:36 -0800)]
Merge PR #25020 into master

* refs/pull/25020/head:
script/ceph-backport.sh: adjust to change in github API

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
6 years agorgw: RADOS::Obj::operate takes optional_yield 25068/head
Casey Bodley [Mon, 12 Nov 2018 19:07:59 +0000 (14:07 -0500)]
rgw: RADOS::Obj::operate takes optional_yield

Signed-off-by: Casey Bodley <cbodley@redhat.com>
6 years agorgw: add is_asio_thread to warn on blocking librados calls
Casey Bodley [Thu, 30 Nov 2017 18:10:20 +0000 (13:10 -0500)]
rgw: add is_asio_thread to warn on blocking librados calls

Signed-off-by: Casey Bodley <cbodley@redhat.com>
6 years agorgw: link boost context/coroutines regardless of beast frontend
Casey Bodley [Mon, 12 Nov 2018 17:59:18 +0000 (12:59 -0500)]
rgw: link boost context/coroutines regardless of beast frontend

Signed-off-by: Casey Bodley <cbodley@redhat.com>
6 years agorgw: add rgw_rados_operate() to wrap optionally-async operate
Casey Bodley [Thu, 30 Nov 2017 23:40:06 +0000 (18:40 -0500)]
rgw: add rgw_rados_operate() to wrap optionally-async operate

calls IoCtx::operate() when given an empty optional_yield, or
librados::async_operate() when non-empty. calling async_operate()
with a yield_context behaves just like a synchronous call to
IoCtx::operate(), except that the stackful coroutine is suspended and
resumed on completion instead of blocking the calling thread

Signed-off-by: Casey Bodley <cbodley@redhat.com>
6 years agocommon: add optional_yield wrapper
Casey Bodley [Sun, 12 Nov 2017 20:49:45 +0000 (15:49 -0500)]
common: add optional_yield wrapper

adds a wrapper type that may or may not contain a yield_context
that represents a boost::asio stackful coroutine, along with a
'null_yield' token to designate an empty one

Signed-off-by: Casey Bodley <cbodley@redhat.com>
6 years agoMerge pull request #25235 from sebastian-philipp/dashboard-fix-type-annotation-error
Lenz Grimmer [Tue, 27 Nov 2018 17:19:27 +0000 (18:19 +0100)]
Merge pull request #25235 from sebastian-philipp/dashboard-fix-type-annotation-error

qa/mgr/dashboard: Fix type annotation error.

Reviewed-by: Tatjana Dehler <tdehler@suse.com>
6 years agomgr: Add `HandleCommandResult` namedtuple 25261/head
Sebastian Wagner [Mon, 26 Nov 2018 11:46:05 +0000 (12:46 +0100)]
mgr: Add `HandleCommandResult` namedtuple

Mostly a documentation improvement to make it obvious
what `handle_command` is supposed to return .

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
6 years agodenc: consolidate denc_traits for basic_string 25264/head
Kefu Chai [Tue, 27 Nov 2018 05:05:47 +0000 (13:05 +0800)]
denc: consolidate denc_traits for basic_string

we can reuse decode_nohead() in decode()

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agodenc: only shallow_copy large-enough chunk for decoding
Kefu Chai [Tue, 27 Nov 2018 04:08:28 +0000 (12:08 +0800)]
denc: only shallow_copy large-enough chunk for decoding

if the bl being decoded is not continous, shallow_copy() will do deep
copy under the hood. this introduces internal fragmentation when
decoding small objects in large non-contiguous bufferlist.

to alleviate this problem, we try to copy less if the object being
decoded is bounded.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agodenc: add non-contiguous decode_nohead() for bl,string
Kefu Chai [Tue, 27 Nov 2018 02:47:07 +0000 (10:47 +0800)]
denc: add non-contiguous decode_nohead() for bl,string

bufferlist's denc traits claims to be need_contiguous=false, so
it should implement all all functions to work with
buffer::list::const_iterator. we already have decode(), the missing
puzzle is decode_nohead().

in this change, decode_nohead(size_t len, bufferlist& v,
                              buffer::list::const_iterator& p) is implemented.

same applies to basic_string.

ideally, we should allow decode buffer::list::iterator as well. but
let's leave it for another change in future when it's needed.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agobuffer: fix the traits of list::iterator
Kefu Chai [Mon, 26 Nov 2018 17:47:07 +0000 (01:47 +0800)]
buffer: fix the traits of list::iterator

before this change, the constness of value, pointer, etc traits of
list::iterator was wrong.  also, because std::iterator is deprecated
in C++17, we need to define the traits manually. so, do this change.

these traits could be potentially used anywhere in the source tree.
but a noteworthy user is is_const_iterator<> in denc.h.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agodenc: do not always copy before decoding
Kefu Chai [Mon, 26 Nov 2018 16:00:43 +0000 (00:00 +0800)]
denc: do not always copy before decoding

before this change, if the caller calls into ::decode_nohead(),
we will try to copy the memory chunk to be decoded before decoding it,
but if the buffer in the buffer list is not the last one, we will *deep*
copy the remaining part in the buffer list into a new contiguous memory
chunk and decode it instead. if we are decoding a map<int, buffer::ptr>
with lots of items in it, and the buffer::ptrs in it  are very small,
we will end up suffering from a serious internal fragmentation.

we could use the same strategy of decode(), where we compare the
size of remaining part with CEPH_PAGE_SIZE, and only copy it if
it's small enough. this requires that the decoded type supports
both variant of decoding contiguous and non-contiguous.
quite a few MDS types do not support both of them. for instance,
snapid_t only supports contiguous decoding.

so, instead of conditioning on size, in this change, we condition
on the traits::need_contiguous. probably we can condition on both
of them in a follow-up change.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agodenc: enable decode basic_string<>
Kefu Chai [Mon, 26 Nov 2018 15:52:39 +0000 (23:52 +0800)]
denc: enable decode basic_string<>

we have

buffer::list::iterator_impl<is_const>::copy(unsigned len,
std::string &dest)

but we don't have the templatized version of it. so, if we
plugin a different allocator to basic_string<>, the new string won't
decode with buffer::list::const_iterator. this decode variant is used if
the caller only has a (probably non-contiguous) buffer::list in hand.

in this change, copy(unsigned, char*) is used as an alternative.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #25268 from smithfarm/wip-37392
Kefu Chai [Tue, 27 Nov 2018 15:22:51 +0000 (23:22 +0800)]
Merge pull request #25268 from smithfarm/wip-37392

qa/workunits/rados/test_librados_build.sh: grab files from explicit git branch

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #25129 from rzarzynski/wip-common-annotate
Kefu Chai [Tue, 27 Nov 2018 15:18:48 +0000 (23:18 +0800)]
Merge pull request #25129 from rzarzynski/wip-common-annotate

common: avoid the overhead of ANNOTATE_HAPPENS_* in NDEBUG builds.

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agorgw: batch and process bucket instances 24662/head
Abhishek Lekshmanan [Wed, 17 Oct 2018 22:44:51 +0000 (00:44 +0200)]
rgw: batch and process bucket instances

Sort through and batch bucket instances so that multiple calls to reading
current bucket info and locking can be avoided. For the most trivial case when
the bucket is already deleted we exit early with all the stale instances. When
the bucket reshard is in progress we only process the stale entries with status
done, if the bucket is available for locking then we lock down and mark the
other instances as well.

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
6 years agocli: use rgw-admin reshard stale-instances list/delete
Abhishek Lekshmanan [Mon, 15 Oct 2018 17:34:28 +0000 (19:34 +0200)]
cli: use rgw-admin reshard stale-instances list/delete

Add a delete command as well that clears the resharded instances. We print out
the json status to indicate success or error state

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
6 years agoMerge pull request #25224 from sebastian-philipp/ceph-volume-fix-json
Alfredo Deza [Tue, 27 Nov 2018 15:05:31 +0000 (10:05 -0500)]
Merge pull request #25224 from sebastian-philipp/ceph-volume-fix-json

ceph-volume: fix JSON output in `inventory`

Reviewed-by: Alfredo Deza <adeza@redhat.com>
6 years agolibrados_cxx: document which nobjects interfaces throw 25081/head
Casey Bodley [Tue, 27 Nov 2018 14:46:17 +0000 (09:46 -0500)]
librados_cxx: document which nobjects interfaces throw

Signed-off-by: Casey Bodley <cbodley@redhat.com>
6 years agoPendingReleaseNotes: changed librados::NObjectIterator exceptions
Casey Bodley [Tue, 27 Nov 2018 14:45:19 +0000 (09:45 -0500)]
PendingReleaseNotes: changed librados::NObjectIterator exceptions

Signed-off-by: Casey Bodley <cbodley@redhat.com>