Commit Graph

2701 Commits

Author SHA1 Message Date
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
Venky Shankar
e6684fa2b3 Merge PR #45312 into main
* refs/pull/45312/head:
	qa: new snapshot test for snapshot naming limits
	mds: limit the snapshot names to 240 characters

Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Jos Collin <jcollin@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Kotresh Hiremath Ravishankar <khiremat@redhat.com>
2022-12-12 19:42:55 +05:30
Xiubo Li
89177d6598 qa: switch to https protocol for repos' server
Since the git:// is not reachable any more and have switch to
https://.

The git archive does not support the https protocol, so we couldn't
user the git archive to retrieve the tar ball any more, will split
this into 3 steps:

1, clone the whole ceph repo
2, checkout the commit/tag/branch
3, then change directory to qa/workunits/.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
2022-12-12 21:05:57 +08:00
Laura Flores
4f693d8a57
Merge pull request #48943 from yaarith/fix-telemetry-ident
qa/workunits: identify ceph test clusters
2022-12-07 16:40:03 -06:00
Venky Shankar
e5558ce1a2
Merge pull request #48628 from lxbsz/kclient_fscrypt
qa: cephfs add fscrypt test suite support for kclient

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
2022-12-06 11:06:58 +05:30
Ilya Dryomov
8780f602a9
Merge pull request #48618 from idryomov/rbd-clone-encryption-part2
librbd: add encryption format support for clones (part 2/2)

Reviewed-by: Mykola Golub <mgolub@suse.com>
Acked-by: Or Ozeri <oro@il.ibm.com>
2022-12-05 17:47:19 +01:00
Ilya Dryomov
8d5d478532 qa/workunits/rbd: add encryption-aware resize test
Note that we are hitting https://tracker.ceph.com/issues/58160 here
because by the time we get to "rbd resize" RAW_DEV mapping owns the
lock (due to a write to /dev/mapper/cryptsetupdev being last).

