In the previous section we discussed an important role of snapshot,snapshot as a backup of instance.
If the instance is damaged, it can be restored by snapshot, which is Rebuild.
Rebuild will replace the instance current image file with snapshot, while maintaining the rest of the instance, such as the network, and the resource-allocation attribute unchanged.
Here is the flowchart of Rebuild instance
Send a request to NOVA-API
Nova-api sending messages
Nova-compute Performing actions
Let's discuss each step in detail below.
send a request to Nova-api
The customer (can be an OpenStack end user, or other program) sends a request to the API (NOVA-API): "Rebuild this Instance"
Select the image to use for recovery
View Log/opt/stack/logs/n-api.log
Nova-api sending Messages
Nova-api sent a message to Messaging (RabbitMQ): "Rebuild this Instance" source code in/opt/stack/nova/nova/compute/api.py, method is Rebuild.
Nova-compute Performing Actions
View Log/opt/stack/logs/n-cpu.log
Close Instance
download the new image and prepare the instance image file
Start Instance
after Rebuild, the GUI shows that instance has used the new image
The above is the analysis of Rebuild operation, the next section we discuss the Shelve operation.
Rebuild Instance Operation Details-5 minutes a day to play OpenStack (37)