Commit Graph

92449 Commits

Author SHA1 Message Date
Sage Weil
e313ce52a7 osd: guardedly_lock -> std::lock_guard
Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:33 +08:00
Sage Weil
7ef8ca214e common/ContextCompletion: Mutex -> ceph::mutex
Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:33 +08:00
Sage Weil
b4cf8aaf07 common/WorkQueue: Mutex -> ceph::mutex
Lots of #include push-downs as a result.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:33 +08:00
Sage Weil
6bc6260c10 common/WorkQueue: drop unused get_lock()
Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:33 +08:00
Sage Weil
afa10a7c16 common/config: push down Mutex #include
Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:33 +08:00
Sage Weil
42e0e53be2 common/Semaphore: Mutex -> ceph::mutex
Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:33 +08:00
Sage Weil
774e67a126 common/Readahead: Mutex -> ceph::mutex
Still need to kill C_SaferCond later.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:33 +08:00
Sage Weil
a0f8b49ca1 common/config_proxy: Mutex -> ceph::mutex
Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:33 +08:00
Sage Weil
28e1a69b8b common: std::lock_guard<...> -> std::lock_guard
Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:33 +08:00
Sage Weil
69bcd059a7 common/TrackedOp: Mutex -> ceph::mutex
Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:33 +08:00
Sage Weil
03db8801b1 common/TracepointProvider: Mutex -> ceph::mutex
Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:33 +08:00
Sage Weil
ea2cd7bd13 common/QueueRing: Mutex -> ceph::mutex
Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:33 +08:00
Sage Weil
5537e6ee45 common/RefCountedObj: Mutex -> ceph::mutex
Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:33 +08:00
Sage Weil
eff769117e common/PluginRegistry: Mutex -> ceph::mutex
Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:32 +08:00
Sage Weil
d7fb588c5d common/perf_counters: Mutex -> ceph::mutex
Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:32 +08:00
Sage Weil
ea72b75088 common/lru_map: Mutex -> ceph::mutex
Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:32 +08:00
Sage Weil
8f58cef09a common/OutputDataSocket: Mutex -> ceph::mutex
Fix race on cond wait too.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:32 +08:00
Sage Weil
dc3571a21e common/AsyncReserver: Mutex -> ceph::mutex
Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:32 +08:00
Sage Weil
b154f69b79 common/LogClient: Mutex -> ceph::mutex
Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:32 +08:00
Sage Weil
98ccadfc41 common/AsyncOpTracker: Mutex -> ceph::mutex
Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:32 +08:00
Sage Weil
7c4ce371fd common/ceph_context: Mutex -> ceph::mutex
Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:32 +08:00
Sage Weil
755d0f4f0b common/dns_resolver: Mutex -> ceph::mutex
Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-21 11:56:32 +08:00
Sage Weil
d0810de25b Merge PR #25167 into master
* refs/pull/25167/head:
	mgr: Diskprediction local activate when config changes

Reviewed-by: Sage Weil <sage@redhat.com>
2018-11-20 17:35:16 -06:00
Sage Weil
2ec2c5ef9e Merge PR #24795 into master
* refs/pull/24795/head:
	qa/tasks/ceph: gather crash dumps
2018-11-20 17:34:54 -06:00
Sage Weil
28aaca58e7 qa/tasks/ceph_manager: avoid test_map_discontinuity stall with too few up osds
Some tests have m=2,k=2 and this will break them.  Sometimes even if we
have 5 up osds, we end up with 4 and CRUSH gets picky, so build in a
buffer and only do this if we have 6 up.

We don't have an easy way from here to see what the min up osds for healthy
is...  basically this map discontinuity test just sucks.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-20 17:12:43 -06:00
Yuri Weinstein
1b9f62513b
Merge pull request #14369 from rzarzynski/wip-rgw-19514
rgw: fix wrong debug related to user ACLs in rgw_build_bucket_policies()

Reviewed-by: Adam Emerson <aemerson@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
2018-11-20 14:01:41 -08:00
Yuri Weinstein
9c873b2a2d
Merge pull request #16658 from rzarzynski/wip-rgw-20795
rgw: Swift's TempURL can handle temp_url_expires written in ISO8601.

Reviewed-by: Matt Benjamin <mbenjami@redhat.com>
2018-11-20 14:00:57 -08:00
Yuri Weinstein
e682970f35
Merge pull request #19684 from taoCH/wip-librgw-symbolic-link
librgw: support symbolic link

