]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
6 years agorpm,cmake: additional fixes to make amqp support optional 26625/head
Tim Serong [Mon, 25 Feb 2019 08:48:11 +0000 (19:48 +1100)]
rpm,cmake: additional fixes to make amqp support optional

Signed-off-by: Tim Serong <tserong@suse.com>
6 years agoMerge PR #26466 into master
Sage Weil [Sun, 24 Feb 2019 15:33:32 +0000 (09:33 -0600)]
Merge PR #26466 into master

* refs/pull/26466/head:
msg/async, v2: fix wrong base for KeepAliveFrameAck.
msg/async, v2: frame decoding operates on bufferlist.
msg/async, v2: drop ceph_msg_header2 fields duplicating segment info.
msg/async, v2: drop the scaffolding in preamble parsing.
msg/async, v2: handle msg authentication failures.
msg/async, v2: drop depedency on uint128_t. Clean up onwire crypto.
msg/async, v2: fix cur_msg_size in ::reset_recv_state().
msg/async, v2: drop magic numbers for segments.
msg/async, v2: get rid of magic number in SignedEncryptedFrame.
msg/async, v2: get rid of the magic number for default alignment.
msg/async, v2: decouple onwire segment length from logical length.
msg/async, v2: follow the const bl& concept in authenticated_encrypt_update().
msg/async, v2: drop handling of extra segments in ::fill_preamble().
msg/async, v2: get rid of magic numbers for alignment.
msg/async, v2: drop reserve() from onwire crypto's TxHandler.
msg/async: add con_mode to debug lines
msg/DispatchQueue: include con_mode in <== line
common/ceph_strings: get_con_mode_name()
msg/Connection: add get_con_mode()
msg/async/ProtocolV2: clean up preamble comments
msg/async, v2: improve debug around sending client indent.
msg/async, v2: bring back the no-encryption ability.
msg/async, v2: workaround con_mode handling.
msg/async, v2: drop the throttles bypass.
msg/async, v2: READ_MESSAGE_FRONT -> THROTTLE_DONE.
msg/async: WaitFrame of V2 can be crypto processed now.
msg/async: initial multi-segment support for V2.
msg/async: V2 bypasses throttles just for development.
msg/async: rectify reseting security state in ProtocolV2::reset_recv_state().
msg/async: switch to CRC32 for V2 preamble blocks.
msg/async: bump up preamble block size to 32 bytes.
msg/async: get rid of the distiction on main and extra V2 preamble.
msg/async: add debug around empty ClientIdent::addrs.
msg/async: V2 uses segments instead of next_payload_len, part 1.
msg/async: perform V2 frame dispatch in dedicated method.
msg/async: implement crc checking for main preamble of V2.
msg/async: receive V2 messages with new preable format.
msg/async: transmit V2 messages with new preable format.
msg/async: reset crypto processors in ProtocolV2::reset_recv_state().
msg/async: preamble of V2 Frames is now encrypted and authenticated.
msg/async: slightly rework ProtocolV2 preamble crafting.
msg/async: reset the rx stream handler in ::handle_read_frame_length_and_tag.
auth, msg/async, v2: drop AuthStreamHandler and AES128GCM_StreamHandler.
msg/async: Messages in Protocol2 are crypto-processed only once.
msg/async: SignedEncryptedFrame uses ceph::crypto::onwire.
msg/async: expose message segmentation to ::write_message().
auth: implement ceph::crypto::onwire with OpenSSL EVP.
auth: introduce ceph::crypto::onwire interfaces.
msg/async: decouple MessageHeaderFrame from SignedEncryptedFrame.
msg/async: move Protocol* asserts in SignedEncryptedFrame to compile time.
msg/async: simplify encryption handling in the PayloadFrame class.
auth: drop AES128CBC_HMACSHA256_StreamHandler.
msg/async: ensure consistency between con_mode and session_security.
msg/async: drop MessageFrame. Use MessageHeaderFrame instead.
msg/async: set con_mode and session_security at both peers.
msg/async, auth: switch AuthStreamHandler::rxtx_t to std::unique_ptr.
crypto: AES128GCM_StreamHandler brings authenticated encryption with AES-GCM.
include: uint128_t -> ceph::uint128_t + using.
msg/async: move crypto handling from ProtocolV2 into AuthStreamHandler.
auth, msg: dissect AuthStreamHandler from AuthSessionHandler.
auth/cephx: make _calc_signature() of CephxSessionHandler private.
auth: drop {en,de}crypt_message() from AuthSessionHandler.
auth: introduce DummyAuthSessionHandler.
auth: make AuthSessionHandler purely abstract.
auth: drop no_security() from AuthSessionHandler.
auth: drop get_protocol() and get_key() from AuthSessionHandler.
auth: drop sign_bufferlist() from AuthSessionHandler.
msg/async: drop get_auth_meta() from Protocol.
msg/async: emphasize ProtocolV2 does authenticated encryption.

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoMerge pull request #26560 from xiexingguo/wip-pool-force-recovery
Xie Xingguo [Sat, 23 Feb 2019 07:30:14 +0000 (15:30 +0800)]
Merge pull request #26560 from xiexingguo/wip-pool-force-recovery

