Even though "ceph rbd task list" is executed immediately after
a successful "ceph rbd task add flatten", the operation may complete
in the interim and the task listing may come back empty legitimately.
Given that we are asserting that flatten actually occurs based on
"rbd info" output, there is no real need to try to briefly observe
the flatten task in the task list.
Fixes: https://tracker.ceph.com/issues/75209
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
ceph rbd task add flatten rbd2/clone1 && break
sleep 10
done
- test "$(ceph rbd task list)" != "[]"
for i in {1..12}; do
rbd info rbd2/clone1 | grep 'parent: ' || break