ceph.git
5 years ago14.1.0 v14.1.0
Jenkins Build Slave User [Fri, 22 Feb 2019 18:07:07 +0000 (18:07 +0000)]
14.1.0

5 years agoMerge pull request #25438 from MahatiC/wip-move-to-trash
Mykola Golub [Fri, 22 Feb 2019 16:57:10 +0000 (18:57 +0200)]
Merge pull request #25438 from MahatiC/wip-move-to-trash

rbd: move image to trash as first step when removing

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Mykola Golub <mgolub@suse.com>
5 years agoMerge pull request #26506 from ricardoasmarques/multi-backstore-backend
Lenz Grimmer [Fri, 22 Feb 2019 16:48:25 +0000 (17:48 +0100)]
Merge pull request #26506 from ricardoasmarques/multi-backstore-backend

mgr/dashboard: iSCSI - Infrastructure for multiple backstores (backend)

Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
5 years agoMerge pull request #26515 from theanalyst/civetweb-fixes-n
Matt Benjamin [Fri, 22 Feb 2019 14:20:38 +0000 (09:20 -0500)]
Merge pull request #26515 from theanalyst/civetweb-fixes-n

civetweb: pull up to ceph-master

5 years agoMerge PR #26550 into master
Sage Weil [Fri, 22 Feb 2019 13:14:33 +0000 (07:14 -0600)]
Merge PR #26550 into master

* refs/pull/26550/head:
mon/AuthMonitor: provide auth_lock-safe _assign_global_id()
mon/AuthMonitor: provide AuthMonitor with mon count and rank *only* while active

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
5 years agoMerge PR #26476 into master
Sage Weil [Fri, 22 Feb 2019 13:11:28 +0000 (07:11 -0600)]
Merge PR #26476 into master

* refs/pull/26476/head:
pybind: auto encode/decode cstr
pybind: set language_level for cythonize explicitly

Reviewed-by: Neha Ojha <nojha@redhat.com>
5 years agoMerge PR #26552 into master
Sage Weil [Fri, 22 Feb 2019 13:10:51 +0000 (07:10 -0600)]
Merge PR #26552 into master

* refs/pull/26552/head:
osdc/Objecter: invalidate crcs on preallocated rx buffers

Reviewed-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #26568 into master
Sage Weil [Fri, 22 Feb 2019 13:10:32 +0000 (07:10 -0600)]
Merge PR #26568 into master

* refs/pull/26568/head:
unittest_auth: add unit tests for AuthRegistry con_mode selection
auth/AuthRegistry: register as an observer
auth/AuthRegistry: clear output vectors
common/options: add ms_mon_client_mode
auth: push con_mode selection into AuthRegistry helper

Reviewed-by: Ricardo Dias <rdias@suse.com>
5 years agocivetweb: pull up to ceph-master 26515/head
Abhishek Lekshmanan [Tue, 19 Feb 2019 16:03:38 +0000 (17:03 +0100)]
civetweb: pull up to ceph-master

Contains the following fixes
- absolute url fixes
- ssl socket closing fixes

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
5 years agoMerge pull request #26584 from capri1989/doc-fixes
Kefu Chai [Fri, 22 Feb 2019 11:31:58 +0000 (19:31 +0800)]
Merge pull request #26584 from capri1989/doc-fixes

doc: Remove value 'mon_osd_max_split_count'

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agodoc: Remove value 'mon_osd_max_split_count' from the docs 26584/head
Kai Wagner [Fri, 22 Feb 2019 09:18:44 +0000 (10:18 +0100)]
doc: Remove value 'mon_osd_max_split_count' from the docs

Signed-off-by: Kai Wagner <kwagner@suse.com>
5 years agoMerge pull request #26510 from callithea/wip-add-ganesha-qa-tests
Lenz Grimmer [Fri, 22 Feb 2019 09:28:41 +0000 (10:28 +0100)]
Merge pull request #26510 from callithea/wip-add-ganesha-qa-tests

mgr/dashboard: Added NFS Ganesha suite to QA tests

Reviewed-by: Jeff Layton <jlayton@redhat.com>
5 years agoMerge pull request #26520 from ktdreyer/rpm-rhel8
Kefu Chai [Fri, 22 Feb 2019 07:44:52 +0000 (15:44 +0800)]
Merge pull request #26520 from ktdreyer/rpm-rhel8