mgr: add per pool force-recovery/backfill commands

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: David Zafman <dzafman@redhat.com>
6 years agomgr: add per pool force-recovery/backfill commands 26560/head
xie xingguo [Wed, 20 Feb 2019 10:40:02 +0000 (18:40 +0800)]
mgr: add per pool force-recovery/backfill commands

For those with multiple storage pools sharing the same devices,
I think it would make much more sense to offer per-pool
commands to bring pools with high priority, e.g., because they
are hosting data of more importance than others, back to normal
quickly.

Fixes: http://tracker.ceph.com/issues/38456
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
6 years agomsg/async, v2: fix wrong base for KeepAliveFrameAck. 26466/head
Radoslaw Zarzynski [Sat, 23 Feb 2019 00:49:17 +0000 (01:49 +0100)]
msg/async, v2: fix wrong base for KeepAliveFrameAck.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agoMerge PR #26602 into master
Sage Weil [Fri, 22 Feb 2019 22:00:25 +0000 (16:00 -0600)]
Merge PR #26602 into master

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

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
6 years agoMerge pull request #26436 from dzafman/wip-bionic-core
David Zafman [Fri, 22 Feb 2019 20:52:37 +0000 (12:52 -0800)]
Merge pull request #26436 from dzafman/wip-bionic-core

run-standalone.sh: Need double-quotes to handle | in core_pattern on all distributions

Reviewed-by: Neha Ojha <nojha@redhat.com>
6 years agoRevert "pybind: set language_level for cythonize explicitly" 26602/head
Neha Ojha [Fri, 22 Feb 2019 19:41:55 +0000 (11:41 -0800)]
Revert "pybind: set language_level for cythonize explicitly"

This reverts commit ded3d43dbf8a36daa65d8efe406af4d12ffc7dd8.

Signed-off-by: Neha Ojha <nojha@redhat.com>
6 years agoRevert "pybind: auto encode/decode cstr"
Neha Ojha [Fri, 22 Feb 2019 19:39:20 +0000 (11:39 -0800)]
Revert "pybind: auto encode/decode cstr"

This reverts commit c36d0f1a7de4668eb81075e4a94846cf81fc30cd.

Signed-off-by: Neha Ojha <nojha@redhat.com>
6 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>
6 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>
6 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

6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 years agomsg/async, v2: frame decoding operates on bufferlist.
Radoslaw Zarzynski [Thu, 21 Feb 2019 20:35:13 +0000 (21:35 +0100)]
msg/async, v2: frame decoding operates on bufferlist.

