Commit Graph

2743 Commits

Author SHA1 Message Date
Venky Shankar
e84f319c66 Merge PR #50053 into main
* refs/pull/50053/head:
	libcephfs: move ClearSetuid to suidsgid.cc
	libcephfs: add test cases for dropping the suid/sgid in write/truncate
	libcephfs: add test cases for dropping the suid/sgid in fallocate
	libcephfs: fix ClearSetuid incorrectly using SETATTR_MODE mask
	client: switch to clear_suid_sgid for ftruncate
	client: switch to clear_suid_sgid for _write()
	mds/client: clear the suid/sgid in fallocate path
	client: allow unprivileged users to clear suid/sgid

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
2023-03-30 14:48:26 +05:30
Rishabh Dave
877f6be743 qa/workunit/fs: print commands for making debugging easier
Print the commands and their arguments as they are being executed for
kernel_untar_tar.sh so that it's easier to debug when a teuthology
failure occurs due to it.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-03-29 18:06:58 +05:30
Yuri Weinstein
173d5a56ec
Merge pull request #50334 from kamoltat/wip-ksirivad-fix-autoscale-warn
pybind/mgr/pg_autoscaler: Reorderd if statement for the func: _maybe_adjust

Reviewed-by: Laura Flores <lflores@redhat.com>
2023-03-22 16:24:51 -07:00
Casey Bodley
504ff07cda
Merge pull request #49328 from BryceCao/wip-fix-python-script-using-s3cmd-with-error-code-403
rgw : fix python script using s3cmd with error code 403

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2023-03-22 08:59:19 -04:00
Mark Kogan
2cb9441180 rgw : fix python script using s3cmd with error code 403 w/https
Fixes: https://tracker.ceph.com/issues/54104

Signed-off-by: Mark Kogan <mkogan@redhat.com>
2023-03-21 18:30:12 +02:00
Casey Bodley
ee1ae6cbd0
Merge pull request #49443 from cbodley/wip-qa-supported-distros
qa/distros: add ubuntu 22 as supported distro

