Xiubo Li [Tue, 5 Jul 2022 04:59:11 +0000 (12:59 +0800)]
client: switch to use 32 bits ext_num_fwd
The MDS will increase the forward count, and if the forward count
is less than the one saved in request in client side, that means
the MDS is old version and it was overflowed. Then just stop
forwarding.
Fixes: https://tracker.ceph.com/issues/57854 Signed-off-by: Xiubo Li <xiubli@redhat.com>
Xiubo Li [Tue, 5 Jul 2022 04:59:11 +0000 (12:59 +0800)]
client: switch to use 32 bits ext_num_retry
Check the CEPHFS_FEATURE_32BITS_RETRY_FWD feature bit and if not
set, that means it's connecting to an old MDS and will limit the
max retry to 256 times.
Fixes: https://tracker.ceph.com/issues/57854 Signed-off-by: Xiubo Li <xiubli@redhat.com>
Venky Shankar [Wed, 15 Feb 2023 13:28:29 +0000 (18:58 +0530)]
Merge PR #48053 into main
* refs/pull/48053/head:
test/libcephfs: fix rebasing issues
libcephfs: replace errno.h errors with CEPHFS_E*
messages: avoid converting ceph errors on Windows
client: use CEPHFS_E*
test/libcephfs: use CEPHFS_E* errors
libcephfs: switch to CEPHFS_E* errors
test/libcephfs: disable flaky timestamp assertion on Windows
client: use _setattrx when changing timestamps
client: set nsec to 0 when converting stat struct on Windows
test/libcephfs: skip dirent inode check on Windows
client: avoid trimming inodes on Windows
test/libcephfs: address windows issues
test/libcephfs: include compat.h
test/libcephfs: enable the tests on Windows
Reviewed-by: Venky Shankar <vshankar@redhat.com> Reviewed-by: Anthony D Atri <anthony.datri@gmail.com> Reviewed-by: Patrick Donnelly <pdonnell@redhat.com> Reviewed-by: Rishabh Dave <ridave@redhat.com>
Zac Dover [Tue, 14 Feb 2023 11:53:02 +0000 (21:53 +1000)]
doc/rgw: refine "Multi-site Config Ref" (1 of x)
Refine the syntax (and in some cases, the semantics) of the English in
"Multi-site Configuration Reference" in doc/radosgw/multisite.rst. This
is a long section, so more PRs are likely.
osd, mon: add read balance score to command `ceph osd pool ls detail`
for replicated pools.
osd: Added workload balance score to the command
ceph osd pool ls detail
(different flavors for console output and json/xml output)
mon: Added command 'osd rm-primary-temp'
(developers only) rm was not working
vstart: Added osd debug messages into mon log with -d flag
For commands that execute methonds in OSD module
Pere Diaz Bou [Mon, 23 Jan 2023 11:34:12 +0000 (12:34 +0100)]
mgr/dashboard: rgw role listing
Listing is performed using the radosgw-admin command api we have with
the mgr for now until the S3 api is fixed: https://tracker.ceph.com/issues/58547.
This commit fixes and issue with regards to the _crud.py controller
where redefining `CRUDClassMetadata` caused the users table and the
roles table to share columns. We fixed this by creating
CRUDClassMetadata dynamically for each endpoint.
The issue described above is linked to an issue with NamedTuple were
default nested lists are not a great move because it can cause
unexpected issues when 2 or more classes are created. Moreover,
NamedTuples are read-only making initialization even harder without
factory methods as with dataclasses. Therefore, let's move to the good
old __init__ :).
Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com> Fixes: https://tracker.ceph.com/issues/58699
Ronen Friedman [Mon, 24 Jan 2022 08:43:41 +0000 (08:43 +0000)]
osd/scrub: create a separate chunk size conf for shallow scrubs
Using the existing common default chunk size for scrubs that are
not deep scrubs is wasteful: a high ratio of inter-OSD messages
per chunk, while the actual OSD work per chunk is minimal.
rgw: rgw_token.cc error: reference to 'formatter' is ambiguous
compiling main branch on Fedora 38 and 39/rawhide with gcc-c++-13.0.1
fails with the error:
/builddir/build/BUILD/ceph-18.0.0-2148-g9754cafc/src/rgw/rgw_token.cc:
In function 'int main(int, char**)':
/builddir/build/BUILD/ceph-18.0.0-2148-g9754cafc/src/rgw/rgw_token.cc:125:3:
error: reference to 'formatter' is ambiguous
125 | formatter = new JSONFormatter(true /* pretty */);
| ^~~~~~~~~
Similar error for src/test/test_rgw_token.cc
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Adam King [Mon, 13 Feb 2023 03:18:25 +0000 (22:18 -0500)]
cephadm: fix autopep8 arg parsing on newer tox versions
This was failing for me on new tox versions with
fix: commands[1]> autopep8 --max-line-length 100
incorrect number of argumentsfix: exit 99 (0.06 seconds) /home/adking/ceph/src/cephadm> autopep8 --max-line-length 100 pid=309039
fix: FAIL ✖ in 0.08 seconds
As it was considering our list of args for autopep8 to each be
one separate command. Fixed by just adding slashes to the ends
of the lines (as has already been done in the tox.ini in src/pybind/mgr
for some of the tests there)
Ilya Dryomov [Fri, 10 Feb 2023 12:56:57 +0000 (13:56 +0100)]
qa/suites/rbd: fix sporadic "rx-only direction" test failures
The existing
xmlstarlet sel -t -v '//mirror/peers/peer[1]/uuid')" = ""
test is bogus since a tx-only peer gets added after the remote
rbd-mirror daemon pings the local cluster. It happened to pass most
of the time because xmlstarlet filter just failed on an empty peers
array, producing the wrongly expected empty string by accident.
Zac Dover [Fri, 10 Feb 2023 02:40:01 +0000 (12:40 +1000)]
doc/rgw: refine "Configuring Secondary Zones"
English grammar and syntax pass (and some pragmatics, too, where I had
enough understanding to be helpful that way) for "Configuring Secondary
Zones" in doc/radosgw/multisite.rst.
Add a note on the fact that CephFS extended attributes are not printed
by "getfattr /some/cephfs/dir/ -d -m -" even when the CephFS directory
has some extended attributes set on it.
crimson/osd: make the ObjectContextRegistry per-PG
This patch moves the OBC registry from ShardServices (which
is basicaly a gateway to a bunch of PGs) into PG itself.
Dividing OBCs by PG (they truly belong to) minimizes the space
to search when e.g. checking whether a client is blocked or
not. Therefore, this commit is enabler of more performant
PR #47637.
The changeset draws the assumption that OBC registry and all
its users live on the same CPU core. It looks valid to me.
ceph-volume: do not raise RuntimeError in util.lsblk
Otherwise it makes `simple scan` calls fail.
```
File "/usr/lib/python3.6/site-packages/ceph_volume/util/disk.py", line 246, in lsblk
raise RuntimeError(f"{device} not found is lsblk report")
RuntimeError: /var/lib/ceph/osd/ceph-0/ not found is lsblk report
```
Yingxin Cheng [Wed, 7 Dec 2022 02:08:18 +0000 (10:08 +0800)]
crimson/net: introduce IOHandler class for message and event dispatching
IOHandler also represents the Connection as ConnectionHandler.
ProtocolV2 and IOHandler will be finally running in different cores, as
ProtocolV2 will need to call IOHandler interfaces asynchronously. And
IOHandler will also notify ProtocolV2 through HandshakeListener
asynchronously.
Yingxin Cheng [Tue, 6 Dec 2022 01:15:28 +0000 (09:15 +0800)]
crimson/net: move mark_down() from ProtocolV2 to Protocol
Process mark_down in Protocol rather than in ProtocolV2 to prevent
further event dispatching after mark_down is called by user. Then notify
ProtocolV2 as the IO/socket core and handshake core can be different and
the notification can be asynchronous.
Yingxin Cheng [Mon, 5 Dec 2022 08:30:25 +0000 (16:30 +0800)]
crimson/net: move is_connected() from ProtocolV2 to Protocol
Infer is_connected by connection events instead of the protocol V2
internals. That can save a cross-core operation for connection users
from the connection IO core to the handshake core.