This change is driven by buggy buffer's life time management
polluting AuthAuthorizer::bl with dangling raw_static instances.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async, v2: drop ceph_msg_header2 fields duplicating segment info.
Radoslaw Zarzynski [Thu, 21 Feb 2019 20:33:48 +0000 (21:33 +0100)]
msg/async, v2: drop ceph_msg_header2 fields duplicating segment info.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async, v2: drop the scaffolding in preamble parsing.
Radoslaw Zarzynski [Thu, 21 Feb 2019 00:42:17 +0000 (01:42 +0100)]
msg/async, v2: drop the scaffolding in preamble parsing.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async, v2: handle msg authentication failures.
Radoslaw Zarzynski [Thu, 21 Feb 2019 00:26:25 +0000 (01:26 +0100)]
msg/async, v2: handle msg authentication failures.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async, v2: drop depedency on uint128_t. Clean up onwire crypto.
Radoslaw Zarzynski [Wed, 20 Feb 2019 15:01:28 +0000 (16:01 +0100)]
msg/async, v2: drop depedency on uint128_t. Clean up onwire crypto.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async, v2: fix cur_msg_size in ::reset_recv_state().
Radoslaw Zarzynski [Wed, 20 Feb 2019 06:16:53 +0000 (07:16 +0100)]
msg/async, v2: fix cur_msg_size in ::reset_recv_state().

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async, v2: drop magic numbers for segments.
Radoslaw Zarzynski [Wed, 20 Feb 2019 01:44:38 +0000 (02:44 +0100)]
msg/async, v2: drop magic numbers for segments.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async, v2: get rid of magic number in SignedEncryptedFrame.
Radoslaw Zarzynski [Wed, 20 Feb 2019 01:24:24 +0000 (02:24 +0100)]
msg/async, v2: get rid of magic number in SignedEncryptedFrame.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async, v2: get rid of the magic number for default alignment.
Radoslaw Zarzynski [Wed, 20 Feb 2019 01:21:52 +0000 (02:21 +0100)]
msg/async, v2: get rid of the magic number for default alignment.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async, v2: decouple onwire segment length from logical length.
Radoslaw Zarzynski [Tue, 19 Feb 2019 20:56:25 +0000 (21:56 +0100)]
msg/async, v2: decouple onwire segment length from logical length.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async, v2: follow the const bl& concept in authenticated_encrypt_update().
Radoslaw Zarzynski [Tue, 19 Feb 2019 20:51:36 +0000 (21:51 +0100)]
msg/async, v2: follow the const bl& concept in authenticated_encrypt_update().

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async, v2: drop handling of extra segments in ::fill_preamble().
Radoslaw Zarzynski [Tue, 19 Feb 2019 16:14:52 +0000 (17:14 +0100)]
msg/async, v2: drop handling of extra segments in ::fill_preamble().

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async, v2: get rid of magic numbers for alignment.
Radoslaw Zarzynski [Tue, 19 Feb 2019 16:13:32 +0000 (17:13 +0100)]
msg/async, v2: get rid of magic numbers for alignment.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async, v2: drop reserve() from onwire crypto's TxHandler.
Radoslaw Zarzynski [Tue, 19 Feb 2019 13:09:52 +0000 (14:09 +0100)]
msg/async, v2: drop reserve() from onwire crypto's TxHandler.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: add con_mode to debug lines
Sage Weil [Mon, 18 Feb 2019 19:43:31 +0000 (13:43 -0600)]
msg/async: add con_mode to debug lines

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/DispatchQueue: include con_mode in <== line
Sage Weil [Sun, 17 Feb 2019 15:42:23 +0000 (09:42 -0600)]
msg/DispatchQueue: include con_mode in <== line

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agocommon/ceph_strings: get_con_mode_name()
Sage Weil [Sun, 17 Feb 2019 15:42:10 +0000 (09:42 -0600)]
common/ceph_strings: get_con_mode_name()

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/Connection: add get_con_mode()
Sage Weil [Sun, 17 Feb 2019 15:41:56 +0000 (09:41 -0600)]
msg/Connection: add get_con_mode()

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async/ProtocolV2: clean up preamble comments
Sage Weil [Sun, 17 Feb 2019 15:30:56 +0000 (09:30 -0600)]
msg/async/ProtocolV2: clean up preamble comments

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async, v2: improve debug around sending client indent.
Radoslaw Zarzynski [Thu, 14 Feb 2019 03:59:32 +0000 (04:59 +0100)]
msg/async, v2: improve debug around sending client indent.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async, v2: bring back the no-encryption ability.
Radoslaw Zarzynski [Sun, 17 Feb 2019 01:26:59 +0000 (02:26 +0100)]
msg/async, v2: bring back the no-encryption ability.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async, v2: workaround con_mode handling.
Radoslaw Zarzynski [Sat, 16 Feb 2019 00:38:40 +0000 (01:38 +0100)]
msg/async, v2: workaround con_mode handling.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async, v2: drop the throttles bypass.
Radoslaw Zarzynski [Fri, 15 Feb 2019 15:40:22 +0000 (16:40 +0100)]
msg/async, v2: drop the throttles bypass.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async, v2: READ_MESSAGE_FRONT -> THROTTLE_DONE.
Radoslaw Zarzynski [Fri, 15 Feb 2019 14:11:09 +0000 (15:11 +0100)]
msg/async, v2: READ_MESSAGE_FRONT -> THROTTLE_DONE.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: WaitFrame of V2 can be crypto processed now.
Radoslaw Zarzynski [Thu, 14 Feb 2019 00:41:09 +0000 (01:41 +0100)]
msg/async: WaitFrame of V2 can be crypto processed now.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 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>
6 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>
6 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>
6 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>
6 years agomsg/async: initial multi-segment support for V2.
Radoslaw Zarzynski [Fri, 15 Feb 2019 02:09:19 +0000 (03:09 +0100)]
msg/async: initial multi-segment support for V2.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: V2 bypasses throttles just for development.
Radoslaw Zarzynski [Thu, 14 Feb 2019 20:02:52 +0000 (21:02 +0100)]
msg/async: V2 bypasses throttles just for development.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: rectify reseting security state in ProtocolV2::reset_recv_state().
Radoslaw Zarzynski [Thu, 14 Feb 2019 19:31:49 +0000 (20:31 +0100)]
msg/async: rectify reseting security state in ProtocolV2::reset_recv_state().

