]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/log
ceph.git
3 years agoqa/tasks/kubeadm: set up tigera resources via kubectl create 48097/head
John Mulligan [Mon, 29 Aug 2022 14:03:01 +0000 (10:03 -0400)]
qa/tasks/kubeadm: set up tigera resources via kubectl create

Fixes: https://tracker.ceph.com/issues/57268
The tigera operator for the calico CNI has some pretty large resource
definitions. The length of the definitions can cause the "client side
apply", the default mode for `kubectl apply ....`, to fail due to the
length of the needed annotation that would result:

```
2022-08-22T20:24:55.636 INFO:teuthology.orchestra.run.smithi087.stdout:clusterrolebinding.rbac.authorization.k8s.io/tigera-operator created
2022-08-22T20:24:55.670 INFO:teuthology.orchestra.run.smithi087.stdout:deployment.apps/tigera-operator created
2022-08-22T20:24:55.671 INFO:teuthology.orchestra.run.smithi087.stderr:The CustomResourceDefinition "installations.operator.tigera.io" is invalid: metadata.annotations: Too long: must have at most 262144 bytes
2022-08-22T20:24:55.674 DEBUG:teuthology.orchestra.run:got remote process result: 1
```

There are two simple options for avoiding this error. One is to use
`kubectl create`. The create command will not make this lengthy
annotation. It will fail if any of the resources already exist. The
other option is to use server-side apply, via the `kubectl apply
--server-side ...` command. It is new in k8s 1.18. It will not create
the annotation either.

The block of code setting up the CNI already uses `kubectl create` to
create the custom resources that configure the tigera operator.
Therefore it should be safe to assume the block of code in question
doesn't need to be idempotent and we can also use `kubectl create`
elsewhere in the same block.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit f8b0511d6c45977f2f7925769cf570a82ea447bc)

3 years agoMerge pull request #48060 from zdover23/wip-doc-2022-09-13-backport-47575-to-pacific
zdover23 [Wed, 14 Sep 2022 07:46:59 +0000 (17:46 +1000)]
Merge pull request #48060 from zdover23/wip-doc-2022-09-13-backport-47575-to-pacific

pacific: doc/rados: add prompts to pools.rst

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agoMerge pull request #48062 from zdover23/wip-doc-2022-09-13-backport-47305-to-pacific
zdover23 [Wed, 14 Sep 2022 03:28:33 +0000 (13:28 +1000)]
Merge pull request #48062 from zdover23/wip-doc-2022-09-13-backport-47305-to-pacific

pacific: doc/monitoring: add min vers of apps in mon stack

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agodoc/monitoring: add min vers of apps in mon stack 48062/head
Zac Dover [Wed, 27 Jul 2022 14:27:42 +0000 (00:27 +1000)]
doc/monitoring: add min vers of apps in mon stack

https://tracker.ceph.com/issues/45447

This PR adds recommended versions of grafana and
prometheus and alert manager.

This PR is a second attempt at getting the information
in the following PR into the docs:
https://github.com/ceph/ceph/pull/46000/files

Himadri Maheshwari deserves the credit for the work
in this commit.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
Signed-off-by: Himadri Maheshwari <himadri.maheshwari7915@gmail.com>
(cherry picked from commit 367695f5b09f75ee723d53116e2f4a6e45dd795d)

3 years agodoc/rados: add prompts to pools.rst 48060/head
Zac Dover [Fri, 12 Aug 2022 21:53:21 +0000 (07:53 +1000)]
doc/rados: add prompts to pools.rst

This commit adds ".. prompt:: bash $"-style prompts to pools.rst.
This brings this file up to the standard established in 2020 when
Kefu added support for the ".. prompt::" directive.

This commit is a part of an initiative to modernize the presentation
of all BASH commands in the RADOS documentation.

The progress of this project can be tracked here:
https://tracker.ceph.com/issues/57108

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit 1bd64192568242b141d8e30fef6758bf162ec350)

3 years agoMerge pull request #47823 from zdover23/wip-doc-2022-08-27-backport-47810-to-pacific
zdover23 [Mon, 12 Sep 2022 16:23:58 +0000 (02:23 +1000)]
Merge pull request #47823 from zdover23/wip-doc-2022-08-27-backport-47810-to-pacific

pacific: doc/mgr: add prompt directives to dashboard.rst

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agoMerge pull request #48024 from idryomov/wip-57116-cont-pacific
Ilya Dryomov [Fri, 9 Sep 2022 09:03:25 +0000 (11:03 +0200)]
Merge pull request #48024 from idryomov/wip-57116-cont-pacific

pacific: test/{librbd, rgw}: increase delay between and number of bind attempts

Reviewed-by: Laura Flores <lflores@redhat.com>
3 years agotest/{librbd, rgw}: increase delay between and number of bind attempts 48024/head
Ilya Dryomov [Thu, 8 Sep 2022 09:36:34 +0000 (11:36 +0200)]
test/{librbd, rgw}: increase delay between and number of bind attempts

Commit aa7885f7cc41 ("test/{librbd, rgw}: retry when bind fail with
port 0") reduced the frequency of sporadic unit test failures caused
by EADDRINUSE a lot, but not entirely.

Currently, it yields a cumulative sleep of ~9 seconds.  Let's increase
that to 1 minute.

Fixes: https://tracker.ceph.com/issues/57116
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 48016eaa1511ac8a39ed33084e0e230f3b1b5821)

3 years agotest/{librbd, rgw}: retry when bind fail with port 0
Kefu Chai [Sun, 4 Sep 2022 12:37:32 +0000 (20:37 +0800)]
test/{librbd, rgw}: retry when bind fail with port 0

there is chance that the bind() call may fail if we have another test
happen to pick the free port picked by operating system. in this case,
we just retry up to 42 times.

in theory, this change does not fully address the racing, but it should
help to alleviate this issue.

See-also: https://tracker.ceph.com/issues/57116
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit aa7885f7cc41390fcc8eeb82bc7142c3ff6a53f9)