rpm: RHEL 8 fixes

Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #26555 from tchaikov/wip-install-build-deps
Kefu Chai [Fri, 22 Feb 2019 07:39:55 +0000 (15:39 +0800)]
Merge pull request #26555 from tchaikov/wip-install-build-deps

cmake,rgw: make amqp support optional

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Yuval Lifshitz <yuvalif@yahoo.com>
Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
5 years agoMerge pull request #26582 from tchaikov/wip-cmake-silence-syntax-warning
Kefu Chai [Fri, 22 Feb 2019 07:37:09 +0000 (15:37 +0800)]
Merge pull request #26582 from tchaikov/wip-cmake-silence-syntax-warning

cmake: fix syntax error of set()

Reviewed-by: Ricardo Dias <rdias@suse.com>
5 years agocmake: fix syntax error of set() 26582/head
Kefu Chai [Fri, 22 Feb 2019 05:37:43 +0000 (13:37 +0800)]
cmake: fix syntax error of set()

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agoinstall-deps,do_freebsd: disable amqp support 26555/head
Kefu Chai [Thu, 21 Feb 2019 11:17:04 +0000 (19:17 +0800)]
install-deps,do_freebsd: disable amqp support

per Willem's request.

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agorpm: disable amqp endpoint on SLE/OpenSUSE
Kefu Chai [Thu, 21 Feb 2019 08:09:00 +0000 (16:09 +0800)]
rpm: disable amqp endpoint on SLE/OpenSUSE

as librabbitmq-devel is not packaged on them yet.

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agocmake: remove amqp_mock from UNITTEST_LIBS
Kefu Chai [Thu, 21 Feb 2019 10:54:31 +0000 (18:54 +0800)]
cmake: remove amqp_mock from UNITTEST_LIBS

this mock library is only used by rgw tests.

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agorpm: build __pycache__ directories on RHEL 8 26520/head
Ken Dreyer [Tue, 19 Feb 2019 16:42:09 +0000 (09:42 -0700)]
rpm: build __pycache__ directories on RHEL 8

In RHEL 8, rpmbuild does not automatically generate __pycache__
directories. Generate them explicitly with the %py_byte_compile macro.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
5 years agorpm: fix pyOpenSSL requirement for RHEL 8
Ken Dreyer [Mon, 18 Feb 2019 22:38:17 +0000 (15:38 -0700)]
rpm: fix pyOpenSSL requirement for RHEL 8

On RHEL 7, this package is named "pyOpenSSL", but on RHEL 8, Fedora, and
SUSE, it is named "python3-pyOpenSSL".

Prior to this change, the RHEL conditional was applying to both RHEL 7
and 8, so we would fail to resolve the "pyOpenSSL" package dependency on
RHEL 8.

Update the RPM conditionals to use "pyOpenSSL" on RHEL 7 and
"python3-pyOpenSSL" on all other distributions.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
5 years agorpm: fix python dependencies on RHEL 8
Ken Dreyer [Mon, 18 Feb 2019 22:19:41 +0000 (15:19 -0700)]
rpm: fix python dependencies on RHEL 8

On RHEL 8, the python34-* and Cython packages are named identically to
Fedora (eg "python3-Cython"). Move the Python 2 "Cython" and python34-*
BuildRequires lines inside a RHEL 7 conditional, so RHEL 8 falls through
to the Fedora package names.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
5 years agoMerge pull request #26566 from theanalyst/vstart-beast
Casey Bodley [Thu, 21 Feb 2019 21:48:55 +0000 (16:48 -0500)]
Merge pull request #26566 from theanalyst/vstart-beast

vstart: make beast as the default frontend for rgw

Reviewed-by: Casey Bodley <cbodley@redhat.com>
5 years agounittest_auth: add unit tests for AuthRegistry con_mode selection 26568/head
Sage Weil [Thu, 21 Feb 2019 19:45:00 +0000 (13:45 -0600)]
unittest_auth: add unit tests for AuthRegistry con_mode selection

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoauth/AuthRegistry: register as an observer
Sage Weil [Thu, 21 Feb 2019 19:45:49 +0000 (13:45 -0600)]
auth/AuthRegistry: register as an observer

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoauth/AuthRegistry: clear output vectors
Sage Weil [Thu, 21 Feb 2019 19:45:28 +0000 (13:45 -0600)]
auth/AuthRegistry: clear output vectors

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #26541 into master
Sage Weil [Thu, 21 Feb 2019 18:47:35 +0000 (12:47 -0600)]
Merge PR #26541 into master