Reviewed-by: Matt Benjamin <mbenjami@redhat.com>
2018-11-20 14:00:41 -08:00
Mykola Golub
b5ebe10f5f mgr/osd_perf_query: improvements for testing module
Signed-off-by: Mykola Golub <mgolub@suse.com>
2018-11-20 20:59:01 +02:00
Robin H. Johnson
e63e210679
Merge pull request #22599 from anthonyeleven/patch-2
doc: Tidy up description wording and spelling
2018-11-20 09:44:04 -08:00
Sage Weil
f3c27670c0 Merge PR #24737 into master
* refs/pull/24737/head:
	doc/ceph-bluestore-tool: add help for migrate and new DB/WAL commands.

Reviewed-by: Sage Weil <sage@redhat.com>
2018-11-20 09:50:04 -06:00
Lenz Grimmer
1334e194f9
Merge pull request #25010 from nathan-weinberg/breadcrumb-tests
mgr/dashboard: Added additional breadcrumb tests to Cluster

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
2018-11-20 16:36:48 +01:00
Lenz Grimmer
7c5ce8b87b
Merge pull request #25141 from rhcs-dashboard/wip-37293-master
mgr/dashboard: Fix Forbidden Error with some roles

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Ricardo Dias <rdias@suse.com>
2018-11-20 16:34:59 +01:00
Kefu Chai
ebfa2df2d5 cmake: do not pass unnecessary param to setup.py
--single-version-externally-managed is used for packaging python eggs
to deb. so the metadata can be stored in the egg, and can be accessed
by user if necessary, see [1]. but this does not apply to users who
just want to "make install" without packaging Ceph.

the problem is, if we pass --single-version-externally-managed to
setup.py, we need to pass --record or --root also. otherwise setuptools
complains:

error: You must specify --record or --root when building system packages

so in this change, we choose not to pass
"--single-version-externally-managed", unless $DESTDIR is set.

both "ceph.spec.in" and "debian/rules" set $DESTDIR when running "make
install". so we can always check $DESTDIR to tell if current "make
install" is launched by the packaging script or not. this might not be
accurate, but good enough. assuming enduser does not use DESTDIR when
running plain "make install".

--
[1] https://wiki.debian.org/Python/FAQ#How_should_we_package_Python_eggs.3F

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-11-20 22:20:41 +08:00
Sage Weil
2b3f4da14a auth/AuthSessionHandler: no handler if no session key
If there is no session key, then we should not instantiate a session
handler, or else we'll later crash with something like

     0> 2018-11-19 08:52:27.787 7f6b305e4700 -1 /home/sage/src/ceph.mimic/src/auth/Crypto.h: In function 'std::size_t CryptoKey::encrypt(CephContext*, const in_slice_t&, const out_slice_t&)' thread 7f6b305e4700 time 2018-11-19 08:52:27.784394
/home/sage/src/ceph.mimic/src/auth/Crypto.h: 164: FAILED assert(ckh)

 ceph version 13.2.2-411-g4bfd25addd (4bfd25addd) mimic (stable)
 1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x102) [0x7f6b36ad7e72]
 2: (()+0x2ab007) [0x7f6b36ad8007]
 3: (CephxSessionHandler::_calc_signature(Message*, unsigned long*)+0x297) [0x7f6b36e13007]
 4: (CephxSessionHandler::check_message_signature(Message*)+0x6b) [0x7f6b36e131ab]
 5: (AsyncConnection::process()+0x1dc5) [0x7f6b36bfbc55]
 6: (EventCenter::process_events(unsigned int, std::chrono::duration<unsigned long, std::ratio<1l, 1000000000l> >*)+0x6a5) [0x7f6b36c0abb5]

The specific scenario is:

- new (nautilus) OSD connects to heartbeat port on an older OSD (<= mimic)
and sends an authorizer
- mimic osd ms_verify_authorizer succeeds, but does not set up the
session key because mimic doesn't care.. it blindly sets isvalid = true.
- mimic osd later creates a session handler
- mimic osd later tries to validate a message and crashes

The fix is to not instantiate the session handler if there is no key. Note
that this happens *after* we have authenticated the request (called
ms_verify_authorizer), which is responsible for populating the session
key while verifying the authorizer (if it is authenticating at all), so
this session_key is always set on an authenticated connection.

