Commit Graph

20 Commits

Author SHA1 Message Date
Lucian Petrut
8d294f948a qa: update rbd-wnbd test, using MBR instead of GPT
We're getting the following error while initializing 64MB disks
on WS 2019: "The disk is not large enough to support a GPT
partition style.".

For this reason, we'll use MBR instead.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2024-05-15 19:49:40 +03:00
Lucian Petrut
d6d36b535c qa: add ceph-rbd windows service restart test
We're adding a test that:

* maps a configurable number of images
* runs a specified test - we're reusing the ones from stress_test,
  making just a few minor changes to allow running the same test
  multiple times
* restarts the ceph-rbd Windows service
* waits for the images to be reconnected and refreshes the mount
  information
* reruns the test
* repeats the above workflow for a specified number of times,
  reusing the same images

This test ensures that:

* mounted images are still available after a service restart
* drive letters are retained
* the image content is retained
* there are no race conditions when connecting or disconnecting
  a large number of images in parallel
* the driver is capable of mapping a specified number of images
  simultaneously

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2024-05-15 19:49:33 +03:00
Lucian Petrut
808d42d575 qa: reorganize Windows python test
We're splitting the rbd-wnbd python test into separate files so
that the common code may easily be reused by other tests. This
also makes the code easier to read and maintain.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2024-05-15 08:54:55 +03:00
Ilya Dryomov
3e302abb81
Merge pull request #52540 from petrutlucian94/single_process
rbd-wnbd: use a single daemon process per host

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2024-03-02 19:53:06 +01:00
Lucian Petrut
0d73d31b6f qa: update rbd-wnbd test, retrying image rm operations
The "rbd-wnbd unmap" command is currently telling the WNBD driver
to remove the mapping without contacting the rbd-wnbd daemon
and waiting for it to perform its cleanup.

For this reason, attempting to delete the image immediately after
unmapping it can fail due to existing watchers.

As a temporary solution, we'll retry the image remove operation.
At a later time, we'll update the "rbd-wnbd unmap" command to go
through the rbd-wnbd daemon, ensuring that all the necessary
cleanup is performed before returning.

While at it, we're dropping a redundant LOG.error call so that we
won't print expected exceptions.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
2024-03-01 17:39:00 +00:00
John Mulligan
1b5a12b569 qa/workunits/windows: alter python default argument types
Found using mypy 1.1.1.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2024-01-24 13:33:29 -05:00
Josh Soref
965ee91d3f rbd: fix spelling errors
* acquire
* are
* asynchronous
* attempt
* bootstrap
* concurrent
* consume
* couldn't
* cumulative
* disable
* disabling
* disaster
* disconnected
* endianness
* entries
* exclusive
* filesystem
* flag
* generic
* github
* image
* information
* initiating
* latency
* limitations
* metadata
* modify
* namespace
* noautoconsole
* ourselves
* prefetch
* propagate
* protection
* recorder
* recover
* release
* replicated
* reserved
* selection
* sentinel
* several
* snapshot
* source
* specifying
* suppress
* synchronize
* the
* transfer
* triggering
* unknown
* validation
* version
* visible
* write log entries

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-26 09:30:53 -04: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
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
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
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
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
Ionut Balutoiu
2d6305cb61 qa: update branch name for Windows job
Use `main` instead of `master` in the workunit scripts for the
Windows Teuthology job.

Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
2022-08-31 12:06:14 +00:00
Ionut Balutoiu
8054199787 qa: add basic Ceph on Windows integration test
Due to lack of Windows support in the Teuthology, the test case adopts
the following workaround:

* Deploy baremetal machine with `ubuntu_latest.yaml` and
  configure it with libvirt KVM.
* Create a libvirt VM and provision it with Windows Server 2019, using
  the official ISO from Microsoft.
* Configure SSH in the Windows VM, and run the tests remotely via SSH.

The implementation of the test case consists of workunit scripts.

`qa/workunits/windows/test_rbd_wnbd.py` is the main Python script
to test Ceph on Windows basic functionality. This is executed in the
libvirt VM configured with Windows Server 2019.

Co-authored-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
Co-authored-by: Daniel Vincze <dvincze@cloudbasesolutions.com>

Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
2022-04-19 17:21:52 +03:00