Kefu Chai [Wed, 29 Aug 2018 07:38:25 +0000 (15:38 +0800)]
cmake/modules/BuildDPDK.cmake: link whole-archive
we build dpdk as static library, linking against them without specifying
--whole-archive will get the constructor symbols droppped by the linker
as they are not referenced directly by the excecutable. so we need to do
so to make sure we call all the constructors.
Kefu Chai [Tue, 21 Aug 2018 04:12:46 +0000 (12:12 +0800)]
msg/async: do not include dpdk headers in public header
before this change, async/Stack.cc includes DPDKStack.h, which in
turn includes dpdk headers. this practically renders the dpdk::dpdk an
PUBLIC library of common_async_dpdk. as dpdk needs to be compiled
with -march=core2, we should constrain the scope of this compiler
option. hence this change.
Kefu Chai [Mon, 20 Aug 2018 14:11:02 +0000 (22:11 +0800)]
cmake: fix the build WITH_DPDK=ON
* add Findcryptopp.cmake back
cryptopp support was dropped in #20015, but it's required by
src/msg/async/dpdk/TCP.h, which `#include <cryptopp/md5.h>`
so, to fix the FTBFS of WITH_DPDK=ON, we need to bring
Findcryptopp.cmake back. it was also removed in #20015.
* pass "-march=core2" when building sources which include dpdk headers.
i was wrong that the headers shipped by distro are generic.
the headers use the sse instructions for speedup memcpy, see
/usr/include/x86_64-linux-gnu/dpdk/rte_memcpy.h .
* also, we need to include the arch specific include directory
for building with dpdk.
Kefu Chai [Tue, 28 Aug 2018 06:48:28 +0000 (14:48 +0800)]
include/types: move operator<< into the proper namespace
we should define the operator<< in the namespace of its 2nd parameter.
normally, the operator<< defined in the global namespace works. but
there is a subtle difference between the operator<< defined in std
namespace and the global one because of Koenig lookup.
mon/OSDMonitor: don't change in-memory state on prune
We were modifying the in-memory state when running through several
osdmap pruning functions.
Should the transaction we're encoding not be committed, we may end up in
a state where we have a stale in-memory state that does not match what
is on disk; including having in-memory state while not having on-disk
state.
We prevent this sort of inconsistency by working on temporary states
instead.
Fixes: http://tracker.ceph.com/issues/24612 Signed-off-by: Joao Eduardo Luis <joao@suse.de>
Jason Dillaman [Fri, 17 Aug 2018 14:17:55 +0000 (10:17 -0400)]
librbd: always open first parent image if it exists for a snapshot
The deep-copy and migration features required force-opening the
parent image just in case the deep-flatten feature wasn't enabled
on an image. This change simplies the code by always opening the
direct parent image, which really only matters if a cloned image
has snapshots w/o the deep-flatten feature.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Sage Weil [Mon, 27 Aug 2018 20:31:43 +0000 (15:31 -0500)]
Merge PR #23718 into master
* refs/pull/23718/head:
cleanup: Replace always-false assertions with abort
include/assert: Smarten up ceph_assert
common: Call ceph_abort(), not abort()
include,common: Remove assert and clobber-foo
rbd_replay: Use ceph_assert for asserts.
rbd_fuse: Use ceph_assert for asserts.
osdc: Use ceph_assert for asserts.
osd: Use ceph_assert for asserts.
msg: Use ceph_assert for asserts.
mgr: Use ceph_assert for asserts.
messages: Use ceph_assert for asserts.
mds: Use ceph_assert for asserts.
log: Use ceph_assert for asserts.
libradosstriper: Use ceph_assert for asserts.
librados: Use ceph_assert for asserts.
kv: Use ceph_assert for asserts.
test: Use ceph_assert for asserts.
key_value_store: Use ceph_assert for asserts.
json_spirit: Use ceph_assert for asserts.
journal: Use ceph_assert for asserts.
global: Use ceph_assert for asserts.
erasure-code: Use ceph_assert for asserts.
rbd: Use ceph_assert for asserts.
tools: Use ceph_assert for asserts.
rgw: Use ceph_assert for asserts.
mon: Use ceph_assert for asserts.
crush: Use ceph_assert for asserts in C++ code.
crimson: Use ceph_assert for asserts.
compressor: Use ceph_assert for asserts.
cls: Use ceph_assert for asserts.
client: Use ceph_assert for asserts.
auth: Use ceph_assert for asserts
os: Use ceph_assert for asserts
common: Use ceph_assert for asserts
include: Use ceph_assert for asserts
include/assert: Deprecate assert macro
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com> Reviewed-by: Sage Weil <sage@redhat.com>
Sage Weil [Tue, 7 Aug 2018 17:59:25 +0000 (12:59 -0500)]
mon: only share monmap after authenticated
It is no longer necessary to fetch a monmap pre-authentication, something
we previous did for get_monmap_privately(). New code has replaced this
with get_monmap_and_config(), and it authenticates in order to get that
same information (plus configs).
That change was made in mimic, but we must support upgrades from N-2,
which means that luminous daemons still need to function. The only caller
for get_monmap_privately() in luminous is from ceph-osd during mkfs.
Disabling this here means that new OSDs cannot be created using nautilus
mons and a luminous ceph-osd. Include a note for the (future) nautilus
upgrade notes.
Reported-by: Christopher Ryan Harrell <harrellcr@email.arizona.edu> Signed-off-by: Sage Weil <sage@redhat.com>
Kefu Chai [Mon, 27 Aug 2018 09:41:16 +0000 (17:41 +0800)]
doc/dev/cephx_protocol: fix couple errors
there are 3 phases of authentication and authorization in cephx:
0. proto = CEPH_AUTH_UNKNOWN, for start the session,
create auth handlers on both sides.
1. GET_AUTH_SESSION_KEY, to get authenticated, the client will
get the session ticket at the end of this phase. the session ticket,
is actually also a service ticket for CEPH_ENTITY_TYPE_AUTH.
2. CEPHX_GET_PRINCIPAL_SESSION_KEY, to get authorized, the client
will get the requested, service tickets at the end of this phase.
Patrick Donnelly [Sat, 25 Aug 2018 20:14:09 +0000 (13:14 -0700)]
Merge PR #23088 into master
* refs/pull/23088/head:
mds: adjust export size after renaming directory into freezing subtree
mds: clear scatterlock's flushed when removing dirty
mds: export subtree part by part
mds: change default mds_max_export_size to 20M
mds: limit total size of exporting subtrees
mds: optimize the way how max export size is enforced
mds: make CInode::get_dirfrags container agnostic
mds: cleanup MutationImpl::More initialization
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Patrick Donnelly [Sat, 25 Aug 2018 20:04:43 +0000 (13:04 -0700)]
Merge PR #23439 into master
* refs/pull/23439/head:
qa: whitelist cap revoke warning
doc: document cap revoke non-responders client eviction
test: validate client eviction for cap revoke non-responders
mds: add counter for tracking cap non-responding clients
mds: evict clients that do not respond to cap revoke by MDS
mds: pass timeout argument for fetching late clients
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com> Reviewed-by: Zheng Yan <zyan@redhat.com>