简体   繁体   中英

Openstack heat : Stack deletion behaviour in case of attaching a volume as a part of HEAT templete

I have a HEAT template where I am creating one server instance and attaching the CINDER volume with the instance. CINDER volume is created manually and cinder_instance_id is passed as an environmental variable in HEAT template.

Now, when I delete the stack it deletes the server instance but NOT the CINDER volume.

For, me it is correct behavior as we have not created volume as part of OpenStack HEAT template, we are not able to delete the volume as part of stack deletion.

Same applies to the network. We pass network id, which we want to bring our server instance on, to HEAT template. This network doesn't get deleted when we delete our stack.

I was not able to find any official document where this behavior is mention, assuming my understanding is correct. Is this correct behavior? If yes, where it is mentioned?

In heat template, when the network_id is passed the heat service requests the neutron to allocate one ip for the instance specified by user in the network_id .

So when the heat stack is terminated, the IP is released and it makes free. but not the network itself.

Whatever resources are created by stack those are get deleted once the stack is terminated.

When the request for stack launch is given, the heat service communicates with other services like nova , neutron , glance , keystone and launches the stack. All the created resources are associated with stack_id .

When the request for deletion of stack is given, then the heat service terminates the stack which means all the resources those are associated with stack_id gets deleted.

More information can be known at:

** https://docs.openstack.org/heat/latest/

** https://docs.openstack.org/heat/queens/admin/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM