VMware Cloud Community
Sirry
Enthusiast
Enthusiast

Potential Bug? AMQP Blocking task for vApp Deletion

Before a vApp is deleted, I would like to capture data for the VM's inside of the vApp in order to log how much resource is freed.

Using vCD 5.1, it appears that as soon as the vApp Deletion blocking task is underway, the vclvApp object contains no vm's when using the getChildrenVms() method. However, if I try to fill that variable after a "blockingTask.abort("");System.sleep(1000);" the variable containing getChildrenVms() will populate. How am I supposed to get to this data without aborting the task?

0 Kudos
1 Reply
Sirry
Enthusiast
Enthusiast

Roundabout solution: abort task, sleep 3 seconds, update vapp internal state, grab vapp information, then start a new task to delete the vapp. When this deletion function triggers orchestrator, have your vApp Deletion function ignore vApp deletions from the orchestrator service user so it passes through without warning.