The reason for that is:

  2019-02-14 19:59:00.774 7f78aebf3700 20 --2- v2:127.0.0.1:40678/0 >>
    v2:127.0.0.1:40680/0 conn(0x5574ae75e480 0x5574ae696000 :-1 s=READY
    pgs=11 cs=0 l=0 rx=0x5574ae2af5f0 tx=0x5574ae79bc00).handle_read_frame_preamble_main
    r=-1
  2019-02-14 19:59:00.774 7f78aebf3700  1 --2- v2:127.0.0.1:40678/0 >>
    v2:127.0.0.1:40680/0 conn(0x5574ae75e480 0x5574ae696000 :-1 s=READY
    pgs=11 cs=0 l=0 rx=0x5574ae2af5f0 tx=0x5574ae79bc00).handle_read_frame_preamble_main
    read frame length and tag failed r=-1 ((1) Operation not permitted)
  2019-02-14 19:59:00.774 7f78aebf3700 10 --2- v2:127.0.0.1:40678/0 >>
    v2:127.0.0.1:40680/0 conn(0x5574ae75e480 0x5574ae696000 :-1 s=READY
    pgs=11 cs=0 l=0 rx=0x5574ae2af5f0 tx=0x5574ae79bc00)._fault

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: switch to CRC32 for V2 preamble blocks.
Radoslaw Zarzynski [Thu, 14 Feb 2019 19:30:05 +0000 (20:30 +0100)]
msg/async: switch to CRC32 for V2 preamble blocks.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: bump up preamble block size to 32 bytes.
Radoslaw Zarzynski [Thu, 14 Feb 2019 19:25:55 +0000 (20:25 +0100)]
msg/async: bump up preamble block size to 32 bytes.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: get rid of the distiction on main and extra V2 preamble.
Radoslaw Zarzynski [Thu, 14 Feb 2019 15:58:42 +0000 (16:58 +0100)]
msg/async: get rid of the distiction on main and extra V2 preamble.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: add debug around empty ClientIdent::addrs.
Radoslaw Zarzynski [Thu, 14 Feb 2019 03:02:41 +0000 (04:02 +0100)]
msg/async: add debug around empty ClientIdent::addrs.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: V2 uses segments instead of next_payload_len, part 1.
Radoslaw Zarzynski [Thu, 14 Feb 2019 00:39:26 +0000 (01:39 +0100)]
msg/async: V2 uses segments instead of next_payload_len, part 1.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: perform V2 frame dispatch in dedicated method.
Radoslaw Zarzynski [Wed, 13 Feb 2019 18:13:43 +0000 (19:13 +0100)]
msg/async: perform V2 frame dispatch in dedicated method.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: implement crc checking for main preamble of V2.
Radoslaw Zarzynski [Wed, 13 Feb 2019 18:05:32 +0000 (19:05 +0100)]
msg/async: implement crc checking for main preamble of V2.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: receive V2 messages with new preable format.
Radoslaw Zarzynski [Wed, 13 Feb 2019 17:28:53 +0000 (18:28 +0100)]
msg/async: receive V2 messages with new preable format.

