Commit Graph

115717 Commits

Author SHA1 Message Date
Amrita
1d640540e7 doc: Bucket notifications in the radosgateway-the usage of 'if not' is vague and creates confusion from a user perspective.
Signed-off-by: Amrita Sakthivel <asakthiv@redhat.com>
2020-09-22 16:50:04 +05:30
Kefu Chai
b33e414000
Merge pull request #37293 from changchengx/osd_comment
osd: fix wrong comment about setting auth_client for messenger

Reviewed-by: Kefu Chai <kchai@redhat.com>
2020-09-22 17:46:09 +08:00
Kefu Chai
70b16d5b01 crimson/osd: do not add ref when constructing MessageRef
crimson::osd::PG::send_cluster_message() accepts a `Message*`
pointer, and then hand it over to `shard_services.send_to_osd()`,
which expects a `Ref<Message>`. so the raw pointer is used to
construct an `intrusive_ptr<Message>`, which increment the
refcount of that Message instance by one. but that Message
was owned by nobody before that, so we end up with an
`intrusive_ptr<Message>` of 2 refcount, and only a single
owner. hence the memory leak.

in this change, instructs the constructor to not add the refcount.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-22 17:13:21 +08:00
Kefu Chai
a631510d4f crimson/mon: do not set_value() again
once the continuation consuming the stored value of the associated
future, we cannot set_value() again. otherwise, ASan complains that we
are accessing the memory on heap after it is freed.

in this change, std::optional<> is used for holding
promise<auth_result_t>, once the promise is fulfilled, `auth_done` is
reset to prevent another call of `set_value()` or `set_exception()`.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-22 17:13:21 +08:00
Zac Dover
f0d1ba50ce doc/dev: updated date from 2016
This updates a date from 2016 to 2020,
so that readers can be confident that the
procedure that they're reading has been recently
tested.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
2020-09-22 19:10:15 +10:00
Kefu Chai
182f6db9b1 crimson/mon: only finish auth when auth is completed
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-22 17:07:47 +08:00
Kefu Chai
bfe1a42c79 crimson/mon: s/AuthResult/auth_result_t/
auth_result_t is merely an enum, so make it like so.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-22 17:07:47 +08:00
Kefu Chai
70ba744667 crimson/mon: extract mon::Client::_finish_auth()
for better readability

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-22 17:07:47 +08:00
Changcheng Liu
072b552173 osd: correct comment about setting auth_client for messenger
client_messenger's auth_client has not been set until call
monc->init();

Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
2020-09-22 15:41:34 +08:00
Lenz Grimmer
ab53b20db6
Merge pull request #37152 from rhcs-dashboard/bottom-links-component
mgr/dashboard: Creating a new Login Page Legal Links Component

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
2020-09-22 09:23:32 +02:00
Changcheng Liu
1e9b18008c mon: set MonClient::_add_conn return type to void
The new created MonConnection are refered through
MonClient::pending_cons instead of through the return
value.

Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
2020-09-22 15:15:07 +08:00
Kiefer Chang
ba3350c7e8
mgr/dashboard: display devices' health information within a tabset
Wrap all devices' health information within a tabset
instead of displaying them from top to bottom.

Add more guard in the HTML template to prevent referencing undefined
variables.

Fixes: https://tracker.ceph.com/issues/47494
Fixes: https://tracker.ceph.com/issues/43177

Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
2020-09-22 14:38:34 +08:00
Kefu Chai
597ef5ea9a
Merge pull request #37291 from badone/wip-docker-test-helper-fixes
test/docker-test: helper fixes and support more distro releases

Reviewed-by: Kefu Chai <kchai@redhat.com>
2020-09-22 14:17:23 +08:00
Brad Hubbard
063763665f test: Add support for fedora 32, 33 and Ubuntu 20.04
Enable creation and use of these OS images in docker-test.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2020-09-22 13:24:26 +10:00
Brad Hubbard
c0e6c64fba tests: Make sure install-deps is run noninteractively
This gets past things like tzconfig stopping for user input.
Remove redundant install of python-virtualenv.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2020-09-22 13:24:26 +10:00
Kefu Chai
e806c4085d
Merge pull request #37200 from tchaikov/wip-crimson-with-lock
crimson/common: add helpers for seastar::with_lock()

