In the previous section we shelve instance to Glance, this section discusses how to restore the instance through Unshelve operations.
Because the process of saving instance's Image,unshelve in Glance is actually through the image launch a new instance,nova-scheduler will also dispatch the appropriate compute nodes to create the instance.
Instance unshelve may run on a different compute node than before shelve, but other properties of instance (such as FLAVOR,IP, etc.) will not change.
Below is the flowchart for Unshelve instance
Send a request to NOVA-API
Nova-api sending messages
Nova-scheduler Execution Scheduling
Nova-scheduler sending messages
Nova-compute Performing actions
Let's discuss each step in detail below.
send a request to Nova-api
The customer (which can be an OpenStack end-user or other program) sends a request to the API (NOVA-API): "Help me Unshelve this Instance."
View Log/opt/stack/logs/n-api.log
Nova-api sending Messages
Nova-api sent a message to Messaging (RabbitMQ): "Unshelve this Instance" view the source code/opt/stack/nova/nova/compute/api.py by Unshelve.
nova-scheduler Execution Scheduling
Nova-scheduler the message is received, the appropriate compute node is selected for instance. View Log/opt/stack/logs/n-sch.log
After screening, the final Devstack-controller is selected launch instance.
Nova-scheduler sending Messages
Nova-scheduler sends a message telling that the selected compute node can launch instance the source code on line 95th of the/opt/stack/nova/nova/scheduler/filter_scheduler.py by Select_destinations
Nova-compute Performing Actions
The process of Nova-compute execution unshelve is very similar to launch instance. as follows: 1. Prepare CPU, memory, and disk resources for instance 2. Create instance image file 3. Create an XML definition file for instance 4. Create a virtual network and start instance
Logging in the/opt/stack/logs/n-cpu.log, analysis left for everyone to practice.
The above is the analysis of Unshelve operation, the next section we discuss the Migrate operation.
Unshelve Instance Operation Details-5 minutes a day to play OpenStack (39)