Conflicts:
src/test/rgw/test_http_manager.cc [ commit f5019d2a8388 ("rgw:
  Set CURLOPT_NOBODY for HEAD request") not in pacific ]

3 years agoMerge pull request #47693 from pdvian/wip-55309-pacific
Yuri Weinstein [Tue, 6 Sep 2022 20:44:59 +0000 (13:44 -0700)]
Merge pull request #47693 from pdvian/wip-55309-pacific

pacific: mgr, mgr/prometheus: Fix regression with prometheus metrics

Reviewed-by: Laura Flores <lflores@redhat.com>
3 years agoMerge pull request #47433 from lxbsz/wip-56462
Yuri Weinstein [Tue, 6 Sep 2022 20:43:53 +0000 (13:43 -0700)]
Merge pull request #47433 from lxbsz/wip-56462

pacific:  mds: skip fetching the dirfrags if not a directory

Reviewed-by: Kotresh HR khiremat@redhat.com
3 years agoMerge pull request #47056 from lxbsz/wip-56449
Yuri Weinstein [Tue, 6 Sep 2022 20:43:17 +0000 (13:43 -0700)]
Merge pull request #47056 from lxbsz/wip-56449

pacific: mds: notify the xattr_version to replica MDSes

Reviewed-by: Kotresh HR khiremat@redhat.com
3 years agoMerge pull request #47556 from ifed01/wip-ifed-cleanup-onode-pin-pac
Yuri Weinstein [Tue, 6 Sep 2022 18:15:17 +0000 (11:15 -0700)]
Merge pull request #47556 from ifed01/wip-ifed-cleanup-onode-pin-pac

pacific: os/bluestore: get rid of fake onode nref increment for pinned entry

Reviewed-by: Adam Kupczyk <akupczyk@redhat.com>
3 years agoMerge pull request #47611 from adk3798/pacific-multiple-vips
Adam King [Tue, 6 Sep 2022 17:30:40 +0000 (13:30 -0400)]
Merge pull request #47611 from adk3798/pacific-multiple-vips

pacific: Cephadm: Allow multiple virtual IP addresses for keepalived and haproxy

Reviewed-by: John Mulligan <jmulligan@redhat.com>
3 years agoMerge pull request #47512 from nmshelke/wip-57058-pacific
Yuri Weinstein [Tue, 6 Sep 2022 16:09:38 +0000 (09:09 -0700)]
Merge pull request #47512 from nmshelke/wip-57058-pacific

pacific: mgr/volumes: filter internal directories in 'subvolumegroup ls' command

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Kotresh HR khiremat@redhat.com
3 years agoMerge pull request #47535 from guits/wip-57088-pacific
Adam King [Tue, 6 Sep 2022 15:59:51 +0000 (11:59 -0400)]
Merge pull request #47535 from guits/wip-57088-pacific

pacific: ceph-volume: system.get_mounts() refactor

Reviewed-by: Adam King <adking@redhat.com>
3 years agoMerge pull request #47661 from adk3798/wip-57169-pacific
Adam King [Tue, 6 Sep 2022 15:59:02 +0000 (11:59 -0400)]
Merge pull request #47661 from adk3798/wip-57169-pacific

pacific: cephadm: support for Oracle Linux 8

Reviewed-by: Redouane Kachach <rkachach@redhat.com>
3 years agoMerge pull request #47663 from adk3798/wip-57103-pacific
Adam King [Tue, 6 Sep 2022 15:57:13 +0000 (11:57 -0400)]
Merge pull request #47663 from adk3798/wip-57103-pacific

pacific: mgr/cephadm: recreate osd config when redeploy/reconfiguring

Reviewed-by: John Mulligan <jmulligan@redhat.com>
Reviewed-by: Redouane Kachach <rkachach@redhat.com>
3 years agoMerge pull request #47662 from adk3798/wip-57148-pacific
Adam King [Tue, 6 Sep 2022 15:55:05 +0000 (11:55 -0400)]
Merge pull request #47662 from adk3798/wip-57148-pacific

pacific: mgr/cephadm: set dashboard grafana-api-password when user provides one

Reviewed-by: John Mulligan <jmulligan@redhat.com>
Reviewed-by: Redouane Kachach <rkachach@redhat.com>
3 years agomgr/cephadm: loop over all vips when trying to find ingress' interface 47611/head
Luis Domingues [Thu, 11 Aug 2022 10:01:23 +0000 (11:01 +0100)]
mgr/cephadm: loop over all vips when trying to find ingress' interface

Signed-off-by: Luis Domingues <domingues.luis@protonmail.ch>
(cherry picked from commit 1b9a6a0f58a9a7550e8b93573b3191816da5f900)

3 years agoSplit single and multiple vips test into 2 functions
Luis Domingues [Tue, 9 Aug 2022 15:23:59 +0000 (16:23 +0100)]
Split single and multiple vips test into 2 functions

Signed-off-by: Luis Domingues <domingues.luis@protonmail.ch>
(cherry picked from commit f6d4ab9f25e5c9ee1872dbfd18bebbaf9a72a2d0)

3 years agomgr/cephadm: update haproxy/keepalive service test for newly generated files
Luis Domingues [Tue, 9 Aug 2022 08:25:20 +0000 (09:25 +0100)]
mgr/cephadm: update haproxy/keepalive service test for newly generated files

Signed-off-by: Luis Domingues <domingues.luis@protonmail.ch>
(cherry picked from commit a69a6fb4f5275af8a2757003f7fb5ca1f1ab9d2f)

3 years agomgr/cephadm: set explicit * bind for haproxy when using multiple vips
Luis Domingues [Tue, 9 Aug 2022 08:18:18 +0000 (09:18 +0100)]
mgr/cephadm: set explicit * bind for haproxy when using multiple vips

Signed-off-by: Luis Domingues <domingues.luis@protonmail.ch>
(cherry picked from commit a11e181b98ffccff40939068d86254e7f8a98c06)

3 years agomgr/cephadm: update doc for multiple vips for ingress
Luis Domingues [Tue, 9 Aug 2022 07:45:05 +0000 (08:45 +0100)]
mgr/cephadm: update doc for multiple vips for ingress

Signed-off-by: Luis Domingues <domingues.luis@protonmail.ch>
(cherry picked from commit 7b064e8b0eab0b577470122534e1b2647f5191cc)

3 years agomgr/cephadm: set test for multiple vips options for ingress service
Luis Domingues [Tue, 9 Aug 2022 07:39:37 +0000 (08:39 +0100)]
mgr/cephadm: set test for multiple vips options for ingress service

Signed-off-by: Luis Domingues <domingues.luis@protonmail.ch>
(cherry picked from commit 5915d2ecd08c1289da38d4fbeb646898f9c5dccf)

3 years agomgr/cephadm: allow for multiple vip configuration on ingress service
Luis Domingues [Mon, 8 Aug 2022 16:27:57 +0000 (18:27 +0200)]
mgr/cephadm: allow for multiple vip configuration on ingress service

Signed-off-by: Luis Domingues <domingues.luis@protonmail.ch>
(cherry picked from commit 0193a6f73659f7aa4ac1d000cf11c6544ad6ab6d)

3 years agoMerge pull request #47627 from guits/wip-57133-pacific
Adam King [Tue, 6 Sep 2022 14:44:16 +0000 (10:44 -0400)]
Merge pull request #47627 from guits/wip-57133-pacific

pacific: cephadm/ceph-volume: fix rm-cluster --zap

Reviewed-by: John Mulligan <jmulligan@redhat.com>
3 years agoMerge pull request #47664 from adk3798/wip-57099-pacific
Adam King [Tue, 6 Sep 2022 14:41:56 +0000 (10:41 -0400)]
Merge pull request #47664 from adk3798/wip-57099-pacific

pacific: cephadm: support quotes around public/cluster network in config passed to bootstrap

Reviewed-by: Redouane Kachach <rkachach@redhat.com>
3 years agoMerge pull request #47684 from batrick/i57183
Kefu Chai [Tue, 6 Sep 2022 13:56:35 +0000 (21:56 +0800)]
Merge pull request #47684 from batrick/i57183

pacific: crash: pthread_mutex_lock()

Reviewed-by: Laura Flores <lflores@redhat.com>
3 years agoMerge pull request #47522 from kamoltat/wip-ksirivad-backport-pacific-46242
Kamoltat Sirivadhna [Tue, 6 Sep 2022 13:50:11 +0000 (09:50 -0400)]
Merge pull request #47522 from kamoltat/wip-ksirivad-backport-pacific-46242

pacific: pybind/mgr/pg_autoscaler: change overlapping roots to warning
Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #47380 from NitzanMordhai/wip-55156-pacific
Kefu Chai [Tue, 6 Sep 2022 12:58:40 +0000 (20:58 +0800)]
Merge pull request #47380 from NitzanMordhai/wip-55156-pacific

pacific: mon/ConfigMonitor: fix config get key with whitespaces

Reviewed-by: Neha Ojha: <nojha@redhat.com>
3 years agoMerge pull request #47692 from pdvian/wip-55308-pacific
Kefu Chai [Tue, 6 Sep 2022 12:28:41 +0000 (20:28 +0800)]
Merge pull request #47692 from pdvian/wip-55308-pacific

pacific: mgr, mon: Keep upto date metadata with mgr for MONs

Reviewed-by: Laura Flores <lflores@redhat.com>
3 years agoMerge pull request #47401 from tserong/wip-56977-pacific
Kefu Chai [Tue, 6 Sep 2022 12:27:25 +0000 (20:27 +0800)]
Merge pull request #47401 from tserong/wip-56977-pacific

pacific: cephfs-shell: move source to separate subdirectory

Reviewed-by: Kefu Chai <tchaikov@gmail.com>
Reviewed-by: Nikhilkumar Shelke <nshelke@redhat.com>
3 years agoMerge pull request #47282 from batrick/i56712
Kefu Chai [Tue, 6 Sep 2022 12:26:21 +0000 (20:26 +0800)]
Merge pull request #47282 from batrick/i56712

pacific: mds: standby-replay daemon always removed in MDSMonitor::prepare_beacon

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
3 years agoMerge pull request #47920 from idryomov/wip-57343-pacific
Ilya Dryomov [Tue, 6 Sep 2022 09:23:13 +0000 (11:23 +0200)]
Merge pull request #47920 from idryomov/wip-57343-pacific

pacific: test/cli-integration/rbd: iSCSI REST API responses aren't pretty-printed anymore

Reviewed-by: Kefu Chai <tchaikov@gmail.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
3 years agoqa: filter internal directories in 'subvolumegroup ls' command 47512/head
Nikhilkumar Shelke [Fri, 1 Jul 2022 12:13:40 +0000 (17:43 +0530)]
qa: filter internal directories in 'subvolumegroup ls' command

Internal directories: '_nogroup', '_index', '_legacy', '_deleting'
1. Internal directories should be filtered in 'subvolmegroup ls' command.
2. Internal directories should not be accepted as a group name.

Fixes: https://tracker.ceph.com/issues/55762
Signed-off-by: Nikhilkumar Shelke <nshelke@redhat.com>
(cherry picked from commit 7b585d4db921112edeea3c879cb8bca0200c1b71)

3 years agomgr/volumes: filter internal directories in 'subvolumegroup ls' command
Nikhilkumar Shelke [Wed, 22 Jun 2022 09:55:23 +0000 (15:25 +0530)]
mgr/volumes: filter internal directories in 'subvolumegroup ls' command

Internal directories: '_nogroup', '_index', '_legacy', '_deleting'
1. Internal directories should be filtered in 'subvolmegroup ls' command.
2. Internal directories should not be accepted as a group name.

Fixes: https://tracker.ceph.com/issues/55762
Signed-off-by: Nikhilkumar Shelke <nshelke@redhat.com>
(cherry picked from commit ce3fa7f1bcd9ca8a9e9e80ca33a15d0746ce7110)

3 years agoMerge pull request #47911 from idryomov/wip-57317-pacific
Kefu Chai [Tue, 6 Sep 2022 02:24:35 +0000 (10:24 +0800)]
Merge pull request #47911 from idryomov/wip-57317-pacific

pacific: librbd: use actual monitor addresses when creating a peer bootstrap token

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Christopher Hoffman <choffman@redhat.com>
3 years agoMerge pull request #46949 from lxbsz/wip-56056
Kefu Chai [Tue, 6 Sep 2022 02:22:59 +0000 (10:22 +0800)]
Merge pull request #46949 from lxbsz/wip-56056

pacific: ceph-fuse: add dedicated snap stag map for each directory

Reviewed-by: Kotresh HR <khiremat@redhat.com>
3 years agoMerge pull request #47583 from idryomov/wip-57107-pacific
Kefu Chai [Tue, 6 Sep 2022 02:20:47 +0000 (10:20 +0800)]
Merge pull request #47583 from idryomov/wip-57107-pacific

pacific: rbd: find_action() should sort actions first

Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
3 years agoMerge pull request #47913 from idryomov/wip-56154-pacific
Kefu Chai [Tue, 6 Sep 2022 02:19:45 +0000 (10:19 +0800)]
Merge pull request #47913 from idryomov/wip-56154-pacific

pacific: rbd-mirror: resume pending shutdown on error in snapshot replayer

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Christopher Hoffman <choffman@redhat.com>
3 years agoMerge pull request #47460 from neesingh-rh/wip-57041-pacific
Kefu Chai [Tue, 6 Sep 2022 02:18:44 +0000 (10:18 +0800)]
Merge pull request #47460 from neesingh-rh/wip-57041-pacific

pacific: mgr/volumes: add interface to check the presence of subvolumegroups/subvolumes

Reviewed-by: Nikhilkumar Shelke <nshelke@redhat.com>
Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agoMerge pull request #46077 from idryomov/wip-mrun-bashism-pacific
Kefu Chai [Tue, 6 Sep 2022 02:17:35 +0000 (10:17 +0800)]
Merge pull request #46077 from idryomov/wip-mrun-bashism-pacific

pacific: tooling: Change mrun to use bash

Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
3 years agocephfs-shell: move source to separate subdirectory 47401/head
Tim Serong [Thu, 21 Jul 2022 05:55:19 +0000 (15:55 +1000)]
cephfs-shell: move source to separate subdirectory

This ensures the package discovery done by python setuptools >= 61
doesn't get confused when building cephfs-shell and cephfs-top.
This commit moves cephfs-shell to a separate "shell" subdirectory,
which is the same approach we've already got with the cephfs-top
tool being in a separate "top" subdirectory.

Fixes: https://tracker.ceph.com/issues/56658
Signed-off-by: Tim Serong <tserong@suse.com>
(cherry picked from commit dc69033763cc116c6ccdf1f97149a74248691042)

3 years agoMerge pull request #47803 from tchaikov/wip-pacific-update-fio
Kefu Chai [Tue, 6 Sep 2022 00:24:15 +0000 (08:24 +0800)]
Merge pull request #47803 from tchaikov/wip-pacific-update-fio

pacific: Updates to fix `make check` failures

Reviewed-by: Laura Flores <lflores@redhat.com>
3 years agoMerge pull request #47956 from zdover23/wip-doc-2022-09-04-backport-47841-to-pacific
zdover23 [Mon, 5 Sep 2022 06:23:26 +0000 (16:23 +1000)]
Merge pull request #47956 from zdover23/wip-doc-2022-09-04-backport-47841-to-pacific

pacific: doc/start: update documenting-ceph branch names

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agodoc/start: update documenting-ceph branch names 47956/head
Zac Dover [Tue, 30 Aug 2022 11:48:08 +0000 (21:48 +1000)]
doc/start: update documenting-ceph branch names

This PR updates the branch names in the
documenting-ceph.rst file. It gets rid of all references
to the "master" branch, and updates the language to
reflect the state of play in 2022.

inb4: This PR merely removes the most egregious inaccuracies,
the ones that were most readily evident on a cursory perusal.
The full text remains to be carefully read and fitted together
with care.

I had to start somewhere.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit 7bc6262547c82dd6519e4099bfc4f082f14343ac)

3 years agoMerge pull request #47948 from adk3798/wip-57412-pacific
Adam King [Sat, 3 Sep 2022 19:43:53 +0000 (15:43 -0400)]
Merge pull request #47948 from adk3798/wip-57412-pacific

pacific: doc/cephadm/services: fix example for specifying rgw placement

Reviewed-by: Anthony D'Atri <anthonyeleven@users.noreply.github.com>
3 years agodoc/cephadm/services: fix example for specifying rgw placement 47948/head
Redouane Kachach [Fri, 2 Sep 2022 09:57:43 +0000 (11:57 +0200)]
doc/cephadm/services: fix example for specifying rgw placement
fixes: https://tracker.ceph.com/issues/56953

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
(cherry picked from commit 1ed4c30876262c8890247325eb84ff46621d34fe)

3 years agodoc/mgr: remove section absent from pacific 47823/head
Zac Dover [Fri, 2 Sep 2022 19:18:03 +0000 (05:18 +1000)]
doc/mgr: remove section absent from pacific

This removes a section that is not in Pacific.

This is an alteration to the simple backport from
the main branch.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
3 years agocmake: link denc-mod-rgw against Boost::filesystem 47803/head
Kefu Chai [Fri, 2 Sep 2022 12:37:26 +0000 (20:37 +0800)]
cmake: link denc-mod-rgw against Boost::filesystem

to address the runtime link failure.

this change is not cherry-picked from main branch. as, in main branch,
the Boost::filesystem linkage is pulled in by rgw_common, which was
changed to a static library in 43d10b9e44ca50700e9076a47f2c38b360d1d632.
but this change is not included in pacific. so rgw added the linkage
via rgw_libs CMake variable. unfortunately, the lexical scope of this
variable does not not include tools/ceph-dencoder/CMakeLists.txt, so
we have to add this linkage manually here.

Signed-off-by: Tim Serong <tserong@suse.com>
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
3 years agoceph-dencoder: Add erasure_code to denc-mod-osd's target_link_libraries
Tim Serong [Fri, 2 Sep 2022 08:44:09 +0000 (18:44 +1000)]
ceph-dencoder: Add erasure_code to denc-mod-osd's target_link_libraries

Fixes: https://tracker.ceph.com/issues/57390
Signed-off-by: Tim Serong <tserong@suse.com>
(cherry picked from commit 690b9c6e8097666b1cda8f5a4fdd3d1d6903373f)

3 years agotest/cli-integration/rbd: iSCSI REST API responses aren't pretty-printed anymore 47920/head
Ilya Dryomov [Wed, 31 Aug 2022 07:22:05 +0000 (09:22 +0200)]
test/cli-integration/rbd: iSCSI REST API responses aren't pretty-printed anymore

See https://github.com/ceph/ceph-iscsi/pull/263 and
https://github.com/pallets/flask/pull/2193.  Flask stopped
pretty-printing by default in 1.0:

  Change the default for JSONIFY_PRETTYPRINT_REGULAR to False.
  json.jsonify returns a compact format by default, and an indented
  format in debug mode.

Fixes: https://tracker.ceph.com/issues/57343
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 1cec9e83c02c366b5274739ae11297b6fca8584f)

