Project

General

Profile

Bug #61558

[crimson] 'rbd volumes snap unprotect' fails with 'Device or resource busy' instead of 'Operation not permitted'

Added by Harsh Kumar 10 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
crimson
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Encountered during execution of upstream test - https://github.com/ceph/ceph/blob/v18.0.0/qa/workunits/rbd/permissions.sh

+ expect 1 rbd -k /tmp/tmp.f5fzwmTwZ6 --id volumes snap unprotect images/foo@snap
+ set +e
+ local expected_ret=1
+ local ret
+ shift
+ cmd='rbd -k /tmp/tmp.f5fzwmTwZ6 --id volumes snap unprotect images/foo@snap'
+ eval rbd -k /tmp/tmp.f5fzwmTwZ6 --id volumes snap unprotect images/foo@snap
++ rbd -k /tmp/tmp.f5fzwmTwZ6 --id volumes snap unprotect images/foo@snap
2023-06-01T05:15:17.515-0400 7f2b172af540 -1 WARNING: the following dangerous and experimental features are enabled: crimson
2023-06-01T05:15:17.515-0400 7f2b172af540 -1 WARNING: the following dangerous and experimental features are enabled: crimson
2023-06-01T05:15:17.661-0400 7f2b02ffd700 -1 librbd::SnapshotUnprotectRequest: cannot unprotect: at least 1 child(ren) [61245675f5] in pool 'volumes'
2023-06-01T05:15:17.701-0400 7f2b02ffd700 -1 librbd::SnapshotUnprotectRequest: encountered error: (16) Device or resource busy
2023-06-01T05:15:17.701-0400 7f2b02ffd700 -1 librbd::SnapshotUnprotectRequest: 0x55590400f2e0 should_complete_error: ret_val=-16
rbd: unprotecting snap failed: (16) Device or resource busy
2023-06-01T05:15:17.747-0400 7f2b037fe700 -1 librbd::SnapshotUnprotectRequest: 0x55590400f2e0 should_complete_error: ret_val=-16
+ ret=16
+ set -e
+ [[ 16 -ne 1 ]]
+ echo 'ERROR: running \'\''rbd -k /tmp/tmp.f5fzwmTwZ6 --id volumes snap unprotect images/foo@snap\'\'': expected 1 got 16'
ERROR: running \'rbd -k /tmp/tmp.f5fzwmTwZ6 --id volumes snap unprotect images/foo@snap\': expected 1 got 16
+ return 1
+ cleanup
+ rm -f /tmp/tmp.f5fzwmTwZ6

Expected exit code for the command is 1, however return value is 16 because of 'Device or resource busy' error

Same test when executed on downstream quincy(ceph version 17.2.6-70.el9cp) -

+ expect 1 rbd -k /tmp/tmp.MIFhN9RmLb --id volumes snap unprotect images/foo@snap
+ set +e
+ local expected_ret=1
+ local ret
+ shift
+ cmd='rbd -k /tmp/tmp.MIFhN9RmLb --id volumes snap unprotect images/foo@snap'
+ eval rbd -k /tmp/tmp.MIFhN9RmLb --id volumes snap unprotect images/foo@snap
++ rbd -k /tmp/tmp.MIFhN9RmLb --id volumes snap unprotect images/foo@snap
2023-06-01T05:11:53.794-0400 7f32a27fc640 -1 librbd::Watcher: 0x7f328c0077a0 handle_register_watch: failed to register watch: (1) Operation not permitted
2023-06-01T05:11:53.794-0400 7f32a2ffd640 -1 librbd::ImageState: 0x557ba6907300 failed to open image: (1) Operation not permitted
rbd: error opening image foo: (1) Operation not permitted
+ ret=1
+ set -e
+ [[ 1 -ne 1 ]]
+ return 0

Complete stdouts attached

Crimson image used - https://shaman.ceph.com/repos/ceph/main/93b6f716e647759fdc3b54eb7f372afd826b2e30/crimson/280477/

permissions.sh_crimson.txt View (10.3 KB) Harsh Kumar, 06/01/2023 09:27 AM

permissions.sh_downstream_quincy.txt View (29.6 KB) Harsh Kumar, 06/01/2023 09:27 AM

Also available in: Atom PDF