]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
test/librbd/test_notify.py: conditionally ignore some errors
authorIlya Dryomov <idryomov@gmail.com>
Sat, 5 Apr 2025 10:26:23 +0000 (12:26 +0200)
committerYuri Weinstein <yweinste@redhat.com>
Sun, 6 Apr 2025 14:55:12 +0000 (14:55 +0000)
commit2e3741dd0e1b6a82707e96daabfa6a2cce2f3937
tree66e4b4eb6f7ef61b829593e046a55b790950cecf
parent94bbd12c66b5233b8b45e185bba432ffbc4cacfd
test/librbd/test_notify.py: conditionally ignore some errors

In 2020, commit 01ff1530544c ("librbd: make all maintenance op
notifications async") introduced a backwards compatibility issue where
if exclusive lock is held by an older (octopus and below) client and
a maintenance op is proxied to it from a newer client, the newer client
interprets the notification for the in-place completion of the op as
the notification for the acceptance of an async request and expects
another notification for the completion of the op which never comes.
In 2021, this bug was discovered and test_notify.py was amended to
ignore it in commit 9c0b239d70cd ("qa/upgrade: conditionally disable
update_features tests").

However the two update_features tests that started hanging and got
disabled weren't the only ones to misbehave.  Rename, create_snap and
remove_snap tests were affected too but didn't hang or fail because
librbd also filtered certain errors codes like EEXIST and EINVAL.
Taking rename is an example:

1. a rename request is sent to from a newer client (N) to an octopus
   client (O)
2. O successfully renames the image and sends a completion notification
   with result = 0
3. N mistakes it for async request acceptance
4. after a timeout, N resends the rename request to O
5. O sees that an image already has that name (after step 2) and sends
   a completion notification with result = EEXIST
6. N interprets it as async request denial and bubbles up EEXIST,
   however right before returning control from Operations::rename()
   EEXIST is filtered and 0 is returned to the user

So back then rename, create_snap and remove_snap tests continued to
pass but started taking 30+ seconds instead of completing immediately.
In 2025 we did away with filtering error codes in commit 66508cdaa190
("librbd: stop filtering async request error codes") and these tests
started to fail.  Following the approach taken in commit 9c0b239d70cd
("qa/upgrade: conditionally disable update_features tests"), let's
ignore these failures based on the same environment variable.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit e7aeb7e325b8777251051dcc32e3baa70880257d)
src/test/librbd/test_notify.py