3 years agotools/ceph-dencoder: include experimental/filesystem as an alternative
Kefu Chai [Fri, 2 Sep 2022 00:27:23 +0000 (08:27 +0800)]
tools/ceph-dencoder: include experimental/filesystem as an alternative

in case we use pre C++17 C++ compiler and standard library.

this change is not cherry-picked from main, as we are using new C++
stanrdard library which is compliant with C++20. so no need to worry
about this.

Signed-off-by: Tim Serong <tserong@suse.com>
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
3 years agoMerge pull request #47870 from zdover23/wip-doc-2022-08-30-backport-447843-to-pacific
zdover23 [Thu, 1 Sep 2022 20:14:44 +0000 (06:14 +1000)]
Merge pull request #47870 from zdover23/wip-doc-2022-08-30-backport-447843-to-pacific

pacific: doc/mgr: update prompts in dboard.rst includes

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agotooling: Change mrun to use bash 46077/head
Adam C. Emerson [Wed, 20 Apr 2022 20:19:36 +0000 (16:19 -0400)]
tooling: Change mrun to use bash

Since mrun contains some bashisms, have it use bash explicitly.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit 1a049489cc3d2f63284365d6a0af6ee55c7efffd)

3 years agorbd-mirror: skip setting error code on snapshot replayer shutdown 47913/head
Ilya Dryomov [Tue, 30 Aug 2022 09:45:44 +0000 (11:45 +0200)]
rbd-mirror: skip setting error code on snapshot replayer shutdown

