CLOUDSTACK-6918: iterate through pending works in cancel maitenance