J. Eric Ivancich [Thu, 16 Feb 2023 15:29:31 +0000 (10:29 -0500)]
rgw/flight: don't access non-existant flight store during GetObj
The front end must be configured via ceph.conf to start up both the
flight_server and the flight_store. RGWGetObj needs to check for the
existence of a flight_store prior to trying to use it.
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
Ilya Dryomov [Thu, 16 Feb 2023 11:53:02 +0000 (12:53 +0100)]
qa/workunits/rbd-nbd: work around "rbd feature disable" hang
"rbd feature disable" appears to reliably hang if the corresponding
remote request is proxied to rbd-nbd (because rbd-nbd happens to own
the exclusive lock after a series of blkdiscard calls) [1]. Work
around it here by enabling journaling before the image is mapped
and disabling it after the image is unmapped.
Also, don't assert on the output of "rbd journal inspect --verbose"
having a certain number of entries. This is racy: if the script gets
delayed after the last blkdiscard call for some reason, there may be
fewer entries present in the journal or none at all.
Ilya Dryomov [Thu, 16 Feb 2023 11:51:04 +0000 (12:51 +0100)]
test/librbd: add LengthModifiedDiscardJournalAppendEnabled test
Currently nothing triggers the length_modified case in
ImageDiscardRequest::prune_object_extents() in isolation. It's only
triggered in DiscardGranularityJournalAppendEnabled test together with
the prune_required case and a bad refactoring could easily break the
length_modified logic again.
N Balachandran [Thu, 16 Feb 2023 04:57:02 +0000 (10:27 +0530)]
rbd-mirror: fix syncing_percent calculation logic in get_replay_status()
When a snapshot sync is resumed and the get_replay_status function
is called before handle_copy_image_progress, the syncing_percent
value may be greater than 100 as the m_local_object_count is still
set to zero. This commit sets the syncing_percent to 0 in such cases.
Fixes: https://tracker.ceph.com/issues/58706 Signed-off-by: N Balachandran <nibalach@redhat.com>
Yixin Jin [Wed, 15 Feb 2023 17:08:19 +0000 (17:08 +0000)]
rgw: Fix segfault due to concurrent socket use at timeout
This commit fixes a potential segfault risk when
rgw timeout handler works on the socket in one
thread while it is concurrently used by another.
The details of the fix are:
1. Instead of calling socket close(), which resets
descriptor_data in boost::asio socket and risks
segfault due to concurrent use of the socket,
the timeout handler now calls cancel() to abort
all pending ops followed by shutdown() to disable
the underlying transport. The eventual closure of
the socket will be done in the socket destructor.
2. Expose the actual boost::asio socket via get_socket()
from Connection so that the timeout handler can call
cancel() and shutdown() on it, although the socket data
member is already accessible. It allows future expansion
that wants to hide the socket even though it renders the
existing close() less useful.
Fixes: https://tracker.ceph.com/issues/58670 Signed-off-by: Yixin Jin <yjin77@yahoo.ca>
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>
bryanmontalvan [Wed, 3 Aug 2022 01:39:05 +0000 (21:39 -0400)]
mgr/dashboard: dashboard-v3: status card
This commit is the bare-bones work of the status card. The only logic
written in this commit is the Cluster health status icon.
tracker: https://tracker.ceph.com/issues/58728 Signed-off-by: bryanmontalvan <bmontalv@redhat.com>
mgr/dashboard: introduce active alerts to status cards
This commit add the following
- A new dashboard component, which will exist in parallel with in the
current landing-page
- Created a route for this dashboard `/dashboard_3`
- Created a bare-bones bootstrap grid with mock-up card components
Signed-off-by: bryanmontalvan <bmontalv@redhat.com> Signed-off-by: Pedro Gonzalez Gomez <pegonzal@redhat.com>
mgr/dashboard: changes to first layout
CHANGES:
- Renamed dashboardcomponents
- Removed unnecesary styling
- Added unit tests
Signed-off-by: Pedro Gonzalez Gomez <pegonzal@redhat.com>
Moved router.url logic inside html template
This commit removes the `this.router.url` logic which was located in the
`workbench-layout.component.ts` file and moved it into the HTML template
section.
Signed-off-by: bryanmontalvan <bmontalv@redhat.com>
mgr/dashboard: syntax changes from bootstrap 4 to 5
Signed-off-by: Pedro Gonzalez Gomez <pegonzal@redhat.com>
mgr/dashboard: small fixes and improvements over all cards and layout
- all cards placed evenly with the same height
- increased font size on details card and adjusted margin
- changed capacity card legend to: "Used"
- adjusted cluster utilization card margins and increased graphs height
- improved status card toggle
- changed orchestror to orchestrator
- switched IPS/OPS graph colors
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)