This is regarding failures in unregister_remote_update_watcher() and
unregister_local_update_watcher().  handle_replay_complete() can't be
called in these cases anymore as it would blindly attempt to unregister
watchers from scratch again.  Dropping handle_replay_complete() calls
there means that these failures would only be logged and would not be
surfaced by snapshot replayer.  But the only caller ignores them
anyway:

  void ImageReplayer<I>::shut_down(int r) {
    ...
    // close the replayer
    if (m_replayer != nullptr) {
      ctx = new LambdaContext([this, ctx](int r) {
        m_replayer->destroy();
        m_replayer = nullptr;
        ctx->complete(0);             <------
      });
      ctx = new LambdaContext([this, ctx](int r) {
        m_replayer->shut_down(ctx);
      });
    }

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit ced071f0de57af8cddffebca24baeb27f2a211d8)

3 years agorbd-mirror: resume pending shutdown on error in snapshot replayer
Ilya Dryomov [Wed, 24 Aug 2022 10:56:31 +0000 (12:56 +0200)]
rbd-mirror: resume pending shutdown on error in snapshot replayer

If a shutdown is requested, e.g. by update_pool_replayers() because
remote RADOS instance got blocklisted, and Replayer::shut_down() pends
it on completion of current snapshot sync, it gets stuck if replayer
encounters an error in the interim.  This is particularly likely in the
blocklist case: a higher layer may detect that client got blocklisted
and request a shutdown first, and then when replayer sees EBLOCKLISTED
in turn, it calls handle_replay_complete() -- which does not resume
a pending shutdown.  Because update_pool_replayers() blocks on shutdown
with Mirror::m_lock held, eventually the entire daemon hangs in
perpetuity.

