Commit Graph

115717 Commits

Author SHA1 Message Date
Daniel Gryniewicz
7d2e36845b Fix missing req_state for librgw
One of the zipper commits broke the declaration of req_state.

Fixes issue #47520

Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
2020-09-18 10:52:02 -04:00
Lenz Grimmer
de3c66c568 doc: Updated HACKING.rst and README.rst
Replaced the content of `HACKING.rst` in the dashboard source code
directory with a pointer to the new location in the developer guide.

Updated references in `README.rst` to also point to the online versions
of these files.

Fixes: tracker.ceph.com/issues/47396

Signed-off-by: Lenz Grimmer <lgrimmer@suse.com>
2020-09-18 15:15:34 +02:00
Joshua Schmid
76e5020b10 cephadm: capadd and privileged are mutex
Signed-off-by: Joshua Schmid <jschmid@suse.de>
2020-09-18 14:46:01 +02:00
Joshua Schmid
d7d1267686
docs: s/svc_id/osd_id
Fixes: https://tracker.ceph.com/issues/47402
Signed-off-by: Joshua Schmid <jschmid@suse.de>
2020-09-18 14:33:40 +02:00
Rishabh Dave
f07ccd64d4 qa/mgr: revert a patch from commit 04ed58f
mds_cluster.mds_fail() runs command "mds fail" not "fs fail". The reason
for failure was PR #32581 which accidentally changed the return code
from 0 to EINVAL. Since this was reversed in PR #37159, the change
introduced by 04ed58f is not only incorrect but also redundant.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-18 16:33:41 +05:30
Lenz Grimmer
ec05d87432
Merge pull request #34545 from rhcs-dashboard/read_only
mgr/dashboard: Disabling the form inputs for the read_only modals

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
2020-09-18 12:59:30 +02:00
Aashish Sharma
1c812e0d61 mgr/dashboard/api: move/create OSD histogram in separate endpoint
Added a separate endpoint for osd/histogram - api/osd/{svc_id}/histogram

Fixes:https://tracker.ceph.com/issues/46898
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
2020-09-18 16:11:04 +05:30
Lenz Grimmer
0625509c7f
Merge pull request #37023 from p-se/grafana-many-to-many
mgr/dashboard: Fix many-to-many issue in host-details Grafana dashboard

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
2020-09-18 11:58:47 +02:00
Joshua Schmid
4057f30187
Merge pull request #37059 from guits/guits-cephadm-shell-multiple-mounts
cephadm: support multiple mounts when running interactive shell
2020-09-18 10:57:52 +02:00
Joshua Schmid
1fb9082b09
Merge pull request #36890 from sebastian-philipp/cephadm-extend-ceph.conf
mgr/cephadm: Add extra-ceph-conf
2020-09-18 10:56:24 +02:00
Joshua Schmid
e87a408995
Merge pull request #37135 from sebastian-philipp/cephadm-race-add-host-vs-apply
mgr/cephadm: Fix race between host_add and _apply_all_specs
2020-09-18 10:55:17 +02:00
Joshua Schmid
a0065d4a95
Merge pull request #36969 from votdev/issue_46666_container_spec
cephadm: Introduce 'container' specification to deploy custom containers
2020-09-18 10:50:30 +02:00
Rishabh Dave
d7ec8d56aa qa/cephfs: don't pass args to destroy() in recreate()
In filesystem.py, don't set value of reset_obj_attrs to False.

Fixes: https://tracker.ceph.com/issues/47526
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-18 14:10:10 +05:30
Mahati Chamarthy
7ab199d2a7 librbd/cache: Fix pwl_path read issue
... in ImageCacheState

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@intel.com>
2020-09-18 13:53:35 +05:30
Rishabh Dave
e7a721f0d2 mon/MonCap: check profile_grants too while checking caps
When checking if a certain fs subcommand can and should be executed in
FSCommands.cc, check permissions in "profile_grants" too when the caps
for that entity contains a cap profile.

Fixes: https://tracker.ceph.com/issues/47423
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-18 13:23:35 +05:30
Kefu Chai
989af0b7cf
Merge pull request #37158 from tchaikov/wip-no-more-assertDictContainsSubset
mgr/dashboard: replace assertDictContainsSubset() with assertLessEqual()

Reviewed-by: Volker Theile <vtheile@suse.com>
2020-09-18 15:18:31 +08:00
Kefu Chai
12457bab47
Merge pull request #37170 from yaarith/add-smartctl-nvme-dependencies
ceph.spec, debian: add smartmontools, nvme-cli dependencies