Fixes: http://tracker.ceph.com/issues/36443
Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-20 08:18:59 -06:00
Nathan Cutler
8ea39207bf build/ops: rpm: add link to doc explaining bcond syntax
The %bcond_with and %bcond_without macros are confusing to folks who
don't do a lot of RPM packaging work. Let's try to help these folks out!

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-11-20 15:01:44 +01:00
Nathan Cutler
7d4916618c build/ops: rpm: stop install-deps.sh clobbering spec file Python build setting
Fedora 29 still ships a Python 2 binary, but some of Ceph's build
dependencies are only available in py3 versions there. In other
words, from F29 on, it is no longer possible to do a py2 Ceph build
on Fedora, even if a python2 binary exists on the system.

If that were not enough, the Python 2 that ships with Fedora 29 is
linked against a non-compatible version of OpenSSL.

Before this commit, install-deps.sh was overriding the spec file's
Python build setting based on the presence or absence of a python2
binary. As the bug cited below indicates, this was not a good idea.

It's better for the spec file to be explicit about which OS versions
are py2 and which are py3, and just stick to that.

Fixes: http://tracker.ceph.com/issues/37301
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-11-20 15:00:48 +01:00
Kefu Chai
0a0e9f0179
Merge pull request #25176 from cyx1231st/wip-crimson-msgr-extract-states
crimson/net: encapsulate protocol implementations with states

Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-11-20 21:58:37 +08:00
Yingxin
4da176a787 crimson/net: remove recursive call to handle_connect_reply()
Signed-off-by: Yingxin <yingxin.cheng@intel.com>
2018-11-20 22:18:01 +08:00
Yingxin
b4a83826ba crimson/net: fix minor issue and add TODO for error-handling
Signed-off-by: Yingxin <yingxin.cheng@intel.com>
2018-11-20 22:07:57 +08:00
Kefu Chai
e411f89ca6 crimson/net: extract state transition out of repeat_connect()
and extract state transition out of repeat_handle_connect()

in this change, the connect/handle-connect loop is restructured, to
avoid ad-hoc state changes in helper functions. this pave the road to
explicit state transtion using named states.

also, exception is thrown instead in handle_connect_reply(), we should
not proceed in case of failures. and we need do error handling in the
named state in future.

currentl, `state` is set to `state_t::open` in `start_connect()` and
`start_accept()`, the next step is to set it in a named state.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-11-20 22:00:08 +08:00
Lenz Grimmer
6e95664ead
Merge pull request #25149 from p-na/pna-fix-safe-to-destroy
mgr/dashboard: Fix failing QA test: test_safe_to_destroy

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
2018-11-20 14:33:42 +01:00
Kefu Chai
23c0524c96 crimson/net: define an alias of seastar::stop_iteration
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-11-20 21:08:29 +08:00
Yingxin
c014f702d9 crimson/net: check short reads in read_exactly()
Signed-off-by: Yingxin <yingxin.cheng@intel.com>
2018-11-20 20:58:34 +08:00
Sage Weil
75f17a222b Merge PR #24844 into master
* refs/pull/24844/head:
	osd: drop PGBackend::Listener::get_epoch().
	osd: massively switch to get_osdmap_epoch().
	osd: switch the return type of PG::get_osdmap().

Reviewed-by: Sage Weil <sage@redhat.com>
2018-11-20 06:51:29 -06:00
Sage Weil
b84730a921 Merge PR #24867 into master
* refs/pull/24867/head:
	mon: compensate for not having STDLIB_MAP_SPLICING

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: João Eduardo Luís <joao@suse.de>
2018-11-20 06:50:50 -06:00
Sage Weil
c872e42657 Merge PR #24929 into master
* refs/pull/24929/head:
	osd: set lower bound+docs on osd_max_write_size

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2018-11-20 06:50:33 -06:00
Sage Weil
9b3d909046 Merge PR #25058 into master
* refs/pull/25058/head:
	mgr: Fixed devicehealth plugin resource leak

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2018-11-20 06:50:17 -06:00
Sage Weil
d7ed1ccf48 Merge PR #25125 into master
* refs/pull/25125/head:
	mon: require keyring even if cephx is optional

Reviewed-by: Sage Weil <sage@redhat.com>
2018-11-20 06:49:54 -06:00
Sage Weil
4c0632df91 qa/tasks/ceph: gather crash dumps
Gather crash dumps as part of the teuthology run.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-11-20 06:49:20 -06:00