Fixes: https://tracker.ceph.com/issues/56154
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit fc4cc575bc53f62f88ee3faf0daba8906bc1c6c1)

3 years agolibrbd: use actual monitor addresses when creating a peer bootstrap token 47911/head
Ilya Dryomov [Sat, 27 Aug 2022 09:09:00 +0000 (11:09 +0200)]
librbd: use actual monitor addresses when creating a peer bootstrap token

Relying on mon_host config option is fragile, as the user may confuse
v1 and v2 addresses, group them incorrectly, etc.  Get mon_host value
only as a fallback.

Fixes: https://tracker.ceph.com/issues/57317
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit de0ba80b37bf3df22bb2976871332344a4fb141e)

3 years agotools/ceph-dencoder: register dencoders in "lib" in dev env
Kefu Chai [Thu, 28 Jul 2022 15:11:08 +0000 (23:11 +0800)]
tools/ceph-dencoder: register dencoders in "lib" in dev env

if "CMakeCache.txt" is found in current directory, try to load
dencoder shared libraries  from ./lib. this heuristics is used by
`ceph.in` also for relaunching itself to get access to python
bindings.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit 3dec0345e72f2491b12486f69d3b9d21cece493f)

3 years agotools/ceph-dencoder: register dencoders in plugin
Kefu Chai [Tue, 3 Aug 2021 12:44:01 +0000 (20:44 +0800)]
tools/ceph-dencoder: register dencoders in plugin

so we can allocate and deallocate dencoders in the shared library,
instead of allocating them in the shared library, while deallocating
them in the executable.

after this change

- the plugin holds the strong references of the dencoders
- the registry holds the plugins and weak references of dencoders
- the dencoder shared libraries calls the method exposed by plugin
  to alloc/dealloc the dencoders

this change should address the segfault when compiling with Clang.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit ae7e79db7b5bc38d8ecde6705932ff2671c9c326)

3 years agotools/ceph-dencoder: extract denc_plugin.h out
Kefu Chai [Tue, 3 Aug 2021 10:30:34 +0000 (18:30 +0800)]
tools/ceph-dencoder: extract denc_plugin.h out

to prepare for the upcoming change to hold the encoders in DencoderPlugin

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 957b1c247c25713297c5d72964f553a8014f81ef)

3 years agotools/ceph-dencoder: s/exit(1)/return 1/ in main()
Kefu Chai [Tue, 3 Aug 2021 09:10:17 +0000 (17:10 +0800)]
tools/ceph-dencoder: s/exit(1)/return 1/ in main()

for better readability.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit a412e0645410be983eac765e603919970f90229a)

3 years agotools/ceph-dencoder: do not use singleton of registry
Kefu Chai [Tue, 3 Aug 2021 09:09:03 +0000 (17:09 +0800)]
tools/ceph-dencoder: do not use singleton of registry

instead of defining dencoder registry as a singleton, created it in
main().

it's simpler to reason about this way.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 7c095590b8024197cae5af12b3897c68b425d54f)

3 years agotools: do not unload plugins during destruction.
Willem Jan Withagen [Sun, 11 Apr 2021 13:01:22 +0000 (15:01 +0200)]
tools: do not unload plugins during destruction.

FreeBSD ceph-dencoder crashes in the exit() calls, due to
invalid pointer references during the release process of
the loaded libraries.

Often this is signaled by libc reporting:
  __cxa_thread_call_dtors: dtr 0x47efc0 from unloaded dso, skipping

The cause for this is different behaviour between FreeBSD and Linux:
https://groups.google.com/g/bsdmailinglist/c/22ncTZAbDp4/m/Dii_pII5AwAJ
_The FreeBSD implementation here looks racy. If one thread dlcloses an
object while another thread is exiting, we can end up calling a
function at an invalid memory address. It also looks as if it may
be possible to unload one library, load another at the same address,
and end up executing entirely the wrong code, which would have some
serious security implications.

The GNU/Linux equivalent of this function locks the DSO in memory
until all references to it have gone away. A call to dlclose() on
GNU/Linux will not actually unload the library until all threads
with destructors in that library have been unloaded. I believe
that this reuses the same reference counting mechanism that
allows the same library to be dlopened and dlclosed multiple times.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
(cherry picked from commit 78d301098f6ead7fc341b68d7ac5e0a1cd3295c5)