Reviewed-by: Yuri Weinstein <yuriw@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2023-03-17 15:36:41 -04:00
Ilya Dryomov
3b1610997a qa/workunits/rbd: use bionic version of qemu-iotests for jammy
Same as in commit 2de2146c30 ("qa/workunits/rbd: use bionic version
of qemu-iotests for focal").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2023-03-15 17:12:36 +01:00
Xiubo Li
36416b2df5 libcephfs: add test cases for dropping the suid/sgid in fallocate
This test cases are from xfstests-dev's generic/684.

Fixes: https://tracker.ceph.com/issues/58680
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2023-03-14 22:58:44 +08:00
Casey Bodley
a22b26eade
Merge pull request #50347 from cbodley/wip-rgw-sal-aio
rgw/aio: remove RGWSI_RADOS from generic Aio::get()

Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
2023-03-14 09:40:45 -04:00
Venky Shankar
ad7eb17266 qa: fixup quota values exceeding 64 bit signed int value
The test does the following:

        setfattr -n ceph.quota.max_bytes -v 8388608Ti .

This failes since 8388608Ti exceeds 64 bit signed integer value.
Change that to the approprivate value and expect faliure when
quota is set for this exceeded value.

Fixes: http://tracker.ceph.com/issues/55940
Introduced-by: 7330651482
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2023-03-13 14:42:13 +05:30
Venky Shankar
3286d478e7 qa, cleanup: no need to specify human readable quota values in comment
... since the values themselves are self-explanatory.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
2023-03-13 14:05:25 +05:30
Casey Bodley
e587a71aff test/rgw: ceph_test_rgw_throttle no longer needs rados
run it as a unittest instead of a workunit

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2023-03-12 18:56:54 -04:00
Laura Flores
cda85937c4
Merge pull request #50065 from ajarr/fix-58691
mgr: store names of modules that register RADOS clients in the MgrMap
2023-03-09 13:09:04 -06:00
Venky Shankar
2e2e7b9186 Merge PR #49008 into main
* refs/pull/49008/head:
	doc/quota: accept human readable quota value documented
	qa/workunits/fs/quota.sh: use human readable format for ceph.quota.max_bytes
	qa: added three testcases
	mds: accept human readable values for quotas

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Reviewed-by: Kotresh Hiremath Ravishankar <khiremat@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Anthony D Atri <anthony.datri@gmail.com>
2023-03-08 12:36:21 +05:30
Matan
5841654405
Merge pull request #49116 from Matan-B/wip-matanb-c-balanced-reads
crimson/osd: Support balance reads

Reviewed-by: Samuel Just <sjust@redhat.com>
2023-03-07 18:58:58 +02:00
Matan Breizman
b73d8fd860 qa/*/crimson: Seperate Crimson's rbd api testing
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
2023-03-07 08:57:03 +00:00
Casey Bodley
0d01e69689
Merge pull request #50003 from mkogan1/wip-fix-t58552
qa: d3n: fix test failure when "inline_data": false

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2023-03-05 09:33:03 -05:00
Kamoltat
009430b554 qa/workunits/mon/pg_autoscaler: Added bug-reproducer/test
Added a bug-reproducer/test to fix:

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

Signed-off-by: Kamoltat <ksirivad@redhat.com>
2023-03-01 21:07:54 +00:00
Ramana Raja
b545fb9f56 mgr: store names of modules that register RADOS clients in the MgrMap
The MgrMap stores a list of RADOS clients' addresses registered by the
mgr modules. During failover of ceph-mgr, the list is used to blocklist
clients belonging to the failed ceph-mgr.

Store the names of the mgr modules that registered the RADOS clients
along with the clients' addresses in the MgrMap. During debugging, this
allows easy identification of the mgr module that registered a
particular RADOS client by just dumping the MgrMap (`ceph mgr dump`).

Following is the MgrMap output with a module's client name displayed
along with its client addrvec,
$ ceph mgr dump | jq '.active_clients[0]'
{
  "name": "devicehealth",
  "addrvec": [
    {
      "type": "v2",
      "addr": "10.0.0.148:0",
      "nonce": 612376578
    }
  ]
}

Fixes: https://tracker.ceph.com/issues/58691
Signed-off-by: Ramana Raja <rraja@redhat.com>
2023-02-28 09:20:28 -05:00
Ilya Dryomov
8d57d55738
Merge pull request #50230 from idryomov/wip-58833
librbd: call apply_changes() after setting librados_thread_count

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Christopher Hoffman <choffman@redhat.com>
2023-02-27 14:15:31 +01:00
Ilya Dryomov
b21a379c5b librbd: call apply_changes() after setting librados_thread_count
Otherwise the setting doesn't take effect.  While at it, replace
home-grown stringify() with standard to_string().

Fixes: https://tracker.ceph.com/issues/58833
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2023-02-23 12:50:45 +01:00
dparmar18
7330651482 qa/workunits/fs/quota.sh: use human readable format for ceph.quota.max_bytes
Fixes: https://tracker.ceph.com/issues/55940
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2023-02-23 16:50:06 +05:30
Laura Flores
46d0cbf033
Merge pull request #49910 from myoungwon/fix-58587
qa/workunits/rados/test_dedup_tool.sh: reset dedup tier during tests
2023-02-20 14:24:03 -06:00
Mark Kogan
f474c7fdbe qa: d3n: fix test failure when "inline_data": false
Fixes: https://tracker.ceph.com/issues/58552

Signed-off-by: Mark Kogan <mkogan@redhat.com>
2023-02-19 13:40:48 +02:00
Ilya Dryomov
f4edd7728a
Merge pull request #49614 from isodude/wip-librbd-misalign-discard
librbd: Fix local rbd mirror journals growing forever

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2023-02-17 18:09:39 +01:00
Lucian Petrut
3fdad23e63 quincy: qa: update test_rbd_wnbd.py to report latency in seconds
At the moment, the latency results are reported in nanoseconds.
In order to improve readability, we'll convert it to seconds.

While at it, we'll fix the fio duration report, which we're
wrongfully dividing by 1000 twice.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2023-02-16 12:11:58 +00:00
Stefan Chivu
fa62b2add6 qa: Added latency to results table in test_rbd_wnbd.py
Added data regarding completion latency (ns) to the fio results
table, such as min, max, mean, stddev, etc.

Signed-off-by: Stefan Chivu <schivu@cloudbasesolutions.com>
2023-02-16 12:11:48 +00:00
Ilya Dryomov
fcfef0a19e 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.

[1] https://tracker.ceph.com/issues/58740

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2023-02-16 13:05:05 +01:00
Ilya Dryomov
5cec2670be 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.

Fixes: https://tracker.ceph.com/issues/58688
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2023-02-10 15:26:27 +01:00
Laura Flores
8b5ab2bc03
Merge pull request #49848 from ljflores/wip-tracker-58545
qa/workunits: give telemetry opt-in check more time
2023-02-02 09:36:20 -06:00
myoungwon oh
b2534d90ec qa/workunits/rados/test_dedup_tool.sh: reset dedup tier during tests
Dedup_tier option needs to be reset whenever every test begins,
because dedup_tier(dedup_chunk_pool) is deleted at the end of each
test---if not, this causes error in case dedup_tier's pool id is
changed.
This commit adds a set command to refresh newly added dedup_tier
pool id.

fixes: https://tracker.ceph.com/issues/58587

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
2023-01-30 11:10:15 +09:00
Casey Bodley
2007452b8d qa/workunits/rgw: run-s3tests.sh uses tox
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2023-01-25 23:23:37 -05:00
Laura Flores
65fb727b25
Merge pull request #49314 from SUSE/wip-tserong-qa-crash-chown
qa/workunits/rados/test_crash: chown crash files to ceph user
2023-01-25 17:23:09 -06:00
Venky Shankar
90a43d1cfb
Merge pull request #49796 from batrick/first-damage-big-dir
tools/cephfs/first-damage: fix iteration of big dirfrags

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2023-01-24 10:22:57 +05:30
Laura Flores
833dffa680 qa/workunits: give telemetry opt-in check more time
Previously, we only allotted 2 seconds for the telemetry
opt-in status to disappear. However, it sometimes takes longer
than this for the ceph status to update.

Here, we give the status up to 60 seconds to update.

Fixes: https://tracker.ceph.com/issues/58545
Signed-off-by: Laura Flores <lflores@redhat.com>
2023-01-23 16:51:25 -06:00
Josef Johansson
21a26a7528 librbd: Fix local rbd mirror journals growing forever
This commit fixes commit 7ca1bab90f by pushing properly aligned
discards back to m_image_extents, if corrected.

If discards are misaligned (off 0, len 4608, gran=4096), they are
corrected properly, but only in object_extents and not in
m_image_extents.

When journal_append_event is triggered it will only append from
m_image_extents and does not now about the alignment fixes. In
commit_io_events_extent it will log a message and return without
completing the io since the larger misaligned area was sent to the journal.
This will in turn break rbd journal mirroring since the local client will wait
indefinately on the commit to be completed, which it never does.

This does not effect rbd-mirror in any way, which may be confusing and
dangerous since it's only rbd-mirror that updates ceph health, and not
the local client.

Setting `rbd_skip_partial_discard = false` under client will restore the
pre 7ca1bab behaviour and thus not trigger the bug with journals growing.
This will set `rbd_discard_granularity_bytes = 0` internally. This
setting is only changed during startup of a client.

Fixes: 7ca1bab90f
Fixes: https://tracker.ceph.com/issues/57396
Signed-off-by: Josef Johansson <josef@oderland.se>
2023-01-20 11:59:16 +01:00
Patrick Donnelly
b1a6479c32
tools/cephfs/first-damage: fix iteration of big dirfrags
We have to iterate in chunks otherwise the get_omap_vals API returns
partial results even if the max count is large.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2023-01-19 13:04:50 -05:00
Ilya Dryomov
562a2ad03a
Merge pull request #48848 from stefan-chivu/rbd-wnbd-live-resize
rbd: live resize support for rbd-wnbd

Reviewed-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2023-01-19 17:29:36 +01:00
Lucian Petrut
2b014e159f qa: add windows run-tests.ps1
We have a few Python rbd-wnbd tests that are invoked explicitly
by the ceph-build scripts [1].

There are a few issues with that:

* it's a separate repo that has to be updated whenever we add new
  tests
* new tests that reside in the ceph repo will not be executed by
  the PR check
* some tests may be missing in case of older branches

For this reason, we're adding a new script as part of the Ceph
repo that will take care of invoking the Windows rbd-wnbd tests.

The ceph-build script has already been updated accordingly [2].

[1] https://github.com/ceph/ceph-build/blob/main/scripts/ceph-windows/run_tests#L73-L80
[2] https://github.com/ceph/ceph-build/pull/2094

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
Co-Authored-By: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
2023-01-18 15:32:50 +02:00
Lucian Petrut
0bf85c7be7 qa: add test_rbd_wnbd resize test
We're adding a test for the newly introduced live resize feature.
It will simply extend/shrink the image, wait for the new size to
be picked up and then run FIO tests to validate the resized image.

While at it, we're fixing two unrelated linter warnings:

  E275 missing whitespace after keyword

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2023-01-16 10:12:12 +02:00
Venky Shankar
6243f33d0b
Merge pull request #49664 from batrick/first-damage-repair-nosnap
tools/cephfs/first-damage: repair specific first=CEPH_NOSNAP damage

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2023-01-10 09:59:51 +05:30
Patrick Donnelly
2ade9390c6
tools/cephfs/first-damage: repair specific first=CEPH_NOSNAP damage
first==CEPH_NOSNAP is never valid. Apparently somehow the MDS may set
this in some code path yet to be discovered, even without snapshots.

Note, we probably should not necessarily automate this fix via the MDS
because we do not know if this dentry (visible in HEAD) should also be
visible before NEXT_SNAP.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2023-01-07 15:49:46 -05:00
Lucian Petrut
788dd5e7fb qa: test_rbd_wnbd.py - disable PS progress bar
This test uses certain PS commands that attempt to display
a progress bar. However, this can cause issues when invoked
remotely (e.g. by the jenkins job).

For this reason, we're defining a helper (ps_execute) that runs
PS commands, disabling the progress bars and enabling the non
interactive mode.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2023-01-05 11:41:48 +02:00
Lucian Petrut
65544da400 qa: retry test_rbd_wnbd.py fs operations
Certain FS related operations can fail, especially under load
(e.g. initializing partitions, volume formatting, etc).

For this reason, we're going to introduce some retries.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2023-01-04 07:08:39 +02:00
Lucian Petrut
b52e07cbf3 qa: add some retries to test_rbd_wnbd.py
The following operations may fail right after a block device
is attached:

* retrieving the disk number (can return -1)
* opening the disk
* setting the disk online or writable

For this reason, we'll need to add some retries. For convenience,
we're moving the existing retry logic to a separate decorator.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2022-12-23 19:38:23 +02:00
Lucian Petrut
540a089995 qa: fix test_rbd_wnbd.py, properly retrieving the drive letter
Instead of trying to use the first partiton which may be reserved
by Windows, we'll fetch the first non-empty drive letter from
the disk that we've just mounted.

While at it, we're ensuring that the drive letter is actually a
letter and not a null character, which the Powershell command
returns in case of empty drive letters.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2022-12-23 17:55:25 +02:00
Ilya Dryomov
00332ccbfa
Merge pull request #48929 from petrutlucian94/rbd_py_test
qa: fix test_rbd_wnbd.py

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2022-12-21 11:42:57 +01:00
Lucian Petrut
14c603a7c5 qa: add fs tests to test_rbd_wnbd.py
The Windows rbd-wnbd python test performs various IO operations
against raw disks.

However, it can be useful to test overlaying filesystems as well.
For this reason, we're adding the following tests:

* RbdFsTest
* RbdFsFioTest
* RbdFsStampFioTest

To simplify the implementation, those tests reuse the existing
ones along with a mixin class (RbdFsTestMixin).

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2022-12-16 12:20:02 +02:00
Lucian Petrut
d9decba6ba qa: test_rbd_wnbd.py improvements
We'll make the following improvements to the Windows rbd-wnbd
Python test:

* expose fio write validation, defaulting to crc32c
* change the default fio operation to "rw"
* enable the disk and clear the "rw" flag only if required by the
  test and if "--skip-enabling-disk" is not set (useful with custom
  SAN policies). This operation can take a significant amount of
  time under heavy load.
* print fio read and write results separately instead of
  aggregating them, useful when running rw tests

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2022-12-16 12:15:06 +02:00
Venky Shankar
b2cd0fe8f6 Merge PR #49021 into main
* refs/pull/49021/head:
	qa: switch to https protocol for repos' server

Reviewed-by: Rishabh Dave <ridave@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
2022-12-15 16:51:23 +05:30