Currently we do support messages with single segment only.
Adding multi-segment and proper alignment handling is WIP.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: transmit V2 messages with new preable format.
Radoslaw Zarzynski [Tue, 12 Feb 2019 15:30:30 +0000 (16:30 +0100)]
msg/async: transmit V2 messages with new preable format.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: reset crypto processors in ProtocolV2::reset_recv_state().
Radoslaw Zarzynski [Mon, 11 Feb 2019 05:46:18 +0000 (06:46 +0100)]
msg/async: reset crypto processors in ProtocolV2::reset_recv_state().

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: preamble of V2 Frames is now encrypted and authenticated.
Radoslaw Zarzynski [Mon, 11 Feb 2019 05:44:36 +0000 (06:44 +0100)]
msg/async: preamble of V2 Frames is now encrypted and authenticated.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: slightly rework ProtocolV2 preamble crafting.
Radoslaw Zarzynski [Mon, 11 Feb 2019 05:42:24 +0000 (06:42 +0100)]
msg/async: slightly rework ProtocolV2 preamble crafting.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: reset the rx stream handler in ::handle_read_frame_length_and_tag.
Radoslaw Zarzynski [Mon, 11 Feb 2019 00:09:48 +0000 (01:09 +0100)]
msg/async: reset the rx stream handler in ::handle_read_frame_length_and_tag.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agoauth, msg/async, v2: drop AuthStreamHandler and AES128GCM_StreamHandler.
Radoslaw Zarzynski [Sun, 10 Feb 2019 23:31:49 +0000 (00:31 +0100)]
auth, msg/async, v2: drop AuthStreamHandler and AES128GCM_StreamHandler.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: Messages in Protocol2 are crypto-processed only once.
Radoslaw Zarzynski [Fri, 8 Feb 2019 15:01:00 +0000 (16:01 +0100)]
msg/async: Messages in Protocol2 are crypto-processed only once.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: SignedEncryptedFrame uses ceph::crypto::onwire.
Radoslaw Zarzynski [Thu, 7 Feb 2019 21:32:41 +0000 (22:32 +0100)]
msg/async: SignedEncryptedFrame uses ceph::crypto::onwire.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: expose message segmentation to ::write_message().
Radoslaw Zarzynski [Thu, 7 Feb 2019 14:11:27 +0000 (15:11 +0100)]
msg/async: expose message segmentation to ::write_message().

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agoauth: implement ceph::crypto::onwire with OpenSSL EVP.
Radoslaw Zarzynski [Tue, 5 Feb 2019 22:39:05 +0000 (23:39 +0100)]
auth: implement ceph::crypto::onwire with OpenSSL EVP.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agoauth: introduce ceph::crypto::onwire interfaces.
Radoslaw Zarzynski [Tue, 5 Feb 2019 14:17:04 +0000 (15:17 +0100)]
auth: introduce ceph::crypto::onwire interfaces.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: decouple MessageHeaderFrame from SignedEncryptedFrame.
Radoslaw Zarzynski [Wed, 30 Jan 2019 20:27:17 +0000 (21:27 +0100)]
msg/async: decouple MessageHeaderFrame from SignedEncryptedFrame.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: move Protocol* asserts in SignedEncryptedFrame to compile time.
Radoslaw Zarzynski [Wed, 30 Jan 2019 20:19:06 +0000 (21:19 +0100)]
msg/async: move Protocol* asserts in SignedEncryptedFrame to compile time.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: simplify encryption handling in the PayloadFrame class.
Radoslaw Zarzynski [Wed, 30 Jan 2019 20:07:42 +0000 (21:07 +0100)]
msg/async: simplify encryption handling in the PayloadFrame class.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agoauth: drop AES128CBC_HMACSHA256_StreamHandler.
Radoslaw Zarzynski [Mon, 28 Jan 2019 13:08:25 +0000 (14:08 +0100)]
auth: drop AES128CBC_HMACSHA256_StreamHandler.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: ensure consistency between con_mode and session_security.
Radoslaw Zarzynski [Sun, 27 Jan 2019 19:28:40 +0000 (20:28 +0100)]
msg/async: ensure consistency between con_mode and session_security.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: drop MessageFrame. Use MessageHeaderFrame instead.
Radoslaw Zarzynski [Sun, 27 Jan 2019 16:23:31 +0000 (17:23 +0100)]
msg/async: drop MessageFrame. Use MessageHeaderFrame instead.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: set con_mode and session_security at both peers.
Radoslaw Zarzynski [Sat, 26 Jan 2019 00:37:17 +0000 (01:37 +0100)]
msg/async: set con_mode and session_security at both peers.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async, auth: switch AuthStreamHandler::rxtx_t to std::unique_ptr.
Radoslaw Zarzynski [Thu, 24 Jan 2019 00:46:50 +0000 (01:46 +0100)]
msg/async, auth: switch AuthStreamHandler::rxtx_t to std::unique_ptr.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agocrypto: AES128GCM_StreamHandler brings authenticated encryption with AES-GCM.
Radoslaw Zarzynski [Thu, 24 Jan 2019 00:34:31 +0000 (01:34 +0100)]
crypto: AES128GCM_StreamHandler brings authenticated encryption with AES-GCM.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agoinclude: uint128_t -> ceph::uint128_t + using.
Radoslaw Zarzynski [Mon, 28 Jan 2019 12:19:23 +0000 (13:19 +0100)]
include: uint128_t -> ceph::uint128_t + using.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: move crypto handling from ProtocolV2 into AuthStreamHandler.
Radoslaw Zarzynski [Wed, 23 Jan 2019 01:28:04 +0000 (02:28 +0100)]
msg/async: move crypto handling from ProtocolV2 into AuthStreamHandler.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agoauth, msg: dissect AuthStreamHandler from AuthSessionHandler.
Radoslaw Zarzynski [Tue, 22 Jan 2019 21:46:36 +0000 (22:46 +0100)]
auth, msg: dissect AuthStreamHandler from AuthSessionHandler.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agoauth/cephx: make _calc_signature() of CephxSessionHandler private.
Radoslaw Zarzynski [Wed, 23 Jan 2019 17:18:25 +0000 (18:18 +0100)]
auth/cephx: make _calc_signature() of CephxSessionHandler private.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agoauth: drop {en,de}crypt_message() from AuthSessionHandler.
Radoslaw Zarzynski [Tue, 22 Jan 2019 20:37:49 +0000 (21:37 +0100)]
auth: drop {en,de}crypt_message() from AuthSessionHandler.