3 years agorgw/rgw_dencoder: set identity_type when creating samples
Kefu Chai [Mon, 16 Aug 2021 08:01:42 +0000 (16:01 +0800)]
rgw/rgw_dencoder: set identity_type when creating samples

otherwise identity_type is a random number on stack. and there is good
chance that it does not match with the one decoded from the encoded
blob.

this change should address the failures like:

**** rgw_log_entry test 2 binary reencode check failed ****
   ceph-dencoder type rgw_log_entry select_test 2 encode export /tmp/typ-O8hVYK2Gb
   ceph-dencoder type rgw_log_entry select_test 2 encode decode encode export /tmp/typ-G09itHHIC
   cmp /tmp/typ-O8hVYK2Gb /tmp/typ-G09itHHIC

The following tests FAILED:
132 - check-generated.sh (Failed)
..

Fixes: https://tracker.ceph.com/issues/52278
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 22095f4bd831f0d736ba364ea9e46febe06576f9)

3 years agorgw/rgw_json_enc: dump obj using dump_stream()
Kefu Chai [Mon, 16 Aug 2021 08:21:42 +0000 (16:21 +0800)]
rgw/rgw_json_enc: dump obj using dump_stream()

use dump_stream() instead of dump_string() for dumping stringify object.

more readably this way.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit cd30a7e5b4acda511de7218f39aa63d8cbf02060)

3 years agorgw/rgw_json_enc: dump rgw_log_entry::identity_type
Kefu Chai [Mon, 16 Aug 2021 08:23:26 +0000 (16:23 +0800)]
rgw/rgw_json_enc: dump rgw_log_entry::identity_type

should dump it for better debugging experience

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 9aafa0248ef8529d39e478531db2d849f25b3c5c)

3 years agorpm: add missing % in %dir directive
Nathan Cutler [Mon, 5 Apr 2021 15:21:22 +0000 (17:21 +0200)]
rpm: add missing % in %dir directive

de6c8250a6d91403e6d334aeb901bf9720ba40eb added an explicit %dir directive for
a new directory added to the ceph-common package, but -- due to a typo --
neglected to include the "%". As a result, RPM builds started to fail with:

Processing files: ceph-common-17.0.0-2787.gde6c8250.el8.x86_64
error: File must begin with "/": {_libdir}/ceph/denc/

RPM build errors:
    File must begin with "/": {_libdir}/ceph/denc/

Fixes: de6c8250a6d91403e6d334aeb901bf9720ba40eb
Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit 404f8b2ce268917c9ce04fa06aaccff4816ad8d6)

3 years agorpm: make ceph-common own the new denc directory
Nathan Cutler [Sun, 4 Apr 2021 09:02:11 +0000 (11:02 +0200)]
rpm: make ceph-common own the new denc directory

2d3c6561b4ac1473a728e81c232d7dfe6fc0188c introduced a new library directory
"%{_libdir}/ceph/denc/" in ceph-common but did not explicitly state that it
should be owned by the package. This caused OBS builds to fail as follows:

[ 5515s] ceph-common-17.0.0-2786.1.x86_64.rpm: directories not owned by a package:
[ 5515s]  - /usr/lib64/ceph/denc

Fixes: 2d3c6561b4ac1473a728e81c232d7dfe6fc0188c
Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit de6c8250a6d91403e6d334aeb901bf9720ba40eb)

3 years agotools/ceph-dencoder: build dencoders as plugins
Kefu Chai [Sat, 27 Mar 2021 16:56:39 +0000 (00:56 +0800)]
tools/ceph-dencoder: build dencoders as plugins

to reduce the memory footprint when linking ceph-dencoder.

* src/tools/ceph-dencoder:
  * build dencoders as shared libraries named with the prefix of
    "den-mod-". so ceph-dencoder can find them
  * install dencoders into $prefix/lib/ceph/denc, so ceph-dencoder
    can find them
  * only expose "register_dencoders()" function from plugins.
  * load plugins in specified directory
* ceph.spec.in: package plugins
* debian: package plugins

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 2d3c6561b4ac1473a728e81c232d7dfe6fc0188c)

3 years agoMerge pull request #47155 from rhcs-dashboard/wip-56615-pacific
Pere Diaz Bou [Thu, 1 Sep 2022 09:17:25 +0000 (11:17 +0200)]
Merge pull request #47155 from rhcs-dashboard/wip-56615-pacific

pacific: mgr/dashboard: do not recommend throughput for ssd's only cluster

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
3 years agocmake: fail on unknown attribute
Kefu Chai [Fri, 6 Aug 2021 09:26:16 +0000 (17:26 +0800)]
cmake: fail on unknown attribute

on Clang, the option for detecting unknown attribute is
-Wunknown-attributes, so "-Wattributes -Werror" does not fail the test
when the C compiler is Clang.

in this change, we just turn all warnings into errors.
this should fail the test if the compiler does not understand
`__attribute__((__symver__ ...))`

Fixes: https://tracker.ceph.com/issues/40060
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 08179fd9f399b024acbe135e4eb6655126927f30)

3 years agolibrados/librados_c: check for both symvers
Boris Ranto [Thu, 5 Aug 2021 07:08:08 +0000 (09:08 +0200)]
librados/librados_c: check for both symvers

We should check if either asm symver or attribute symver is defined and
not assume that attribute symver implies asm symver.

Fixes: https://tracker.ceph.com/issues/40060
Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit ff1941a8d34f52ca25c31e9945f3591feb304b55)

3 years agocmake: Check -flto flags
Boris Ranto [Thu, 5 Aug 2021 06:36:21 +0000 (08:36 +0200)]
cmake: Check -flto flags

We should check if -flto-partition=none is defined when the compiler
does not support symver attribute and fail the build if it is not.

Fixes: https://tracker.ceph.com/issues/40060
Co-authored-by: Kefu Chai <tchaikov@gmail.com>
Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit 5bcfd5caeee90df18809a6f4c9a2e7e8f7734f8b)

3 years agolibrados/librados_c: Use symver attribute if available
Boris Ranto [Tue, 3 Aug 2021 18:44:47 +0000 (20:44 +0200)]
librados/librados_c: Use symver attribute if available

Fixes: https://tracker.ceph.com/issues/40060
Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit f90e26cb4bffbef8c0b00b8774887963232c8b0a)

3 years agolibrados/librados_c: check .symver support using cmake
Kefu Chai [Tue, 27 Apr 2021 03:15:32 +0000 (11:15 +0800)]
librados/librados_c: check .symver support using cmake

the __asm__(".asmver ..") is a support provided by the compiler, so
would be better to detect it by either checking the compiler identifer
or just try it out.