* refs/pull/26541/head:
msg/async: guard protocol Interceptor with preprocessor variable
cmake: add UNIT_TESTS_BUILD preprocessor var based on WITH_TESTS cmake var
test/msgr: remove test_msgr2 unused test
msg/async: msgr2: resolve reconnect races
test/msgr: msgr2 unit tests using the protocol interceptor WIP
msg/async: Protocol interceptor infrastructure

Reviewed-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #26458 into master
Patrick Donnelly [Thu, 21 Feb 2019 18:43:27 +0000 (10:43 -0800)]
Merge PR #26458 into master

* refs/pull/26458/head:
MDSMonitor: do not assign standby-replay when degraded

Reviewed-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #26468 into master
Patrick Donnelly [Thu, 21 Feb 2019 18:26:25 +0000 (10:26 -0800)]
Merge PR #26468 into master

* refs/pull/26468/head:
qa: config recall settings to test cache drop
qa: check cache dump works without timeout
mds: add 2nd order recall throttle
mds: drive log flush and cache trim during recall
mds: avoid gather assertion when subs exist
mds: output full details for recall threshold

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
5 years agoMerge PR #26422 into master
Patrick Donnelly [Thu, 21 Feb 2019 18:11:55 +0000 (10:11 -0800)]
Merge PR #26422 into master

* refs/pull/26422/head:
mds: start to trim cache when mds enters clientreplay state
mds: avoid evaluating stray dentry multiple times
mds: simplfy stray manager activation

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
5 years agoMerge PR #26459 into master
Patrick Donnelly [Thu, 21 Feb 2019 18:10:25 +0000 (10:10 -0800)]
Merge PR #26459 into master

* refs/pull/26459/head:
mds: do not show standby-replay as ranks

Reviewed-by: Zheng Yan <zyan@redhat.com>
5 years agoMerge PR #26486 into master
Patrick Donnelly [Thu, 21 Feb 2019 18:09:12 +0000 (10:09 -0800)]
Merge PR #26486 into master

* refs/pull/26486/head:
mds: remove wrong puts on Message

Reviewed-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #26237 into master
Sage Weil [Thu, 21 Feb 2019 17:18:46 +0000 (11:18 -0600)]
Merge PR #26237 into master

* refs/pull/26237/head:
Revert "qa: update test_envlibrados_for_rocksdb.sh for libradospp split"
doc/librados: explicitly mention that the C++ API is not stable
ceph.spec: force use of upgrade devtoolset-gcc under RHEL 7
librados: add symbol versioning to the C++ API
librados: add symbol versioning to the C API
librados: revert librados3/libradoscc back to librados2

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agomsg/async: guard protocol Interceptor with preprocessor variable 26541/head
Ricardo Dias [Thu, 21 Feb 2019 16:01:22 +0000 (16:01 +0000)]
msg/async: guard protocol Interceptor with preprocessor variable

Signed-off-by: Ricardo Dias <rdias@suse.com>
5 years agocmake: add UNIT_TESTS_BUILD preprocessor var based on WITH_TESTS cmake var
Ricardo Dias [Thu, 21 Feb 2019 16:00:26 +0000 (16:00 +0000)]
cmake: add UNIT_TESTS_BUILD preprocessor var based on WITH_TESTS cmake var

Signed-off-by: Ricardo Dias <rdias@suse.com>
5 years agopybind: auto encode/decode cstr 26476/head
Kefu Chai [Thu, 21 Feb 2019 15:00:35 +0000 (23:00 +0800)]
pybind: auto encode/decode cstr

assuming all string in the cythonized string use the legacy python2
string type, instead of using the unicode, and assuming all c strings
are ASCII, so we don't need encode/decode them when coerce from/to C
strings.

this helps when generating py3 bindings

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agopybind: set language_level for cythonize explicitly
Kefu Chai [Thu, 21 Feb 2019 14:54:30 +0000 (22:54 +0800)]
pybind: set language_level for cythonize explicitly

Compiling rbd.pyx because it changed.
[1/1] Cythonizing rbd.pyx
/usr/lib/python2.7/dist-packages/Cython/Compiler/Main.py:367:
FutureWarning: Cython directive 'language_level' not set, using 2 for
now (Py2). This will change in a later re
lease! File: /var/ssd/ceph/src/pybind/rbd/rbd.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)