While at it, resurrect the ability to easily run this script on
vstart clusters -- see commit f737c2855a ("qa/workunits/rbd: make
luks-encryption test work on vstart cluster").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-12-04 18:24:10 +01:00
Ilya Dryomov
a27ee2bdf8 rbd, rbd-nbd: make --encryption-format optional
If no --encryption-format specified at all, default to "luks" for each
specified --encryption-passphrase-file.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-12-04 18:19:19 +01:00
Ilya Dryomov
e62e3b6613 rbd, rbd-nbd: accept "luks", "luks1" and "luks2" formats
Since RBD_ENCRYPTION_FORMAT_LUKS1, RBD_ENCRYPTION_FORMAT_LUKS2
and RBD_ENCRYPTION_FORMAT_LUKS aren't treated the same when loading
encryption anymore, "luks1" and "luks2" formats need to be accepted
in addition to "luks" format.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-12-04 18:19:19 +01:00
Ilya Dryomov
d642f7804b rbd, rbd-nbd: don't strip trailing newline in passphrase files
One of the stated goals is compatibility with standard LUKS tools,
in particular being able to load encryption on images formatted with
cryptsetup.  cryptsetup doesn't do this and this really interferes
with randomly generated (binary) passphrases.

While at it, open passphrase files as binary -- it communicates the
intent if nothing else on POSIX.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-12-04 18:19:19 +01:00
Ilya Dryomov
8f712733af qa: rbd_groups.sh: change interpreter to bash
Commit e0da2a4e8c ("qa/workunits/rbd: Add test to list snapshots of
consistency group") added bash-specific syntax.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-12-04 13:20:44 +01:00
Ilya Dryomov
9ca2ec704e
Merge pull request #48549 from pkalever/snap-list
cls/rbd: update last_read in group::snap_list

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2022-12-02 13:18:08 +01:00
Xiubo Li
2a8cc0902e qa: cephfs add filesystem encryption test support
This will allow us to create a encrypted test directory to do the
I/O test.

More coplex fscrypt tests we will use the xfstest-dev later.

Fixes: https://tracker.ceph.com/issues/58133
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2022-12-01 16:33:10 +08:00
Xiubo Li
4c97a9e469 qa: switch to https protocol for ffsb and xfstests-dev repos
Since the git protocol is not reachable any more, just switch it
to https.

Fixes: https://tracker.ceph.com/issues/58133
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2022-12-01 16:33:10 +08:00
Ilya Dryomov
af6ed506f2
Merge pull request #48680 from pkalever/snap-id
rbd: add --snap-id option to "rbd device map" to allow mapping arbitrary snapshots

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2022-11-27 14:10:31 +01:00
Ilya Dryomov
4a7150cd36 qa/workunits/rbd-nbd: clear DEV after detach tests
Otherwise we attempt to unmap it in cleanup(), needlessly.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-11-26 13:27:33 +01:00
Ilya Dryomov
5a425927ed mgr/rbd_support: avoid wedging the task queue if pool is removed
rados.ObjectNotFound exception handler was referencing ioctx variable
which is assigned only if the pool exists and rados.open_ioctx() call
succeeds.  This lead to a fatal error

  mgr[rbd_support] Failed to locate pool mypool
  mgr[rbd_support] execute_task: [errno 2] error opening pool 'b'mypool''
  mgr[rbd_support] Fatal runtime error: local variable 'ioctx' referenced before assignment

and wedged the task queue.  No other commands were processed until
ceph-mgr daemon restart.

Fixes: https://tracker.ceph.com/issues/52932
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-11-23 23:11:42 +01:00
Lucian Petrut
5bab166663 qa: fix test_rbd_wnbd.py
The rbd-wnbd Python test now fails as the wnbd driver changed
the bus type from "virtual" to "SAS" in order to accommodate
Microsoft Failover Cluster.

SAS is considered a shared bus, so with the default SAN policy
(offlineShared), the disks will be offline/read-only by
default[1][2].

That being considered, we're updating the test to set the rw disk
flag before attempting any write operations.

[1] https://learn.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-partitionmanager-sanpolicy
[2] https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/san

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2022-11-23 12:59:30 +02:00
Yaarit Hatuka
0b45218830 qa/workunits: identify ceph test clusters
When testing telemetry, we identify clusters with
organization = 'ceph-qa'.

Signed-off-by: Yaarit Hatuka <yaarit@redhat.com>
2022-11-18 15:42:32 +00:00
Laura Flores
bf30531f01 qa/workunits/rados: specify redirect in curl command
This workunit currently grabs files in html form, since
there is a redirect that occurs. If we specify `-L` in the
curl command, it handles redirects and graps the files
appropriately.

Fixes: https://tracker.ceph.com/issues/58046
Signed-off-by: Laura Flores <lflores@redhat.com>
2022-11-18 00:31:59 +00:00
Prasanna Kumar Kalever
92480e6561 qa/workunits/rbd: added tests for --snap-id
Fixes: https://tracker.ceph.com/issues/57902
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2022-11-10 19:28:30 +05:30
Prasanna Kumar Kalever
e0da2a4e8c qa/workunits/rbd: Add test to list snapshots of consistency group
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2022-11-09 11:19:35 +05:30
Laura Flores
5573558a17
Merge pull request #48291 from ljflores/wip-upgrade-telemetry 2022-11-04 20:00:30 -05:00
Ilya Dryomov
0f93f745c6
Merge pull request #40363 from orozery/rbd-clone-encryption
librbd: add encryption format support for clones (part 1/2)

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2022-10-25 18:16:33 +02:00
Ilya Dryomov
9db96c33d2
Merge pull request #48367 from stefan-chivu/namespace-optarg-fix
rbd: device map/unmap --namespace handling fixes

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2022-10-11 11:58:15 +02:00
Marcus Watts
5deb213ae5
Merge pull request #45395 from tobias-urdin/rgw-keystone-service-token
rgw/auth: Add service token support for Keystone auth
2022-10-11 05:49:30 -04:00
Ilya Dryomov
edfcf4bd6b qa/workunits/rbd-nbd: also test map/unmap with --namespace option
The entire script is using specs, let's cover non-spec syntax as well.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-10-10 20:19:17 +02:00
Venky Shankar
e3a82a2cba
Merge pull request #48337 from batrick/first-python
tools/cephfs: convert first-damage.sh to python

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
2022-10-10 20:58:47 +05:30
Laura Flores
968607a243 qa/workunits: interpret with bash instead of sh
Signed-off-by: Laura Flores <lflores@redhat.com>
2022-10-08 06:50:25 +00:00
Laura Flores
359435efb8 qa/suites/upgrade/telemetry-upgrade: add new telemetry upgrade tests
Signed-off-by: Laura Flores <lflores@redhat.com>
2022-10-08 04:48:40 +00:00
Patrick Donnelly
0c8e964be2
qa/workunits/fs/damage: update first-damage test for python
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2022-10-05 20:25:50 -04:00
Radoslaw Zarzynski
bf46d3736d
Merge pull request #47458 from rzarzynski/wip-all-kickoff-r
kickoff v18 reef

Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Guillaume Abrioux <gabrioux@redhat.com>
Reviewed-by: Anthony D'Atri <anthonyeleven@users.noreply.github.com>
Reviewed-by: Adam King <adking@redhat.com>
Reviewed-by: Laura Flores <lflores@redhat.com>
2022-10-04 22:39:19 +02:00
Tobias Urdin
567024d363 rgw/qa: Add QA suite for Keystone service token
This adds a QA suite  for the service token auth in
RGW. The suite runs a workunit that is a bash script
that spawns a fake Keystone server which is then used
as an auth backend for RGW to test the feature.

A python script is then executed that runs a battery
of tests against RadosGW which talks to the fake Keystone
server running in the background.

Signed-off-by: Tobias Urdin <tobias.urdin@binero.com>
2022-09-23 15:10:14 +00:00
Laura Flores
80893b4e51
Merge pull request #47900 from Matan-B/wip-matanb-librados-20
examples/librados: Compile with c++20 on Ubuntu
2022-09-21 10:06:12 -05:00
Radoslaw Zarzynski
905540db14 doc, common, mon, qa: Mon-related updates for reef
This bases on two commits:
  * 7bbc92eda3 and
  * 6b22d47863 which seems to be
    a fixup to former one.

In contrast to them, in `OSDMonitor::create_initial()` I updated
also `newmap.require_osd_release` to pacific when
`mon_debug_no_require_reef` and `mon_debug_no_require_quincy`.
Please take have an extra look on that during the review.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2022-09-20 14:26:59 +00:00
Venky Shankar
61f9c4501e
Merge pull request #48149 from batrick/i57586
tools: allow spaces in dentries for first-damage.sh

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-09-20 09:36:38 +05:30
Patrick Donnelly
4081f949b7
qa: test first damage with dentry containing spaces
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2022-09-19 13:34:19 -04:00
Samuel Just
ad87f822bd
Merge pull request #45369 from jyha200/wip-samplededup
ceph_dedup_tool: adding sample-dedup

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Myoungwon Oh <myoungwon.oh@samsung.com>
2022-09-19 10:32:19 -07:00
Adam King
12235e92e6
Merge pull request #41855 from p-se/compile-cephadm-1
cephadm: compile cephadm

Reviewed-by: Adam King <adking@redhat.com>
Reviewed-by: Anthony D'Atri <anthonyeleven@users.noreply.github.com>
2022-09-19 11:48:51 -04:00
Matan Breizman
be838652fa examples: Compile with c++20
This change will apply to ubuntu only.
Fixes: https://tracker.ceph.com/issues/57163

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
2022-09-19 13:18:20 +00:00
Michael Fritch
d95c6c8d77 qa/workunits/cephadm/test_cephadm: add --no-pager
avoid user interaction with the systemd pager

Signed-off-by: Michael Fritch <mfritch@suse.com>
2022-09-13 12:17:20 -04:00