in this change, instead of checking the building platform, we check this
feature using check_c_source_compiles().

in future, we could support versioned symbols using function attriubte
or symbol tables or version-script.

on platform where symbol versioning is not supported, we might need to
go with a different approach.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit d0858dbfb4b76a6e3d0b6001316e0f08703f3a26)

3 years agorpm: Re-enable LTO on supported systems
Boris Ranto [Tue, 3 Aug 2021 08:11:58 +0000 (10:11 +0200)]
rpm: Re-enable LTO on supported systems

We can now use LTO when building ceph. The symver issue was fixed by
using the gcc __symver__ attribute. The systems that support it can now
re-enable LTO.

Fixes: https://tracker.ceph.com/issues/40060
Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit 381507a31c4740bfc75dff8f13026df89e0ccdf8)

3 years agorados: Update symver defs
Boris Ranto [Mon, 2 Aug 2021 19:32:15 +0000 (21:32 +0200)]
rados: Update symver defs

The gcc compiler now supports symver attribute. We should update the
symvers to be able to support LTO.

Fixes: https://tracker.ceph.com/issues/40060
Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit e76193399d1966adc91c3ccef9c0d7bdbad7a221)

3 years agorados: Fix function ordering
Boris Ranto [Tue, 3 Aug 2021 07:26:16 +0000 (09:26 +0200)]
rados: Fix function ordering

The build fails because the function definitions are out of order. This
also reuses the LIBRADOS_C_API_DEFAULT_F macro for function definitions.

Fixes: https://tracker.ceph.com/issues/40060
Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit d79efb024cb6788a95885160bdd0d3a256f439f2)

3 years agocmake: disable LTO when building pmdk
Kefu Chai [Thu, 4 Aug 2022 05:09:11 +0000 (13:09 +0800)]
cmake: disable LTO when building pmdk

See-also: https://tracker.ceph.com/issues/54473
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit 2a97033ba86ac678a2ce5f99c60090c79f5fd257)

Conflicts:
cmake/modules/Buildpmem.cmake: trivial resolution

3 years agocmake,debian: install pure python module to deb_system path
Kefu Chai [Thu, 4 Aug 2022 13:52:43 +0000 (21:52 +0800)]
cmake,debian: install pure python module to deb_system path

in ubuntu 22.04 and debian unstable, the layout (scheme) for system
python module is named "deb_system", the default one is 'posix_local'.
and 'posix_local' installs python modules into paths like
usr/local/lib/python3.10/dist-packages/. hence dh_install fails
when it tries to find the files to be packaged under directory of
usr/lib/python3*/site-packages/.

in this change, the "deb_system" scheme is used if it is available,
and fall back to "posix_prefix" to be backward compatible with older
debian (derivative) distros.

also, update the source directories of pure python's installation
from `site-packages` to `*-packages`, to be compatible with ubuntu focal
and ubuntu jammy. as we are now using the specified scheme instead of
the default one.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit 04967404ed682835f81c1a5e51f94d09805d38b3)
Conflicts:
    apply the same change to debian/python3-cephfs.install, which
    was remove in main branch, but we need to preserve it in pacific.

3 years agodoc/mgr: update prompts in dboard.rst includes 47870/head
Zac Dover [Mon, 29 Aug 2022 00:39:51 +0000 (10:39 +1000)]
doc/mgr: update prompts in dboard.rst includes

This PR adds unselectable prompts to three files that are
transcluded in the doc/mgr/dashboard.rst file. These three
files are:

 1. debug.inc.rst
 2. feature_toggles.inc.rst
 3. motd.inc.rst

The addition of unselectable prompts to these three files
completes the work begun in PR#47810 (d8064b4), which sought
to bring dashboard.rst into line with the unselectable prompt
standard introduced by Kefu Chai in 2020.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit fc70ccde758cb1f7c03f208115b88a4ef325aed7)

3 years agomds: notify the xattr_version to replica MDSes 47056/head
Xiubo Li [Wed, 1 Jun 2022 02:32:58 +0000 (10:32 +0800)]
mds: notify the xattr_version to replica MDSes

When one client changes a xattr's value in the auth MDS, when replying
to the client the MDS possibly will drop the increased xattr_version
and new value in the reply message if no 'Xs' caps will be issued to
the client together.

And when the client wants to get this xattr's value, and if it sends
the request to a replicated MDS, since the replicated MDS still has
the old value of the xattr_version, and then the client will drop the
xattr value since xattr_version is not changed.

We need to notify the xattr_version to the replicated MDSes together
with the xattrs when notifying the lock state.

Fixes: https://tracker.ceph.com/issues/55331
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 363ee982f6513af2c018f14a02b73338fa9fc03b)

3 years agomds/MDLog: rename capped to mds_is_shutting_down 47433/head
Xiubo Li [Tue, 24 May 2022 13:10:54 +0000 (21:10 +0800)]
mds/MDLog: rename capped to mds_is_shutting_down

To make it more readable.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit ed676a3b3d77a0e33af257b357dca81efddef543)

3 years agomds: skip fetching the dirfrags if not a directory
Xiubo Li [Wed, 23 Feb 2022 14:21:11 +0000 (22:21 +0800)]
mds: skip fetching the dirfrags if not a directory

The backtrace in openfile table maybe out-of-date, just skip fetching
dirfrags instead of crash the MDS.

Fixes: https://tracker.ceph.com/issues/54384
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 655a6d878f9f4939b74fd9d010b9e017a33247c0)

3 years agomds/MDLog: try to commit the open file table when there has diry items
Xiubo Li [Thu, 24 Feb 2022 09:25:25 +0000 (17:25 +0800)]
mds/MDLog: try to commit the open file table when there has diry items

When there have dirty items, maybe there has no any new log event,
for exmaple when opening the files it can skip the OPEN logs.

Or maybe the journal segments could be expired but the open file
table dirty items still in the cache.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 7c39dc8fb8985a68013e93cea274d4535bde93e3)

3 years agomds/MDLog: use committed seq instead of committing seq
Xiubo Li [Thu, 24 Feb 2022 07:56:54 +0000 (15:56 +0800)]
mds/MDLog: use committed seq instead of committing seq

Since commit 9242ce90130 it won't allow multiple open file table
commits to be submit and will be worked sequentially. So whenever
is_any_committing() is false the committing seq will always equal
to committed seq.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit fb2477b29721a87a5f5f3c0b8a687ccbccf2b9c8)

3 years agofuse_ll: fix compile error when libfuse version is larger than 3.0 46949/head
Xiubo Li [Sat, 9 Jul 2022 00:48:40 +0000 (08:48 +0800)]
fuse_ll: fix compile error when libfuse version is larger than 3.0