this warning is raised by cython 0.29.2

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agovstart: make beast as the default frontend for rgw 26566/head
Abhishek Lekshmanan [Thu, 21 Feb 2019 14:35:55 +0000 (15:35 +0100)]
vstart: make beast as the default frontend for rgw

mstart also features an overrideable $RGW_FRONTEND which defaults to beast

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
5 years agoMerge pull request #26395 from ykcowrebbaj/patch-1
Jason Dillaman [Thu, 21 Feb 2019 14:54:17 +0000 (09:54 -0500)]
Merge pull request #26395 from ykcowrebbaj/patch-1

doc: corrected options of iscsiadm command

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
5 years agoMerge pull request #26521 from dillaman/wip-38385
Mykola Golub [Thu, 21 Feb 2019 14:46:05 +0000 (16:46 +0200)]
Merge pull request #26521 from dillaman/wip-38385

qa/workunits: fixed mon address parsing for rbd-mirror

5 years agoMerge pull request #26502 from tchaikov/wip-common-coroutine-ifdef
Casey Bodley [Thu, 21 Feb 2019 14:33:58 +0000 (09:33 -0500)]
Merge pull request #26502 from tchaikov/wip-common-coroutine-ifdef

common: define BOOST_COROUTINES_NO_DEPRECATION_WARNING if not yet

Reviewed-by: Casey Bodley <cbodley@redhat.com>
5 years agoRevert "qa: update test_envlibrados_for_rocksdb.sh for libradospp split" 26237/head
Jason Dillaman [Wed, 20 Feb 2019 20:00:18 +0000 (15:00 -0500)]
Revert "qa: update test_envlibrados_for_rocksdb.sh for libradospp split"

This reverts commit 0475dfdea315e5208abc201355523c8dab78469f.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agodoc/librados: explicitly mention that the C++ API is not stable
Jason Dillaman [Tue, 12 Feb 2019 14:07:16 +0000 (09:07 -0500)]
doc/librados: explicitly mention that the C++ API is not stable

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agoceph.spec: force use of upgrade devtoolset-gcc under RHEL 7
Jason Dillaman [Tue, 5 Feb 2019 14:40:02 +0000 (09:40 -0500)]
ceph.spec: force use of upgrade devtoolset-gcc under RHEL 7

There is a known crash under C++17 mode that requires an updated
devtoolset to address.

See https://bugzilla.redhat.com/show_bug.cgi?id=1616223

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agolibrados: add symbol versioning to the C++ API
Jason Dillaman [Mon, 4 Feb 2019 21:13:45 +0000 (16:13 -0500)]
librados: add symbol versioning to the C++ API

The future goal would be to change the version for each Ceph major
release to ensure C++ applications will need to be recompiled against
the librados C++ API since we don't guarentee ABI stability.

Fixes: https://tracker.ceph.com/issues/38177
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agodoc/rbd: fix options of iscsiadm command 26395/head
ykcowrebbaj [Wed, 13 Feb 2019 09:13:46 +0000 (17:13 +0800)]
doc/rbd: fix options of iscsiadm command

Signed-off-by: ZhuJieWen <154667715@qq.com>
5 years agoMerge pull request #26241 from jmolmo/hosts_management_add_rm
Sebastian Wagner [Thu, 21 Feb 2019 12:40:29 +0000 (13:40 +0100)]
Merge pull request #26241 from jmolmo/hosts_management_add_rm

mgr/ansible: Add/remove hosts

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sébastien Han <seb@redhat.com>
5 years agorgw,cmake: add option "WITH_RADOSGW_AMQP_ENDPOINT"
Kefu Chai [Thu, 21 Feb 2019 07:59:23 +0000 (15:59 +0800)]
rgw,cmake: add option "WITH_RADOSGW_AMQP_ENDPOINT"

WITH_RADOSGW_AMQP_ENDPOINT is enabled by default.

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agomgr/ansible: Add/remove hosts 26241/head
Juan Miguel Olmo Martínez [Fri, 1 Feb 2019 11:06:04 +0000 (12:06 +0100)]
mgr/ansible: Add/remove hosts

- Implementation of operations add/rm hosts
- Improvement of error management in Ansible Runner Service Client

- Addressed @sebastian-philipp suggestions and findings
- Remove the <role> parameter of hosts operations.
Now all the hosts are placed by default in a specific Ansible Inventory group called <orchestrator>.
Discussion on-going about to keep Host management API endpoint or not.
If hosts management is removed, further modifications will be needed to:
- Keep updated the <host inventory> in the orchestrator
- Manage hosts groups when operations are executed
- Adapted new commands (host add/rm) to use to the new <orchestrator_cli> syntax

