avoid EUCLEAN error after "rbd rm" is interrupted
If rbd rm process is interrupted (for example, rbd client killed, or ceph_assert fault injection in rbd code), rbd state in trash stays in cls::rbd::TRASH_IMAGE_STATE_MOVING.
Then continue to rbd rm, throw error -EUCLEAN.
[root@node build]# ./bin/rbd rm test_pool/test_rbd
Removing image: 0% complete...failed.
rbd: delete error: 2022-11-22T11:30:41.361+0800 7f9bf12a74c0 -1 librbd::api::Trash: remove: error: image is pending moving to the trash.
(117) Structure needs cleaning
- Project changed from Ceph to rbd
- Category deleted (
- Status changed from New to Fix Under Review
- Assignee set to xinwei wei
- Target version deleted (
- Backport set to pacific,quincy
- Status changed from Fix Under Review to Resolved
- % Done changed from 0 to 90
- Status changed from Resolved to Fix Under Review
The ticket should be marked as Resolved only after the PR is merged and optionally backported.
- Status changed from Fix Under Review to Pending Backport
- Subject changed from EUCLEAN error in rbd rm to avoid EUCLEAN error after "rbd rm" is interrupted
- Copied to Backport #58358: quincy: avoid EUCLEAN error after "rbd rm" is interrupted added
- Copied to Backport #58359: pacific: avoid EUCLEAN error after "rbd rm" is interrupted added
- Tags set to backport_processed
Also available in: Atom