Project

General

Profile

Actions

Bug #52425

closed

"rbd unmap" misbehaves if the image name contains glob metacharacters

Added by wang kevin over 2 years ago. Updated over 2 years ago.

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

0%

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

Description

The operation process is as follows:
root@master:~# rbd create test-pool/[0.0.0.0] --size 50G
root@master:~# rbd map test-pool/[0.0.0.0]
rbd: sysfs write failed
RBD image feature set mismatch. You can disable features unsupported by the kernel with "rbd feature disable test-pool/[0.0.0.0] object-map fast-diff deep-flatten".
In some cases useful info is found in syslog - try "dmesg | tail".
rbd: map failed: (6) No such device or address
root@master:~# rbd feature disable test-pool/[0.0.0.0] object-map fast-diff deep-flatten
root@master:~# rbd map test-pool/[0.0.0.0]
/dev/rbd1
root@master:~# rbd showmapped
id pool namespace image snap device
1 test-pool [0.0.0.0] - /dev/rbd1
root@master:~# rbd unmap test-pool/[0.0.0.0]
rbd: test-pool/[0.0.0.0]: not a mapped image or snapshot
rbd: unmap failed: (22) Invalid argument


Related issues 2 (0 open2 closed)

Copied to rbd - Backport #52452: pacific: "rbd unmap" misbehaves if the image name contains glob metacharactersResolvedIlya DryomovActions
Copied to rbd - Backport #52453: octopus: "rbd unmap" misbehaves if the image name contains glob metacharactersResolvedIlya DryomovActions
Actions #1

Updated by Ilya Dryomov over 2 years ago

  • Status changed from New to In Progress
  • Assignee set to Ilya Dryomov

Sigh, this is because libudev uses fnmatch(3) for matching attributes, meaning that shell glob pattern matching is employed instead of literal string matching. And it doesn't seem to be mentioned in the libudev API documentation, only in udev(7) man page:

Most of the fields support shell glob pattern matching and alternate patterns.

Actions #2

Updated by Ilya Dryomov over 2 years ago

  • Status changed from In Progress to Fix Under Review
  • Backport set to octopus,pacific
  • Pull request ID set to 42959
Actions #3

Updated by Ilya Dryomov over 2 years ago

  • Subject changed from command: If the name of RBD image contains'[]', an error will be reported when unmap is used to "rbd unmap" misbehaves if the image name contains glob metacharacters
  • Status changed from Fix Under Review to Pending Backport
Actions #4

Updated by Backport Bot over 2 years ago

  • Copied to Backport #52452: pacific: "rbd unmap" misbehaves if the image name contains glob metacharacters added
Actions #5

Updated by Backport Bot over 2 years ago

  • Copied to Backport #52453: octopus: "rbd unmap" misbehaves if the image name contains glob metacharacters added
Actions #6

Updated by Loïc Dachary over 2 years ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Actions

Also available in: Atom PDF