- Improved error management
- Added return information to Add/remove host methods docstring

- Removed redundant exceptions following @sebastian-philipp suggestion

- Removed duplicated code
- Removed extra space

- Fixed unit tests
- Improved error management in launch playbook

- removed unused param in docstring (orchestrator.py)

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
5 years agocmake: find_package(RabbitMQ) instead of just checking its header
Kefu Chai [Thu, 21 Feb 2019 04:41:01 +0000 (12:41 +0800)]
cmake: find_package(RabbitMQ) instead of just checking its header

rabbitmq-c is not a header-only library. so we need to ensure that the
library is also around before linking against it. in this change:

* move the detection down to where librabbitmq is used
* add FindRabbitMQ.cmake for find_package(RabbitMQ)
* s/rabbitmq/RabbitMQ::RabbitMQ/ as the latter is an alias library
target, which has more information attached to it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #26525 from liupengs/wip-msg-async-fix-rdma-exchage-port
Kefu Chai [Thu, 21 Feb 2019 07:08:28 +0000 (15:08 +0800)]
Merge pull request #26525 from liupengs/wip-msg-async-fix-rdma-exchage-port

msg/async/rdma: parse IBSYNMsg.lid as hex when receiving message

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #26532 from xiexingguo/wip-pool-scrub
Xie Xingguo [Thu, 21 Feb 2019 05:26:15 +0000 (13:26 +0800)]
Merge pull request #26532 from xiexingguo/wip-pool-scrub

mgr: add per pool scrub commands

Reviewed-by: Sage Weil <sage@redhat.com>
5 years agoMerge pull request #26533 from badone/wip-test-dup_index-trim
Kefu Chai [Thu, 21 Feb 2019 05:13:01 +0000 (13:13 +0800)]
Merge pull request #26533 from badone/wip-test-dup_index-trim

test: Verify a log trim trims the dup_index

Reviewed-By: Eric Ivanvich <ivanvich@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoinstall-deps.sh: do not install librabbitmq-dev manually
Kefu Chai [Thu, 21 Feb 2019 04:07:02 +0000 (12:07 +0800)]
install-deps.sh: do not install librabbitmq-dev manually

it will be installed by `mk-build-deps --install`.

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #26402 from tchaikov/wip-install-deps
Kefu Chai [Thu, 21 Feb 2019 03:59:10 +0000 (11:59 +0800)]
Merge pull request #26402 from tchaikov/wip-install-deps

 install-deps.sh: selectively install dependencies

Reviewed-by: David Zafman <dzafman@redhat.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
5 years agoMerge PR #26551 into master
Sage Weil [Thu, 21 Feb 2019 03:40:36 +0000 (21:40 -0600)]
Merge PR #26551 into master

* refs/pull/26551/head:
osd/PG: fix get debug refcount line

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
Reviewed-by: Neha Ojha <nojha@redhat.com>
5 years agoMerge PR #26511 into master
Sage Weil [Thu, 21 Feb 2019 03:36:58 +0000 (21:36 -0600)]
Merge PR #26511 into master

* refs/pull/26511/head:
mgr: Selftest fails, dashboard/server_port not string

Reviewed-by: Lenz Grimmer <lgrimmer@suse.com>
5 years agoMerge PR #26513 into master
Sage Weil [Thu, 21 Feb 2019 03:36:31 +0000 (21:36 -0600)]
Merge PR #26513 into master

* refs/pull/26513/head:
osd/PG: fix comments in merge_from
osd/PG: align past_intervals and last_epoch_clean for fabricated merge target

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
Reviewed-by: Neha Ojha <nojha@redhat.com>
5 years agoMerge PR #26526 into master
Sage Weil [Thu, 21 Feb 2019 03:36:13 +0000 (21:36 -0600)]
Merge PR #26526 into master

* refs/pull/26526/head:
rpm,deb: remove btrfs-tools as a build-dependency
rpm,deb: remove bc as a build-dependency

Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
5 years agoMerge PR #26536 into master
Sage Weil [Thu, 21 Feb 2019 03:35:11 +0000 (21:35 -0600)]
Merge PR #26536 into master

* refs/pull/26536/head:
src/tools: only build dedup tool if WITH_TESTS is set

