0

I'm wondering how the storage template option "deleteOnExit" works in Cloudify 2.7.1 Stable. I'm working on OpenStack cloud, and in my case, the option "deleteOnExit" in "SMALL_BLOCK" storage template is set to true. Using the dynamic storage allocation way to create (with the SMALL_BLOCK template), attach, mount and format a storage via the context storage API. When I undeploy the application, the storage is not destroyed. Is it a normal behavior?

Thanks.

Ulky Igor
  • 322
  • 5
  • 16

1 Answers1

1

Yes this is the normal behavior, with dynamic storage, you are also responsible for deleting the volume when you undeploy.

here is an example of deleting the volume when the 'shutdown' lifecycle event is executed:

shutdown {

    context.storage.unmount(device)
    context.storage.detachVolume(volumeId) 
    context.storage.deleteVolume(volumeId);

    }
Eli Polonsky
  • 511
  • 1
  • 3
  • 11
  • Thx for the reply. I already know about the way to destroy the volume using the API :). But if this is a normal behavior, then what is the need of the "deleteOnExit" property? – Ulky Igor Nov 25 '14 at 13:50
  • Hi, sorry for not being clear enough :), the 'deleteOnExit' is relevant only when using static storage allocation, so if you are using dynamic storage allocation you can ignore it. granted, it is somewhat confusing... – Eli Polonsky Nov 25 '14 at 15:07