Reviewed-by: Kefu Chai <kchai@redhat.com>
2020-09-18 13:42:44 +08:00
Kefu Chai
0cf2e89948 cmake: introduce Boost::MPL interface library
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-18 12:26:09 +08:00
Kefu Chai
822b91e4d1 src: Revert "Fix to raise BOOST_MPL_LIMIT_LIST_SIZE from 20 to 30"
This reverts commit 3f4e9a4526.

will fix the FTBFS by introducing a interface library in CMake script

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-18 12:26:09 +08:00
Kefu Chai
709c73ef4a cmake: extract admin/CMakeLists.txt
for better modularity

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-18 12:26:09 +08:00
Jason Dillaman
1d0a3b17f5 librbd: pass IOContext to image-extent IO dispatch methods
This allows a specific IOContext to be used regardless of the image's
current read and write snapshot state.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-17 23:52:32 -04:00
Jason Dillaman
c433e12999 librbd: pass IOContext to object-extent IO dispatch methods
This allows a specific IOContext to be used regardless of the image's
current read and write snapshot state.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-17 23:52:32 -04:00
Jason Dillaman
6c4785be79 librbd: helper method to create new data pool IOContext
Deep-copy will require the ability to issue IOs against arbitrary
IOContexts via the image-extent IO dispatcher.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-17 23:52:32 -04:00
Jason Dillaman
ad7372e355 librbd: image dispatch spec tids are assigned by dispatcher
This was a legacy implementation where it was assigned by the ImageRequestWQ
and therefore needs to be part of the factory methods.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-17 23:52:32 -04:00
Jason Dillaman
78fe19260a librbd: simplify in-flight IO tracking for write-block image dispatch
Now that we don't need to worry about read requests issuing a finish
callback, we can use a simple counter to track in-flight writes.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-17 23:52:32 -04:00
Jason Dillaman
a40718283d librbd: drop ImageDispatchInterface::handle_finished virtual method
Any dispatch layer can now directly place themselves in the finish
callback handler chain without the use of the generic callback.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-17 23:52:32 -04:00
Jason Dillaman
a1e1f0f72c librbd: use an overridable finish handler for the image dispatcher
This mimics the design from the object dispatcher and will allow
for simplified in-flight IO tracking.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-17 23:52:32 -04:00
Jason Dillaman
c599785b3c librbd: drop flush tracker from exclusive lock image dispatch
We can now pass the flush through the exclusive-lock dispatch layer
to ensure all in-flight IOs have been processed.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-17 23:52:31 -04:00
Jason Dillaman
2122542a2e librbd: update refresh image dispatch layer flush exclusions
Only flush requests coming from the refresh state machine or from the
exclusive-lock dispatch layer initializationshould be ignored. This is
because both can be initiated from the refresh state machine and
therefore deadlock.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-17 23:52:31 -04:00
Jason Dillaman
a320a2b821 librbd: reorder exclusive-lock pre-release state steps
The exclusive-lock dispatch layer should be locked and flushed to
ensure no IO is waiting for a refresh. Once that is complete, interlock
with the refresh state machine and re-flush one last time w/ the
refresh dispatch layer skipped.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-17 23:52:31 -04:00
Jason Dillaman
75929c4118 librbd: avoid blocking writes when initializing exclusive-lock
The exclusive-lock dispatch layer will already block IOs as required
so this second layer of blocking just increases the complexity and
the potential for deadlocks when attempting to flush.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-17 23:52:31 -04:00
Jason Dillaman
437354ffcd librbd: skip flush from exclusive-lock dispatch layer on init/shutdown
If the exclusive-lock layer is being initialized/shut down at image
open/close, there is no IO flowing so there is no need to flush.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-17 23:52:31 -04:00
Jason Dillaman
b0b4ba2698 librbd: assign a unique flush source to each internal component
This will allow improved tracking and bypassing of a flush request
that might cause IO deadlocks in dispatch layers.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-17 23:52:31 -04:00
Yaarit Hatuka
d5528a7e8e ceph.spec.in, debian/control: add smartmontools and nvme-cli dependencies
These packages are needed in order to scrape device health metrics from
devices used by OSD and MON daemons.

smartmontools' smartctl is what we use in order to scrape devices' SMART
attributes and general health metrics.
In addition, we use nvme-cli tool on NVMe devices, which fetches
vendor specific NVMe related health metrics.