Reviewed-by: Myoungwon Oh <omwmw@sk.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
5 years agolibrbd: execute image pre-removal validation before moving image to trash 25438/head
Jason Dillaman [Thu, 21 Feb 2019 03:32:38 +0000 (22:32 -0500)]
librbd: execute image pre-removal validation before moving image to trash

Fixes: http://tracker.ceph.com/issues/38404
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agolibrbd: split image pre-removal logic to separate state machine
Jason Dillaman [Thu, 21 Feb 2019 03:05:51 +0000 (22:05 -0500)]
librbd: split image pre-removal logic to separate state machine

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agomsg/async/rdma: parse IBSYNMsg.lid as hex when receiving message 26525/head
LiuPeng [Wed, 20 Feb 2019 02:39:00 +0000 (10:39 +0800)]
msg/async/rdma: parse IBSYNMsg.lid as hex when receiving message

function send_msg encode struct IBSYNMsg to a string, and recv_msg parse the string.
In the function send_msg, im.lid (unsigned short int) is formatted into a string with format string %04x,
so, recv_msg should read im.lid from the string with format string %hx instead of %hu (unsigned short).

Fixes: https://tracker.ceph.com/issues/38391
Signed-off-by: Peng Liu <liupeng37@baidu.com>
5 years agomgr: add per pool scrub commands 26532/head
xie xingguo [Wed, 20 Feb 2019 06:14:26 +0000 (14:14 +0800)]
mgr: add per pool scrub commands

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
5 years agoosdc/Objecter: invalidate crcs on preallocated rx buffers 26552/head
Ilya Dryomov [Wed, 20 Feb 2019 21:30:29 +0000 (22:30 +0100)]
osdc/Objecter: invalidate crcs on preallocated rx buffers

Both simple and async messengers use c_str() when copying the data from
the socket into the receive buffer, going behind bufferlist's back.  If
the receive buffer is preallocated, we need to invalidate its crc cache
by hand to avoid possible data crc mismatches on the client side.

Fixes: https://tracker.ceph.com/issues/38416
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
5 years agomon/AuthMonitor: provide auth_lock-safe _assign_global_id() 26550/head
Sage Weil [Wed, 20 Feb 2019 23:09:06 +0000 (17:09 -0600)]
mon/AuthMonitor: provide auth_lock-safe _assign_global_id()

Break assign_global_id() into two parts:

- _assign_global_id(), called under auth_lock, that does nothing but
  assign an id (or fail).  This makes use of the num_mon and num_rank
  values, which means it only works while we are in quorum.
- increase_max_global_id(), if it looks like we should.

Also, adjust _should_increase_max_global_id() to also work under auth_lock
since we are looking at last_allocated_id.  All last_allocated_id users
are not protected by auth_lock.

Fixes: http://tracker.ceph.com/issues/38372
Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoosd/PG: fix get debug refcount line 26551/head
Sage Weil [Wed, 20 Feb 2019 23:23:51 +0000 (17:23 -0600)]
osd/PG: fix get debug refcount line

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomon/AuthMonitor: provide AuthMonitor with mon count and rank *only* while active
Sage Weil [Wed, 20 Feb 2019 22:51:42 +0000 (16:51 -0600)]
mon/AuthMonitor: provide AuthMonitor with mon count and rank *only* while active

Provide AuthMonitor with the mon count and rank under the mon->auth_lock.
Only set these values while the monitor is active (and the mon is allowed
to authenticate).  When we start an election or bootstrap, clear these
values.

Note that we aren't using them yet!

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agolibrbd: drop extra check for image watchers from trash move API
Jason Dillaman [Wed, 20 Feb 2019 21:46:33 +0000 (16:46 -0500)]
librbd: drop extra check for image watchers from trash move API

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agolibrbd: attempt to restore deleted image from trash on known failures
Jason Dillaman [Wed, 20 Feb 2019 14:19:01 +0000 (09:19 -0500)]
librbd: attempt to restore deleted image from trash on known failures

If the image has watchers, snapshots, or group links, restore the image
from the trash back to the image directory since data removal hasn't yet
started.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agorbd: don't hide partially deleted images in long image list
Jason Dillaman [Wed, 20 Feb 2019 14:14:01 +0000 (09:14 -0500)]
rbd: don't hide partially deleted images in long image list

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agolibrbd: include in-progress image removals in image list
Jason Dillaman [Tue, 19 Feb 2019 14:20:51 +0000 (09:20 -0500)]
librbd: include in-progress image removals in image list