Reviewed-by: Samuel Just <sjust@redhat.com>
2020-09-22 10:53:48 +08:00
Kefu Chai
77cc91a4ba run-make-check.sh: fix syntax error
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-22 10:17:56 +08:00
Kefu Chai
4aced0cba9
Merge pull request #37211 from tchaikov/wip-zbd
rpm,install-deps,run-make-check: enable WITH_ZBD build on demand

Reviewed-by: Neha Ojha <nojha@redhat.com>
2020-09-22 09:42:09 +08:00
Brad Hubbard
d5cbf38dbc test/centos-8: Install git before running install-deps
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2020-09-22 10:30:01 +10:00
Brad Hubbard
ac20919c6c test/docker-test: Fix permissions issue when using podman
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2020-09-22 10:28:09 +10:00
Patrick Donnelly
e15e825f85
Merge PR #36776 into master
* refs/pull/36776/head:
	systemd: Support Graceful Reboot for AIO Node

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: David Disseldorp <ddiss@suse.de>
2020-09-21 15:26:22 -07:00
Patrick Donnelly
6547276ec3
Merge PR #37227 into master
* refs/pull/37227/head:
	qa/cephfs: don't pass args to destroy() in recreate()

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2020-09-21 14:04:06 -07:00
Patrick Donnelly
c46bf97646
Merge PR #37233 into master
* refs/pull/37233/head:
	qa/mgr: revert a patch from commit 04ed58f

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
2020-09-21 14:03:32 -07:00
Jason Dillaman
94d43165ed osdc/ObjectCacher: overwrite might cause stray read request callbacks
In librbd, if readahead is active, there might be a pending read request
for the cache which is then (partially) overwritten by a write request.
This overwrite will cause bh splits and merges which can cause the
bh read callback to fail to invoke the pending read callbacks.

Fixes: https://tracker.ceph.com/issues/46822
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-21 14:10:07 -04:00
Samuel Just
d257bf0e04
Merge pull request #37271 from cyx1231st/wip-seastore-fix-non-repeatable-read
crimson/seastore: fix potential non-repeatable-read from RootBlock

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Ronen Friedman <rfriedma@redhat.com>
2020-09-21 10:57:43 -07:00
Ilya Dryomov
6827bbbcfb
Merge pull request #36927 from idryomov/wip-krbd-noudev
krbd: optionally skip waiting for udev events

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Sébastien Han <seb@redhat.com>
2020-09-21 19:39:30 +02:00
Kefu Chai
fd779c3600 rpm: add fmt-devel as build deps
since libfmt > 5.0.0 is packaged by CentOS/RHEL8 and openSUSE/SLE
we can just use it instead of our own version. also, since libfmt is
used out side of crimson project, no need to guard it using "with
seastar" anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-22 01:01:51 +08:00
Patrick Donnelly
24e2e668e1
Merge PR #37213 into master
* refs/pull/37213/head:
	mgr/rook: Pass pod namespace to list_namespaced_pod()

Reviewed-by: Travis Nielsen <tnielsen@redhat.com>
2020-09-21 09:48:28 -07:00
Lenz Grimmer
1c4f3478fc
Merge pull request #37101 from LenzGr/master-documentation
doc: Updated `HACKING.rst` and `README.rst`

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
2020-09-21 17:58:03 +02:00
Mykola Golub
96bc20445a librbd: track complete async operation return code
Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-09-21 14:39:46 +01:00
Lenz Grimmer
6279196e05
Merge pull request #37137 from tspmelo/wip-fix-iscsi-tests
mgr/dashboard: Fix iSCSI backend unit-test

Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
2020-09-21 14:33:19 +02:00
Kefu Chai
743b5bda65 blk/kernel: retry forever if bdev_flock_retry is 0
retry forever if cct->_conf->bdev_flock_retry is 0.
systemd-udevd is most likely the reason why ceph-osd fails to
acquire the flock when "mkfs", because systemd-udevd probes
all block devices when the device changes in the system using
libblkid, and when systemd-udevd starts looking at the device
it takes a `LOCK_SH|LOCK_NB` lock. and it releases the lock
right after done with it. so normally, it only takes a jiffy,
see
ee0b9e721a/src/shared/lockfile-util.c (L18)
so, we just need to retry couple times before acquiring the
lock.

Fixes: https://tracker.ceph.com/issues/46124
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-21 20:32:32 +08:00
Jason Dillaman
58db5bfa6f
Merge pull request #37262 from trociny/wip-rbd-nbd-quiesce-hook
rbd-nbd: fix typo in mini help

Reviewed-by: Jason Dillaman <dillaman@rehdat.com>
2020-09-21 08:19:08 -04:00
Kefu Chai
ec7fa39624 blk/kernel: use open file description lock if available
* use OFD lock if available. OFD is Linux specific, and only available
  on 3.15 kernels. OFD is able to synchronize both threads and
  processes. and has simpler semantics. this is just a cleanup.
  as we don't create threads for acquiring the flock.
* use BSD flock(2) as a fallback
* return the errno right away, without printing logging messages.
  for two reasons:
  - writing logging messages would reset the errno.
  - the caller of _lock() also prints the logging messages along
    with strerror(errno)

Fixes: https://tracker.ceph.com/issues/46124
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-21 20:17:36 +08:00
Kefu Chai
8fb80db9ff blk/kernel: use uint64_t for bdev_flock_retry
also drop bdev_flock_retry and bdev_flock_retry_interval from
legacy_config_opts.h, as `KernelDevice::_lock()` is not in the critical
path, there is no need to access these settings via member variables --
get_val<> would just suffice.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-21 20:17:36 +08:00
Kefu Chai
bcb197d5d8 blk/kernel: use sleep_for()
instead of relying on utime_t, use standard library directly.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-21 20:17:36 +08:00
Lenz Grimmer
529ff10c1d
Merge pull request #35785 from rhcs-dashboard/wip-45957-consolidate_Osd_Endpoints
mgr/dashboard: Consolidate Osd mark endpoints

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
2020-09-21 13:59:48 +02:00
Ilya Dryomov
d2884adb15 qa: add test for mapping and unmapping from a network namespace
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2020-09-21 13:54:08 +02:00
Jason Dillaman
5bb9c5ecc7 osdc/Objecter: fix list-snaps op implementation under neorados
The snapshot sequence for the CloneInfo structs was never populated
which resulted in a corrupt SnapSet.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-21 07:51:56 -04:00
Jason Dillaman
7758782380 librbd: don't attempt to read from object snapshots known to not exist
If there is an issue with the list-snaps command that results in a forced
read of the full object, don't attempt to read from any snapshots that
are known to not exist. This can occur if cache-tiering does not have the
full snapshot context or if there is a bug in the list-snaps op
implementation.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-21 07:51:56 -04:00
Jason Dillaman
cc87a8bd69 librbd: deep-copy object utilizes image-extent IO methods
The state machine now lists the snaps for the full overlap image-extent
using the new list-snaps API. Additionally, read operations are handled
via the image-extent read API.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-21 07:51:56 -04:00
Jason Dillaman
e721dab66b librbd: optionally exclude any zeroed extents from object list-snaps
When listing parent snapshots we only care about data extents and not
about zeroed or missing extents.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-21 07:51:56 -04:00
Jason Dillaman
a99c69829f librbd: sparse bufferlist read should return image-based extent map
It's currently returning a buffer-based extent map which is fine under
the existing use-case for copy-up but it does not support more advanced
features that need to know the actual image-extents for any data.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-21 07:51:56 -04:00
Jason Dillaman
b5b3007d40 librbd: pass read flags via image-extent dispatch layers
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-21 07:51:56 -04:00
Jason Dillaman
63cd9dfa14 librbd: optionally disable read-from-parent for object-extent IO requests
Deep-copy (and eventually crypto) will need a way to prevent read-from-parent
IO requests. This introduces an optional flag at the object-extent IO layer
to disable that functionality.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-21 07:51:56 -04:00
Jason Dillaman
4429ed4f3f librbd: switch diff iterate API to use new snaps list dispatch methods
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-21 07:51:55 -04:00
Jason Dillaman
66dd53d9c4 librbd: optionally return full object extent for any snapshot deltas
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-21 07:51:55 -04:00
Jason Dillaman
6801e905c9 librbd: list and merge parent snapshot deltas
If a given object does not exist, optionally map the
object's extents to the parent image and request the snapshot
deltas from the parent chain.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-21 07:51:55 -04:00
Jason Dillaman
d610f3164e librbd: skeleton implementation of image snap list dispatch hooks
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-21 07:51:55 -04:00
Jason Dillaman
faf70f3fda librbd: generic image-extent list snapshot request
Convert image extents to object-extents and issue list snapshot requests
against each object. Once all the results are available, assemble the
snapshot deltas back into image extents.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-21 07:51:55 -04:00