Bug #52425
closed"rbd unmap" misbehaves if the image name contains glob metacharacters
0%
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
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.
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
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
Updated by Backport Bot over 2 years ago
- Copied to Backport #52452: pacific: "rbd unmap" misbehaves if the image name contains glob metacharacters added
Updated by Backport Bot over 2 years ago
- Copied to Backport #52453: octopus: "rbd unmap" misbehaves if the image name contains glob metacharacters added
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".