Commit Graph

124497 Commits

Author SHA1 Message Date
Radoslaw Zarzynski
c862be649a crimson/osd: introduce more asserts to the Watch timeout handling.
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2021-06-21 23:58:36 +00:00
Patrick Donnelly
f27ec02a61
Merge PR #41860 into master
* refs/pull/41860/head:
	qa: log messages when falling back to force/lazy umount

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
2021-06-21 16:54:59 -07:00
Radoslaw Zarzynski
9e002f7d05 crimson/osd: fix construction of InternalClientRequest in DEBUG builds.
The assert in the ctor of `InternalClientRequest` actually operates on
the ctor's argument we `std::moved` from, not on the class' member.
When a debug build is used, this translates into failures like the one
below:

```
2021-06-16T22:53:03.410 INFO:journalctl@ceph.osd.6.smithi170.stdout:Jun 16 22:53:02 smithi170 conmon[43770]: ceph-osd: /home/jenkins-build/build/workspace/ceph-dev-new-
build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.0.0-4987-gec8844b6/rpm/el8/BUILD/ceph-17.0.0-4987-gec8844b6
/src/crimson/osd/osd_operations/internal_client_request.cc:19: crimson::osd::InternalClientRequest::InternalClientRequest(Ref<crimson::osd::PG>): Assertion `bool(pg)' f
ailed.
2021-06-16T22:53:05.363 INFO:journalctl@ceph.osd.6.smithi170.stdout:Jun 16 22:53:05 smithi170 conmon[43770]:  0# 0x0000558BE7BBF68F in /usr/bin/ceph-osd
2021-06-16T22:53:05.363 INFO:journalctl@ceph.osd.6.smithi170.stdout:Jun 16 22:53:05 smithi170 conmon[43770]:  1# FatalSignal::signaled(int, siginfo_t const*) in /usr/bi
n/ceph-osd
2021-06-16T22:53:05.363 INFO:journalctl@ceph.osd.6.smithi170.stdout:Jun 16 22:53:05 smithi170 conmon[43770]:  2# FatalSignal::install_oneshot_signal_handler<6>()::{lamb
da(int, siginfo_t*, void*)#1}::_FUN(int, siginfo_t*, void*) in /usr/bin/ceph-osd
2021-06-16T22:53:05.364 INFO:journalctl@ceph.osd.6.smithi170.stdout:Jun 16 22:53:05 smithi170 conmon[43770]:  3# 0x00007F8AD7535B20 in /lib64/libpthread.so.0
2021-06-16T22:53:05.364 INFO:journalctl@ceph.osd.6.smithi170.stdout:Jun 16 22:53:05 smithi170 conmon[43770]:  4# gsignal in /lib64/libc.so.6
2021-06-16T22:53:05.364 INFO:journalctl@ceph.osd.6.smithi170.stdout:Jun 16 22:53:05 smithi170 conmon[43770]:  5# abort in /lib64/libc.so.6
2021-06-16T22:53:05.364 INFO:journalctl@ceph.osd.6.smithi170.stdout:Jun 16 22:53:05 smithi170 conmon[43770]:  6# 0x00007F8AD5B2EC89 in /lib64/libc.so.6
2021-06-16T22:53:05.365 INFO:journalctl@ceph.osd.6.smithi170.stdout:Jun 16 22:53:05 smithi170 conmon[43770]:  7# 0x00007F8AD5B3CA76 in /lib64/libc.so.6
2021-06-16T22:53:05.365 INFO:journalctl@ceph.osd.6.smithi170.stdout:Jun 16 22:53:05 smithi170 conmon[43770]:  8# crimson::osd::InternalClientRequest::InternalClientRequ
est(boost::intrusive_ptr<crimson::osd::PG>) in /usr/bin/ceph-osd
2021-06-16T22:53:05.365 INFO:journalctl@ceph.osd.6.smithi170.stdout:Jun 16 22:53:05 smithi170 conmon[43770]:  9# crimson::osd::Watch::do_watch_timeout(boost::intrusive_ptr<crimson::osd::PG>) in /usr/bin/ceph-osd
2021-06-16T22:53:05.365 INFO:journalctl@ceph.osd.6.smithi170.stdout:Jun 16 22:53:05 smithi170 conmon[43770]: 10# seastar::noncopyable_function<void ()>::direct_vtable_for<crimson::osd::Watch::Watch(crimson::osd::Watch::private_ctag_t, boost::intrusive_ptr<crimson::osd::ObjectContext>, watch_info_t const&, entity_name_t const&, boost::intrusive_ptr<crimson::osd::PG>)::{lambda()#1}>::call(seastar::noncopyable_function<void ()> const*) in /usr/bin/ceph-osd
2021-06-16T22:53:05.366 INFO:journalctl@ceph.osd.6.smithi170.stdout:Jun 16 22:53:05 smithi170 conmon[43770]: 11# 0x0000558BED653759 in /usr/bin/ceph-osd
2021-06-16T22:53:05.366 INFO:journalctl@ceph.osd.6.smithi170.stdout:Jun 16 22:53:05 smithi170 conmon[43770]: 12# 0x0000558BED61B148 in /usr/bin/ceph-osd
2021-06-16T22:53:05.366 INFO:journalctl@ceph.osd.6.smithi170.stdout:Jun 16 22:53:05 smithi170 conmon[43770]: 13# 0x0000558BED61B576 in /usr/bin/ceph-osd
2021-06-16T22:53:05.366 INFO:journalctl@ceph.osd.6.smithi170.stdout:Jun 16 22:53:05 smithi170 conmon[43770]: 14# 0x0000558BED7C93C9 in /usr/bin/ceph-osd
2021-06-16T22:53:05.367 INFO:journalctl@ceph.osd.6.smithi170.stdout:Jun 16 22:53:05 smithi170 conmon[43770]: 15# 0x0000558BED326D5A in /usr/bin/ceph-osd
2021-06-16T22:53:05.367 INFO:journalctl@ceph.osd.6.smithi170.stdout:Jun 16 22:53:05 smithi170 conmon[43770]: 16# 0x0000558BED330E7E in /usr/bin/ceph-osd
2021-06-16T22:53:05.367 INFO:journalctl@ceph.osd.6.smithi170.stdout:Jun 16 22:53:05 smithi170 conmon[43770]: 17# main in /usr/bin/ceph-osd
2021-06-16T22:53:05.367 INFO:journalctl@ceph.osd.6.smithi170.stdout:Jun 16 22:53:05 smithi170 conmon[43770]: 18# __libc_start_main in /lib64/libc.so.6
2021-06-16T22:53:05.368 INFO:journalctl@ceph.osd.6.smithi170.stdout:Jun 16 22:53:05 smithi170 conmon[43770]: 19# _start in /usr/bin/ceph-osd
```

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2021-06-21 23:54:53 +00:00
Radoslaw Zarzynski
809c5d10a3 crimson/os: synchronize producers with consumers in AlienStore's queues.
Some time ago we replaced the single, `boost::lockfree`-based queue
in `ThreadPool` with the in-house, lockish `ShardedWorkQueue` vector.
Unfortunately, pushing into such queue isn't synchronized with
consuming from it -- the former happens without locking the `mutex`.
As the underlying primitive behind `ShardedWorkQueue::pending` is
plain `std::deque`, it's unsafe to operate that way in multi-thread
environment. Indeed, weirdly looking crashes have been spotted at Sepia:

```
(virtualenv) rzarzynski@teuthology:/home/teuthworker/archive/rzarzynski-2021-06-21_14:49:36-rados-master-distro-basic-smithi/6182668$ less ./remote/smithi196/log/ceph-osd.7.log.gz
...
 0# 0x000055862FD67ADF in ceph-osd
 1# FatalSignal::signaled(int, siginfo_t const*) in ceph-osd
 2# FatalSignal::install_oneshot_signal_handler<11>()::{lambda(int, siginfo_t*, void*)#1}::_FUN(int, siginfo_t*, void*) in ceph-osd
 3# 0x00007FB22CF36B20 in /lib64/libpthread.so.0
 4# 0x00005586357540E4 in ceph-osd
 5# 0x00007FB22CF36B20 in /lib64/libpthread.so.0
 6# pthread_cond_timedwait in /lib64/libpthread.so.0
 7# crimson::os::ThreadPool::loop(std::chrono::duration<long, std::ratio<1l, 1000l> >, unsigned long) in ceph-osd
 8# 0x00005586313E303B in ceph-osd
 9# 0x00007FB22CC51BA3 in /lib64/libstdc++.so.6
