1

On openstack cloud plantform ,If I want to close a instance on compute node, what does the openstack do? can you tell me the process?

1 Answer 1

1

I assume by close you mean "terminate".

When terminating an instance the running virtual machine with an instance id of X is shut down and removed from the physical host it exists on.

The nova client query for this would be:

nova delete <instance-id> or something to that effect.

When you make that query the python-novaclient is interfacing with its own internal API to reach out to the nova-api RESTful API. It authenticates itself with an auth token in the http header of its query. Then nova-api interprets the instance termination request. It will verify any ACLs it needs to against keystone. And then it will perform necessary methods to shut down and remove the instance freeing up resources for future instances. It will then return a result.

Going deeper the scheduler will send out requests over the messaging system as a result of the nova-api queries. Those messages will be received by the targeted physical hosts. There nova-compute will interpret the request to delete the instance and it will perform its own local necessary tasks. Usually this involves interfacing with libvirt to shut down and free the instance resource. After this is completed or failed it will respond to the messaging bus the status. And the API will eventually get that message back and send it on to the user who initially requested the action.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.