Ceph rely on these tools for proper functioning of the underlying layers
of devicehealth mgr module, and other mgr modules which use devicehealth
functionality (such as diskprediction_local, telemetry, dashboard).

Essentially, most of devicehealth commands rely on proper functioning of
smartctl, otherwise they lack the device health metrics.

For example, in case smartctl is missing, the commands:
    ceph device scrape-daemon-health-metrics <who>
    ceph device scrape-health-metrics [<devid>]
will not be able to scrape health metrics, and the command:
    ceph device predict-life-expectancy <devid>
will not provide any meaningful output (since there are no metrics).

In short, when we scrape a device by its daemon (be it an OSD or a MON):
  ceph device scrape-daemon-health-metrics <who>
The devicehealth module command eventually invokes a
block_device_get_metrics() call in either osd/OSD.cc or mon/Monitor.cc,
which wraps calls to both
    block_device_run_smartctl()       (spawns smartctl)
    block_device_run_vendor_nvme()    (spawns nvme)
in common/blkdev.cc.

Minimum version requirements:
'smartmontools' is the package name, which contains two utility
programs: 'smartd' and 'smartctl'. Ceph uses the latter.

Version 6.7 of smartctl first introduced the --json option (beta), which
allows to output the metrics in a JSON format. Since then a few
adjustments were made and the feature officially launched in smartctl
version 7.0.
Since we rely on the JSON format to process the metrics, we must have
smartmontools' smartctl version >= 7.