Exclude them from the trash list to prevent double-counting
them. This mimics the previous behavior for handling interrupted
image removals.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agolibrbd: fixed some edge cases when moving images to trash upon remove
Jason Dillaman [Fri, 15 Feb 2019 13:29:36 +0000 (08:29 -0500)]
librbd: fixed some edge cases when moving images to trash upon remove

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agolibrbd: skip mirror image verification when pruning rbd-mirror watchers
Jason Dillaman [Fri, 15 Feb 2019 14:11:36 +0000 (09:11 -0500)]
librbd: skip mirror image verification when pruning rbd-mirror watchers

When an image is moved to the trash, mirroring is disabled which will remove
the image id from the mirroring directory. If you then quickly attempt to
remove the image from the trash, it might fail if the rbd-mirror daemon hasn't
closed the image since it fails to filter out rbd-mirror daemon watchers
against images with mirroring disabled.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agorbd: move image to trash as a first step
Mahati Chamarthy [Thu, 6 Dec 2018 23:44:59 +0000 (15:44 -0800)]
rbd: move image to trash as a first step

... while removing an Image

Fixes: http://tracker.ceph.com/issues/24226
Signed-off-by: Mahati Chamarthy <mahati.chamarthy@intel.com>
5 years agoMerge pull request #26483 from idryomov/wip-send-copyup-cleanups
Jason Dillaman [Wed, 20 Feb 2019 20:19:30 +0000 (15:19 -0500)]
Merge pull request #26483 from idryomov/wip-send-copyup-cleanups

librbd: send_copyup() fixes and cleanups

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
5 years agolibrados: add symbol versioning to the C API
Jason Dillaman [Thu, 31 Jan 2019 21:06:40 +0000 (16:06 -0500)]
librados: add symbol versioning to the C API

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agolibrados: revert librados3/libradoscc back to librados2
Jason Dillaman [Sun, 3 Feb 2019 16:28:37 +0000 (11:28 -0500)]
librados: revert librados3/libradoscc back to librados2

For backwards compatibility and upgrade reasons, the librados2
API needs to be preserved and it needs to continue to be compatible
with dependent libraries like librbd1.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agoMerge pull request #26465 from dzafman/wip-38344
David Zafman [Wed, 20 Feb 2019 19:17:38 +0000 (11:17 -0800)]
Merge pull request #26465 from dzafman/wip-38344

osd: Prevent negative local num_bytes sent to peer for backfill reser…

Reviewed-by: Neha Ojha <nojha@redhat.com>
5 years agolibrbd: CopyupRequest::m_pending_copyups doesn't need to be atomic 26483/head
Ilya Dryomov [Mon, 18 Feb 2019 10:55:55 +0000 (11:55 +0100)]
librbd: CopyupRequest::m_pending_copyups doesn't need to be atomic

It's protected by CopyupRequest::m_lock mutex.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
5 years agolibrbd: don't clone IoCtx in send_copyup()
Ilya Dryomov [Mon, 18 Feb 2019 10:37:09 +0000 (11:37 +0100)]
librbd: don't clone IoCtx in send_copyup()

Calling aio_operate() with the explicit snap_seq and snaps doesn't
mutate IoCtx, so no reason to clone it.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
5 years agolibrbd: send copyup and hint only once
Ilya Dryomov [Thu, 14 Feb 2019 20:27:12 +0000 (21:27 +0100)]
librbd: send copyup and hint only once

In the deep-copy case, don't send copyup and hint twice (once with the
blank and once with the current snapshot context).