Fixes: https://tracker.ceph.com/issues/56517
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 2f3f9d36afc891d55b1e4f13ca212c5aa040ee31)

3 years agoceph-fuse: add dedicated snap stag map for each directory
Xiubo Li [Wed, 6 Apr 2022 00:12:26 +0000 (08:12 +0800)]
ceph-fuse: add dedicated snap stag map for each directory

This will fix the fino colliding bug, which is caused when the
snapid is later than 0xffff.

From mds 'mds_max_snaps_per_dir' option, we can see that the max
snapshots for each directory is 4_K, and in ceph-fuse we have
around 64_K, which is from 0xffff - 2, stags could be used to make
the fake fuse inode numbers for each directory.

Fixes: https://tracker.ceph.com/issues/54653
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 7e4424a821f1f0162cc1f2bfddb1eb501e321702)

 Conflicts:
src/client/fuse_ll.cc

3 years agoceph-fuse: return EINVAL if get invalid fino instead of assert
Xiubo Li [Thu, 24 Mar 2022 02:01:57 +0000 (10:01 +0800)]
ceph-fuse: return EINVAL if get invalid fino instead of assert

All the snap ids of the finos returned to libfuse from libcephfs
will be recorded in the map of 'stag_snap_map', and will never be
erased before unmounting. So if libfuse passes invalid fino the
ceph-fuse should return EINVAL errno instead of crash itself.

Fixes: https://tracker.ceph.com/issues/54653
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit a6e83d8dece53d11d0753f4843a6235eb1bb9834)

3 years agoceph-fuse: reserve stag number 1 for snapdirs
Xiubo Li [Wed, 23 Mar 2022 06:30:07 +0000 (14:30 +0800)]
ceph-fuse: reserve stag number 1 for snapdirs

There have two stags will be reserved, 0 for CEPH_NOSNAP and 1 for
CPEH_SNAPDIR.

This will always make sure that for the nonsnap and snapdir inode
numbers to be consistent for all the ceph-fuse mounts.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 2349083a9d3f503dbe48fb1bdc3a88c881ed11a9)

3 years agomds-client: make the fake inos option unchangeable in runtime
Xiubo Li [Wed, 23 Mar 2022 02:05:32 +0000 (10:05 +0800)]
mds-client: make the fake inos option unchangeable in runtime

If the flags is empty then in option.h in can_update_at_runtime()
it will return true. That means this opetion could be changed in
runtime, which is buggy. Because if this is false, ceph-fuse will
use its own fake inos instead of libcephfs'. If this is changed
during runtime, we will hit inos dosn't exist assert bugs.

Fixes: https://tracker.ceph.com/issues/54653
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 28d17ff81a93d5442d2107abbd51296ac822073a)

 Conflicts:
src/common/options/mds-client.yaml.in

3 years agoMerge pull request #47838 from zdover23/wip-doc-2022-08-28-backport-47736-to-pacific
zdover23 [Sun, 28 Aug 2022 21:38:47 +0000 (07:38 +1000)]
Merge pull request #47838 from zdover23/wip-doc-2022-08-28-backport-47736-to-pacific

pacific: doc: Update release process doc to accurately reflect current process

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agodoc: Update release process doc to accurately reflect current process 47838/head
David Galloway [Mon, 22 Aug 2022 20:12:36 +0000 (16:12 -0400)]
doc: Update release process doc to accurately reflect current process

Signed-off-by: David Galloway <dgallowa@redhat.com>
(cherry picked from commit 4829af891ce9fbe41f4b48b10d342e774366dd52)

3 years agodoc/mgr: add prompt directives to dashboard.rst
Zac Dover [Thu, 25 Aug 2022 15:56:41 +0000 (01:56 +1000)]
doc/mgr: add prompt directives to dashboard.rst

This commit adds prompt directives (.. prompt:: bash $) to
the commands in dashboard.rst.

There are several ".. include::" directives in the dashboard.rst
file, which means that part of this page is sourced from elsewhere
than the dashboard.rst file. Because I have not yet added prompt
directives to those files, there is an inconsistency in the rendering
of this file. Most of the commands on this page have unselectable
prompts (unselectable prompts are the prompts that don't get added to
the buffer when you copy them to one of the clipboards). But the
commands on this page that come from those ".. include::" directives
do not yet have unselectable prompts.

This file is over 1600 lines long. It was perhaps not optimally wise
of me to have edited all of it in one fell swoop. It took many hours,
and carefully checking it will probably take at least one hour. I
suggest that whoever reviews this should not spend much time on it,
but should instead make a quick pass over the page and make sure that
it looks passable.

The English syntax on this page (and throughout the Dashboard doc-
umentation) will be tightened to remove ambiguity and to improve
readability in the near future, so hold all English-language-related
comments for a future pull request.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit d8064b46815e5e5c3c173f81d72b21c0a8949db7)

3 years agoMerge pull request #47525 from NitzanMordhai/wip-57076-pacific
Kefu Chai [Fri, 26 Aug 2022 16:43:50 +0000 (00:43 +0800)]
Merge pull request #47525 from NitzanMordhai/wip-57076-pacific

pacific: osd: remove invalid put on message

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Reviewed-by: Kefu Chai <tchaikov@gmail.com>
3 years agoMerge pull request #47807 from adk3798/pacific-rgw-bad-example
Adam King [Thu, 25 Aug 2022 16:30:40 +0000 (12:30 -0400)]
Merge pull request #47807 from adk3798/pacific-rgw-bad-example

pacific: doc/cephadm: fix example for specifying networks for rgw

Reviewed-by: Anthony D'Atri <anthonyeleven@users.noreply.github.com>
3 years agodoc/cephadm: fix example for specifying networks for rgw 47807/head
Adam King [Wed, 24 Aug 2022 14:36:53 +0000 (10:36 -0400)]
doc/cephadm: fix example for specifying networks for rgw

count_per_host must be used with underscores rather
than dashes to work, you need to pass service_id not
service_name and the option for the port is called
rgw_frontend_port not just "port"

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 6b6f56a5b623f68d59af8902eae5e1157f47e382)

3 years agoMerge pull request #47781 from zdover23/wip-doc-2022-08-24-backport-47751-to-pacific
zdover23 [Thu, 25 Aug 2022 12:47:40 +0000 (22:47 +1000)]
Merge pull request #47781 from zdover23/wip-doc-2022-08-24-backport-47751-to-pacific

pacific: doc/mgr: edit orchestrator.rst

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>