Yeah, this means wire encryption isn't supposed for V1 anymore.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agoauth: introduce DummyAuthSessionHandler.
Radoslaw Zarzynski [Tue, 22 Jan 2019 20:27:19 +0000 (21:27 +0100)]
auth: introduce DummyAuthSessionHandler.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agoauth: make AuthSessionHandler purely abstract.
Radoslaw Zarzynski [Tue, 22 Jan 2019 19:19:25 +0000 (20:19 +0100)]
auth: make AuthSessionHandler purely abstract.

This is possible because the dropped state is/was required only by:
 * CephxSessionHandler,
 * methods removed by the previous commits.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agoauth: drop no_security() from AuthSessionHandler.
Radoslaw Zarzynski [Tue, 22 Jan 2019 18:59:46 +0000 (19:59 +0100)]
auth: drop no_security() from AuthSessionHandler.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agoauth: drop get_protocol() and get_key() from AuthSessionHandler.
Radoslaw Zarzynski [Tue, 22 Jan 2019 18:43:26 +0000 (19:43 +0100)]
auth: drop get_protocol() and get_key() from AuthSessionHandler.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agoauth: drop sign_bufferlist() from AuthSessionHandler.
Radoslaw Zarzynski [Tue, 22 Jan 2019 16:25:18 +0000 (17:25 +0100)]
auth: drop sign_bufferlist() from AuthSessionHandler.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: drop get_auth_meta() from Protocol.
Radoslaw Zarzynski [Tue, 22 Jan 2019 16:24:37 +0000 (17:24 +0100)]
msg/async: drop get_auth_meta() from Protocol.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 years agomsg/async: emphasize ProtocolV2 does authenticated encryption.
Radoslaw Zarzynski [Mon, 21 Jan 2019 23:37:59 +0000 (00:37 +0100)]
msg/async: emphasize ProtocolV2 does authenticated encryption.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
6 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>