Bug #54999
openrbd mirror snapshot schedule rm returns 0 when tried to remove non-existent schedule
0%
Description
rbd mirror snapshot schedule rm returns 0 when one tries to remove non-existent schedule.
TODO: Include a failure message and make the return code meaningful.
Below are three cases that hit the issue:
1. When interval does not exist and when there is existing schedule:
choffman@ build]$ ./bin/rbd mirror snapshot schedule ls -p pool1 --recursive --cluster site-b
POOL NAMESPACE IMAGE SCHEDULE
pool1 image1 every 10h
[choffman@ build]$ ./bin/rbd mirror snapshot schedule rm --pool pool1 --image image1 7h --cluster site-b
[choffman@ build]$ echo $?
0
2. When interval does not exist and when there is no existing schedules:
[choffman@ build]$ ./bin/rbd mirror snapshot schedule ls -p pool1 --recursive --cluster site-b
POOL NAMESPACE IMAGE SCHEDULE
[choffman@ build]$ ./bin/rbd mirror snapshot schedule rm --pool pool1 --image image1 7h --cluster site-b
[choffman@ build]$ echo $?
0
3. When interval is not specified
[choffman@ build]$ ./bin/rbd mirror snapshot schedule ls -p pool1 --recursive --cluster site-b
POOL NAMESPACE IMAGE SCHEDULE
[choffman@ build]$ ./bin/rbd mirror snapshot schedule rm --pool pool1 --image image1 --cluster site-b
[choffman@ build]$ echo $?
0
Updated by Christopher Hoffman about 2 years ago
- Status changed from In Progress to Fix Under Review
- Pull request ID set to 45622