Afreen Misbah [Fri, 11 Oct 2024 15:28:56 +0000 (20:58 +0530)]
mgr/dashboard: Adapt gateway group changes in nvmeof UI
- Added gateway group param in namespace request - GET, POST, PATCH, DELETE
- Added gateway group param in Listeners request - GET
- Added gateway group param in Initiators - GET, POST, DELETE
Redouane Kachach [Tue, 15 Oct 2024 11:34:32 +0000 (13:34 +0200)]
mgr/cephadm: disabling nginx buffering for grafana location
Disabling Nginx buffering for Grafana, as it may lead to errors or
delays while loading the main Grafana page, particularly when
receiving JavaScript files.
Anoop C S [Tue, 27 Aug 2024 10:20:44 +0000 (15:50 +0530)]
client: Resolve symlink from dirfd for empty pathname
man readlinkat(2)[1] points at a special case for readlinkat() syscall
as follows:
. . .
Since Linux 2.6.39, pathname can be an empty string, in which case the
call operates on the symbolic link referred to by dirfd (which should
have been obtained using open(2) with the O_PATH and O_NOFOLLOW flags).
. . .
man open(2)[2] further explains the need for such a special case when
a symlink is opened with O_PATH and O_NOFOLLOW:
. . .
If pathname is a symbolic link and the O_NOFOLLOW flag is also
specified, then the call returns a file descriptor referring to the
symbolic link. This file descriptor can be used as the dirfd argument
in calls to fchownat(2), fstatat(2), linkat(2), and readlinkat(2) with
an empty pathname to have the calls operate on the symbolic link.
. . .
Accordingly have a check to resolve symlinks out of dirfd when empty
pathnames are encountered within readlinkat(). In addition to that
match the standard file system behavior to return ENOENT instead of
EINVAL when the inode pointed to by dirfd is not a symbolic link with
empty pathnames.
Anoop C S [Thu, 29 Aug 2024 06:23:44 +0000 (11:53 +0530)]
client: Fix symlink open with O_PATH and O_NOFOLLOW
man open(2)[1] says the following for O_PATH:
. . .
If pathname is a symbolic link and the O_NOFOLLOW flag is also
specified, then the call returns a file descriptor referring to the
symbolic link. This file descriptor can be used as the dirfd argument
in calls to fchownat(2), fstatat(2), linkat(2), and readlinkat(2) with
an empty pathname to have the calls operate on the symbolic link.
. . .
symlink check within may_open() failed to consider the O_PATH flag
resulting in a ELOOP error to the client. In order to return a valid
file descriptor we introduce a check for the presence of O_PATH in
the client provided flags.
Casey Bodley [Mon, 14 Oct 2024 20:07:38 +0000 (16:07 -0400)]
osdc: remove unused overloads for async::Completion
ea67f3dee2a3f8fcdcbb0bc0e80e38ec70378f05 switched to
asio::any_completion_handler<> for completions, but left some converting
overloads behind for compatibility. none of those overloads appear to be
used, so remove them
Afreen Misbah [Fri, 11 Oct 2024 08:57:24 +0000 (14:27 +0530)]
mgr/dashboard: Fix listener deletion
Listener deletion is broken due to passing wrong gateway address.
Including `traddr` in DELETE API of listener to choose correct gateway address for deletion.
Nizamudeen A [Wed, 9 Oct 2024 14:45:55 +0000 (20:15 +0530)]
mgr/dashboard: fix group name bugs in the nvmeof API
there are 2 issues
1. in cephadm, i was always using the first daemon to populate the group
in all the services for the dashboard config.
2. in the API, if there are more than 1 gateways listed in the config,
rather than chosing a random gateway from the group, raise an
exception and warn user to specify the gw_group parameter in the api
request
Fixes: https://tracker.ceph.com/issues/68463 Signed-off-by: Nizamudeen A <nia@redhat.com>
Aashish Sharma [Wed, 9 Oct 2024 14:02:49 +0000 (19:32 +0530)]
mgr/cephadm: RGW service deployment defaults to 'default' realm/zonegroup/zone despite non-default spec in service
When we create an RGW service using the ceph orch apply command, the service is always deployed in the default realm, zonegroup, and zone, even if we specify a different realm, zonegroup, or zone in the service spec. This happens because certain configuration values, like rgw_realm, rgw_zonegroup, and rgw_zone, need to be set for the RGW instances before the daemons are deployed. Currently, these configurations are being applied after the RGW daemons are deployed, which requires a service restart to reflect the correct realm, zonegroup, and zone. Ideally, these configurations should be applied before the RGW daemons are deployed, so they are correctly placed in the desired realm, zonegroup, and zone from the start.
Ronen Friedman [Tue, 8 Oct 2024 13:25:56 +0000 (08:25 -0500)]
qa/standalone/scrub: remove TEST_recovery_scrub_2
That test does no longer match the actual requirements and
implementation of scrubbing.
It was already deactivated in
https://github.com/ceph/ceph/pull/59590. Here - it is
fully removed, mainly for the sake of backporting.
Ronen Friedman [Sat, 5 Oct 2024 12:33:49 +0000 (07:33 -0500)]
osd/scrub: modify ScrubStore contents retrieval
A separate commit added a simple test to verify the new
store implementation (creating both shallow & deep errors),
scrubbing (step 1), deep scrubbing (step 2), then shallow
scrubbing again (step 3). The test verifies that
the results after step 2 include all shallow errors data (*),
and that the results after step 3 include all deep errors
data.
The test highlighted the need to correctly partition and
retrieve the "shards inconsistencies" and the "selected
shard" data, which was not fully implemented in the
previous commit. Thus, this commit adds the following:
- add_object_error() no longer filters out data saved during
deep scrubbing; it also filters less of the shallow scrubs
"shards inconsistencies" data;
- merge_encoded_error_wrappers() now merges the "shards
inconsistencies" data correctly, handling the multiple
scenarios possible.
(*) note the special case of not being able to read the
object's version during deep scrubbing (due to a read
error). In this case - the data collected during the
shallow scrub will not be reported.
common/scrub,osd/scrub: minor cleanups to ScrubStore
Including:
- introducing 'no out param' encode() for the inconsistent wrappers;
- renaming the ambiguous 'empty()' to 'is_empty()';
- removing unused code;
- a few other minor cleanups.
osd/scrub: add dout() capability to the ScrubStore
now that the ScrubSTore object is directly created by the
scrubber, (and has a lifetime that does not extend beyond
the scrubber object), we can add the same dout()
mechanism used by the other scrubber sub-objects.
Note: that mechanism will be changed shortly, so that the
sub-objects would use one prefix() creator supplied by
the Scrubber object.
osd/scrub: directly create or reinit the ScrubStore
The ScrubStore is now directly created or reinitialized by the
Scrubber. Note that the store object is not identical to the
errors DB: the errors DB is an entity in the OSD store (a
collection of OMap entries in a uniquely-named object(s)),
while the ScrubSTore object is a cacher and accessor for
that entity. That one can be recreated or disposed of at
will.
We now do not recreate the ScrubStore object for every scrub.
mgr/cephadm: move Grafana's subpath handling logic to grafana config
Fixes: https://tracker.ceph.com/issues/68315
So far, Grafana's subpath handling has been managed on the Nginx
server side using a rewrite rule. Let's move this logic to the Grafana
side to make it consistent with the rest of the monitoring services.
Naman Munet [Mon, 7 Oct 2024 05:11:29 +0000 (10:41 +0530)]
mgr/dashboard: unable to edit pipe config for bucket level policy of a bucket
Fixes: https://tracker.ceph.com/issues/68387
Fixes Includes:
1) Passing additional parameter for 'user' and 'mode' as the user can be either system/dashboard or other values while creating pipe.
2) Previously while removing the src/dest bucket field, we were getting same old values on editing pipe, but now it will become '*' if empty value passed from frontend.
Signed-off-by: Naman Munet <namanmunet@li-ff83bccc-26af-11b2-a85c-a4b04bfb1003.ibm.com>
Lee Sanders [Fri, 4 Oct 2024 14:13:57 +0000 (15:13 +0100)]
qa/suites/tasks/cbt.py: Deprecating cosbench from Teuthology in preparation for deletion of cosbench support
from CBT. The code being deleting is infrastructure code, no qa test suite uses this function. Therefore it can
be safely deleted.
Vallari Agrawal [Wed, 9 Oct 2024 07:27:32 +0000 (12:57 +0530)]
qa/workunits/nvmeof/setup_subsystem.sh: use --no-group-append
In newer version of nvmeof cli, "subsystem add" needs
this tag to ensure subsystem name is value of --subsystem.
Otherwise, in newer cli version, the gateway group is appended
at the end of the subsystem name.
This fixes the teuthology nvmeof suite (currently all jobs fails
because of this).
Anoop C S [Thu, 10 Oct 2024 05:30:03 +0000 (11:00 +0530)]
cephadm/smb: Add NET_RAW capability to deploy ctdbd
CTDB heavily depends on raw sockets to send gratuitous ARPs[1](see the
second point from the list of reasons to use gratuitous ARPs). As per
the current design it is also inevitable while sending tickle ACKs[2]
in the event of an IP failover. man capabilities(7)[3] further mandates
CAP_NET_RAW to use raw sockets. Therefore append NET_RAW to the list of
capabilties while deploying ctdbd containers.
Avan Thakkar [Wed, 9 Oct 2024 13:01:11 +0000 (18:31 +0530)]
qa/cephfs: update earmark values to valid ones in test_volumes.py
smb.test is an invalid earmark now it should be either smb or
smb.cluster.<cluster_id>. Update the test_volumes.py to set
valid earmarks wherever used.
JonBailey1993 [Wed, 9 Oct 2024 10:28:42 +0000 (11:28 +0100)]
common/io_exerciser: Modify is_locked_by_me call in ceph_test_rados_io_sequence
is_locked_by_me() is a function of ceph::mutex which is only used in debug builds. By using the ceph_mutex_is_locked_by_me macro, we can neatly make sure we only run this function in debug mode, allowing compilation to no longer be affected when running in release mode.
Signed-off-by: Jon Bailey <jonathan.bailey1@ibm.com>