That said, we choose not to specify smartmontools version here on
purpose, since there might be a scenario where:
We specified smartmontools version to be >= 7.
smartmontools 7 is not available yet in rhel 8 / centos 8.
A user installs via rpm ceph-osd, for example.
smartmontools will not be installed (since version >= 7 is not available
in this repo yet).
Then the user upgrades to 8.3 (which should have smartmontools >= 7),
but smartmontools will not get upgraded (since it's not installed).
In the scenario where we do not specify a version, smartmontools 6.6
will be installed, but it will be upgraded to >= 7 when a user upgrades
(and if it's a fresh installation - version >= 7 would be installed
anyway).

nvme-cli does not have a minimum version.

We use 'Recommends' for both rpm and deb packages since we do not want
the installation to fail in case of conflicts. 'Recommends' weakens the
dependency to be installed in case possible, but ignores it in cases of
conflicts with other dependencies.

It's worth mentioning that smartmontools and nvme-cli dependencies exist
in ceph-container builds.
We add them here for the cases of bare metal installations.

In the future we will add a separate package (with smartmontools and
nvme-cli dependencies) that can be installed on any node (running
rbd-mirror, rgw, mds, mgr, etc.), in order to be able to collect the
health metrics of its devices and offer their life expectancy
prediction.

Fixes: https://tracker.ceph.com/issues/47479
Signed-off-by: Yaarit Hatuka <yaarit@redhat.com>
2020-09-18 03:25:56 +00:00
Wong Hoi Sing Edison
d88c834ea4
systemd: Support Graceful Reboot for AIO Node
Ceph AIO installation with single/multiple node is not friendly for
loopback mount, especially always get deadlock issue during graceful
system reboot.

We already have `rbdmap.service` with graceful system reboot friendly as
below:

    [Unit]
    After=network-online.target
    Before=remote-fs-pre.target
    Wants=network-online.target remote-fs-pre.target

    [Service]
    ExecStart=/usr/bin/rbdmap map
    ExecReload=/usr/bin/rbdmap map
    ExecStop=/usr/bin/rbdmap unmap-all

This PR introduce:

  - `ceph-mon.target`: Ensure startup after `network-online.target` and
    before `remote-fs-pre.target`
  - `ceph-*.target`: Ensure startup after `ceph-mon.target` and before
    `remote-fs-pre.target`
  - `rbdmap.service`: Once all `_netdev` get unmount by
    `remote-fs.target`, ensure unmap all RBD BEFORE any Ceph components
    under `ceph.target` get stopped during shutdown

The logic is concept proof by
<https://github.com/alvistack/ansible-role-ceph_common/tree/develop>;
also works as expected with Ceph + Kubernetes deployment by
<https://github.com/alvistack/ansible-collection-kubernetes/tree/develop>.
No more deadlock happened during graceful system reboot, both AIO
single/multiple no de with loopback mount.

Also see:

  - <https://github.com/ceph/ceph/pull/36776>
  - <https://github.com/etcd-io/etcd/pull/12259>
  - <https://github.com/cri-o/cri-o/pull/4128>
  - <https://github.com/kubernetes/release/pull/1504>

Fixes: https://tracker.ceph.com/issues/47528
Signed-off-by: Wong Hoi Sing Edison <hswong3i@gmail.com>
2020-09-18 11:02:26 +08:00
Patrick Donnelly
795cf4cecc
mds: convert stringstream to CachedStackStringStream
This is a simple performance refactor.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-09-17 18:54:55 -07:00
Patrick Donnelly
ff16f5d67c
Merge PR #37163 into master
* refs/pull/37163/head:
	mds: silence warning ‘MDSRank::fs_name’ will be initialized after [-Wreorder]

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2020-09-17 18:30:11 -07:00
Patrick Donnelly
5126bfca8d
Merge PR #37147 into master
* refs/pull/37147/head:
	mds/FSMap: check parse_role return before filtering

Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
2020-09-17 18:28:13 -07:00
David Zafman
3a95735010
Merge pull request #36989 from AmnonHanuhov/wip-ObjectStore_EIO_Handling
osd: Got rid of global flag eio_errors_to_process

Reviewed-by: David Zafman <dzafman@redhat.com>
2020-09-17 17:45:42 -07:00
Jason Dillaman
052a0842d8 librbd: remove unncessary templating from io::ImageDispatchSpec
This was a remnant of the original implimentation for the image
dispatch spec. Now it more closely aligns with the object dispatch
spec.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-17 20:40:09 -04:00
Jason Dillaman
c22a89d2b1 librbd: queued IOs should retry acquiring exclusive lock
If the IO that attempts to acquire the exclusive lock fails,
any queued IO will not be retried leading to a deadlock.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-17 20:40:09 -04:00
David Zafman
a97a1cd858
Merge pull request #36397 from dzafman/wip-39012
distinguish unfound + impossible to find, vs start some down OSDs to get

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2020-09-17 17:30:43 -07:00
Jason Dillaman
251b940f4f
Merge pull request #37132 from lixiaoy1/dirty_cache_feature
librbd: add DIRTY_CACHE in IMPLICIT_ENABLE

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2020-09-17 19:04:29 -04:00
Jason Dillaman
c4fb0c1dfa
Merge pull request #36586 from MahatiC/wip-ssd-integration
librbd/cache: SSD cache integration framework

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2020-09-17 17:52:30 -04:00
Kefu Chai
5df5d8f8ff
Merge pull request #37141 from sebastian-philipp/cephadm-fix-rm-util.load_from_store
mgr/cephadm: fix RemoveUtil.load_from_store()

Reviewed-by: Joshua Schmid <jschmid@suse.de>
2020-09-18 00:32:22 +08:00
Patrick Donnelly
61db7a9c2e
qa: spawn MDS daemons before creating fs
This avoids unnecessary MDS_ALL_DOWN messages because the MDS daemons
have not yet been spawned.

Fixes: https://tracker.ceph.com/issues/47518
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-09-17 09:26:38 -07:00
Kefu Chai
967104103c doc/cephadm: use appropriate directive for formatting codeblocks
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-17 23:42:27 +08:00
Ulrich Weigand
2e66216b0c test/librados: fix endian bugs in checksum test cases
We're seeing test failures when running rados/test.sh in Teuthology
on a big-endian platform (IBM Z).  These are all related to calls
to the checksum operations, which expect little-endian inputs and
outputs, but are in many places called with native-endian types
from the test code.

One test case, LibRadosAio::RoundTrip3 in aio.cc, already uses
ceph_le types to address this problem, and this test actually
completes successfully on IBM Z.  This patch changes the other
test case performing checksum operations accordingly.

With this patch in place, rados/test.sh now completed successfully.

Fixes: https://tracker.ceph.com/issues/47516

Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
2020-09-17 15:52:54 +02:00
Patrick Donnelly
3428b020fd
Merge PR #37197 into master
* refs/pull/37197/head:
	doc: add "fs authorize" subcommand to ceph man page

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2020-09-17 06:42:33 -07:00
nizamial09
702f3f2337 mgr/dashboard: Creating Login Page Legal Links
Some of the doc links that can be shown in the login page like security, trademarks etc and can add new links easily.

Fixes: https://tracker.ceph.com/issues/47454
Signed-off-by: Nizamudeen A <nia@redhat.com>
2020-09-17 17:17:14 +05:30