Preserve the workaround for compare-and-write added in commit
f6db9b8027b6 ("librbd: copyup state machine needs to handle empty write
ops").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
5 years agoMerge pull request #26519 from idryomov/wip-cmpext-bl
Jason Dillaman [Wed, 20 Feb 2019 19:10:20 +0000 (14:10 -0500)]
Merge pull request #26519 from idryomov/wip-cmpext-bl

librbd: ensure compare-and-write doesn't skip compare after copyup

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
5 years agoMerge PR #26262 into master
Sage Weil [Wed, 20 Feb 2019 19:05:11 +0000 (13:05 -0600)]
Merge PR #26262 into master

* refs/pull/26262/head:
mgr/orch/ssh: add qa test
qa: install/exclude ceph-mgr-ssh package
debian: package ssh orchestrator
spec.ceph: package ssh orchestrator
ssh/orch: add ssh orchestrator

5 years agocommon/options: add ms_mon_client_mode
Sage Weil [Mon, 18 Feb 2019 19:02:16 +0000 (13:02 -0600)]
common/options: add ms_mon_client_mode

The server now has a list of *allowed* modes (no ordering) and the clients
have a list of modes in order of preference.  Since we want everything
connecting to the mon to be secure by default (think: ceph auth set ...),
we need a separate option to ensure we prefer secure mon connections from
the CLI etc.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoauth: push con_mode selection into AuthRegistry helper
Sage Weil [Mon, 18 Feb 2019 19:34:15 +0000 (13:34 -0600)]
auth: push con_mode selection into AuthRegistry helper

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge pull request #26197 from wanghao72/master
Casey Bodley [Wed, 20 Feb 2019 18:39:02 +0000 (13:39 -0500)]
Merge pull request #26197 from wanghao72/master

rgw: bug in versioning concurrent, list and get have consistency issue

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
5 years agoMerge pull request #26494 from cbodley/wip-rgw-datalog-autotrim
Casey Bodley [Wed, 20 Feb 2019 18:38:38 +0000 (13:38 -0500)]
Merge pull request #26494 from cbodley/wip-rgw-datalog-autotrim

rgw: fix rgw_data_sync_info::json_decode()

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
5 years agomgr/orch/ssh: add qa test 26262/head
Noah Watkins [Fri, 15 Feb 2019 17:45:30 +0000 (09:45 -0800)]
mgr/orch/ssh: add qa test

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
5 years agoqa: install/exclude ceph-mgr-ssh package
Noah Watkins [Thu, 14 Feb 2019 20:10:24 +0000 (12:10 -0800)]
qa: install/exclude ceph-mgr-ssh package

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
5 years agodebian: package ssh orchestrator
Noah Watkins [Tue, 12 Feb 2019 22:02:42 +0000 (14:02 -0800)]
debian: package ssh orchestrator

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
5 years agospec.ceph: package ssh orchestrator
Noah Watkins [Mon, 11 Feb 2019 19:38:17 +0000 (11:38 -0800)]
spec.ceph: package ssh orchestrator

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
5 years agossh/orch: add ssh orchestrator
Noah Watkins [Tue, 19 Feb 2019 19:28:50 +0000 (11:28 -0800)]
ssh/orch: add ssh orchestrator

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
5 years agoMerge pull request #26471 from tnaganawa/patch-3
Alfredo Deza [Wed, 20 Feb 2019 17:23:38 +0000 (12:23 -0500)]
Merge pull request #26471 from tnaganawa/patch-3

ceph-deploy would not support --cluster option anymore

Reviewed-by: Alfredo Deza <adeza@redhat.com>
5 years agoosd/PG: fix comments in merge_from 26513/head
Sage Weil [Tue, 19 Feb 2019 15:33:27 +0000 (09:33 -0600)]
osd/PG: fix comments in merge_from

Some of these were stale.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/dashboard: Infrastructure for multiple backstores (backend) 26506/head
Ricardo Marques [Tue, 19 Feb 2019 10:36:13 +0000 (10:36 +0000)]
mgr/dashboard: Infrastructure for multiple backstores (backend)

Fixes: https://tracker.ceph.com/issues/38090
Signed-off-by: Ricardo Marques <rimarques@suse.com>
5 years agotest/librbd: add test cases for compare-and-write with copyup 26519/head
Ilya Dryomov [Tue, 19 Feb 2019 16:45:24 +0000 (17:45 +0100)]
test/librbd: add test cases for compare-and-write with copyup

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
5 years agotest/librbd: make get_temp_image_name() static
Ilya Dryomov [Fri, 15 Feb 2019 13:04:16 +0000 (14:04 +0100)]
test/librbd: make get_temp_image_name() static

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
5 years agotest/librados_test_stub: reimplement cmpext()
Ilya Dryomov [Wed, 20 Feb 2019 10:37:07 +0000 (11:37 +0100)]
test/librados_test_stub: reimplement cmpext()

cmpext is a read operation.  As such, it shouldn't be creating objects
or extending them and it should accept snapshots.

The compare code is completely broken, resulting in false positives
(i.e. failures to detect mismatches) in many cases.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
5 years agoMerge pull request #26299 from yuvalif/add_pubsub_tests
Casey Bodley [Wed, 20 Feb 2019 14:10:17 +0000 (09:10 -0500)]
Merge pull request #26299 from yuvalif/add_pubsub_tests

rgw/pubsub: add pubsub tests

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>