10# 0x00007FB22CF2C14A in /lib64/libpthread.so.0
11# clone in /lib64/libc.so.6
Fault at location: 0x18
daemon-helper: command crashed with signal 11
```

This fix introduces the synchronization to the `push_back()` method of
`ShardedWorkQueue`. The side effect is that it may stall the reactor.
Therefore, a follow-up change that switches to e.g. `boost::lockfree`
is expected.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2021-06-21 23:51:38 +00:00
Sage Weil
324a5ff589 vstart.sh: fix docker url
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 15:01:29 -04:00
Sage Weil
317143d8bf mgr/nfs: rename method
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
6fb9f0a391 qa/tasks/cephfs/test_nfs: test new export via apply
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
87c98df2cd doc/cephfs/fs-nfs-export: be consistent with cluster_id and _ vs -
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
729f2f6adf mgr/nfs: addr -> client_addr for 'nfs export create ...'
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
a2679b3884 mgr/nfs: fix tests
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
2400937ce2 mgr/nfs: 'nfs export get' -> 'nfs export info'
This is a breaking change, but aligns the CLI verbs with the rest of ceph.

Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
5a2382a5a8 mgr/nfs: binding -> pseudo_path
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
b276adbd47 mgr/nfs: more revisions based on review
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
9cf2ae5e8d mgr/nfs: adjust NFSExceptoin errno arg
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
f0798cf068 doc/cephfs: update 'nfs export {get,apply}' docs
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
1529f78ecf mgr/nfs: merge FSExport back into ExportMgr
This class captures no data, and the current methods cover both cephfs
and rgw exports.  There is little value to making the class separate from
ExportMgr.

Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
0907658f21 doc/radosgw/nfs: document mgr/nfs way to add/remove rgw exports
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
2cb2abb385 mgr/nfs: merge 'nfs export {update,import}' -> 'nfs export apply'
The only thing we lose is a strict 'update' that errors out if the
export didn't already exist, and we don't have any known need for that.

Fixes: https://tracker.ceph.com/issues/51265
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
69681f04ba mgr/nfs: test export creation and list
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
cfee205826 mgr/nfs: test export_update (+ fixes)
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
01a8d0ba3d mgr/nfs: test Export.validate(); several fixes
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
16c5cb62f7 mgr/nfs: test that export <-> block+dict conversions go both ways
Fixes: https://tracker.ceph.com/issues/50449
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
59587fd0b4 mgr/nfs: clean up test a bit
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
fdd47c476e mgr/nfs/export: fix export validation
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
473097a36f mgr/nfs/export: fix tests
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
d6d9e59ef7 mgr/nfs: handle option addr/client block in create_export()
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
aaa57afd29 mgr/nfs: allow multiple addrs for new exports
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
119555b84d mgr/nfs: fix/finish rgw export
- create the rgw keys for the export
- cleanup the rgw user on export deletion

Fixes: https://tracker.ceph.com/issues/47172
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
b549981063 mgr/nfs/module: clusterid -> cluster_id
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
6771de2204 mgr/nfs/export: fix export_update_1 to type check
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Yuval Lifshitz
201942f2d4 rgw/notification: make notifications agnostic of bucket reshard
Fixes: https://tracker.ceph.com/issues/51293

Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
2021-06-21 20:36:47 +03:00
Yuval Lifshitz
17cc2a4afc rgw/notification: send correct size in COPY events
Fixes: https://tracker.ceph.com/issues/51305

Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
2021-06-21 19:36:57 +03:00
Kefu Chai
5a26875049 os/bluestore/AvlAllocator: introduce bluestore_avl_alloc_ff_max_search_bytes
so AvlAllocator can switch from the first-first mode to best-fit mode
without walking through the whole space map tree. in the
highly-fragmented system, iterating the whole tree could hurt the
performance of fast storage system a lot.

the idea comes from openzfs's metaslab allocator.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-06-21 22:10:27 +08:00
Kefu Chai
40f05b971f os/bluestore/AvlAllocator: introduce bluestore_avl_alloc_ff_max_search_count
so AvlAllocator can switch from the first-first mode to best-fit mode
without walking through the whole space map tree. in the
highly-fragmented system, iterating the whole tree could hurt the
performance of fast storage system a lot.

the idea comes from openzfs's metaslab allocator.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-06-21 22:10:26 +08:00
Kefu Chai
87ab4d7afa
Merge pull request #41941 from tchaikov/wip-crimson-errorator-loop
crimson/common: extract parallel_for_each_state out

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2021-06-21 20:46:41 +08:00
Kefu Chai
596e1ca370
Merge pull request #41949 from tchaikov/wip-crimson-prometheus
crimson/osd: expose metrics using http server

Reviewed-by: Samuel Just <sjust@redhat.com>
2021-06-21 16:36:20 +08:00
Kefu Chai
80961c27d1 crimson/osd: expose metrics using http server
so, we can query the metrics using HTTP API, like

http://localhost:9180/metrics?name=io*

or

http://192.168.2.8:9180/metrics?name=io_queue_delay

or

http://localhost:9180/metrics

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-06-21 15:41:04 +08:00
Kefu Chai
175bb4d724
Merge pull request #41934 from cyx1231st/wip-seastore-onode-logs
crimson/onode-staged-tree: improve logs to understand inconsistent load from seastore

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Chunmei Liu <chunmei.liu@intel.com>
Reviewed-by: Xuehan Xu <xuxuehan@360.cn>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-06-21 12:34:02 +08:00
Yingxin Cheng
6673bf88a4 crimson/onode-staged-tree: print NodeExtent with the header
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
2021-06-21 10:08:46 +08:00
Yingxin Cheng
860ddba0f0 crimson/onode-staged-tree: validate node header when load
Add logs to detect corruptions when load nodes. assert() is not
informative enough to understand the context.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
2021-06-21 10:08:44 +08:00
Yingxin Cheng
366efc403e crimson/onode-staged-tree: delete copy constructor of DummyNodeExtent
Dummy backend is used for unit tests without transactions, so there
should be no copy-on-write behavior.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
2021-06-21 10:05:28 +08:00
Yingxin Cheng
512dac2c6e crimson/onode-staged-tree: add trace logs when start to load nodes
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
2021-06-21 10:05:20 +08:00
Amnon Hanuhov
ac7ab31ef6
Merge pull request #41861 from AmnonHanuhov/wip-Refactor_crimson_internals
crimson/net: Complete the refactor to std::unique_ptr inside Messenger

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Reviewed-by: Yingxin Cheng <yingxin.cheng@intel.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-06-20 21:30:36 +03:00
Chen Fan
0ffadad3a8 osd/OSD: mkfs need wait for transcation completely finish
when do ceph-osd mkfs, when ceph-osd process exit, sometimes
the block data could be written incompletely. we need add
wait for it complete.

Signed-off-by: Chen Fan <fan.chen@easystack.cn>
2021-06-21 00:11:20 +08:00
Aaryan Porwal
ad5b3f2005 mgr/dashboard: telemetry activate: show ident fields when checked
Signed-off-by: Aaryan Porwal <aaryanporwal2233@gmail.com>
2021-06-20 12:17:03 +05:30
Kefu Chai
230a1c4113
Merge pull request #41921 from gregsfortytwo/wip-mon-stretch-crush-rule
mon: Sanely set the default CRUSH rule when creating pools in stretch…

Reviewed-by: Samuel Just <sjust@redhat.com>
2021-06-19 22:57:07 +08:00
Amnon Hanuhov
bb71ebbb19 tools/crimson: Use crimson::make_message() in perf_crimson_msgr
Instead of ceph::make_message() because conn::send() in crimson expects
a std::unique_ptr and not boost::intrusive_ptr

Signed-off-by: Amnon Hanuhov <ahanukov@redhat.com>
2021-06-19 17:56:13 +03:00
Kefu Chai
6733d767dd
Merge pull request #41845 from agayev/zoned-revise-per-zone-naming-scheme
os/bluestore: Revise the naming scheme for per-zone cleaning informat…

Reviewed-by: Igor Fedotov <ifedotov@suse,com>
2021-06-19 22:54:25 +08:00
Amnon Hanuhov
84265a695b test/crimson: Use crimson::make_message() in test_alien_echo
Instead of ceph::make_message() because conn::send() in crimson expects
a std::unique_ptr and not boost::intrusive_ptr

Signed-off-by: Amnon Hanuhov <ahanukov@redhat.com>
2021-06-19 17:52:54 +03:00
Kefu Chai
e05f186abc
Merge pull request #41830 from tchaikov/wip-ceph-argparse-cleanup
pybind/ceph_argparse: cleanups preparing for type annotations

Reviewed-by: Sebastian Wagner <sewagner@redhat.com>
2021-06-19 22:51:59 +08:00