650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160522-1463901457197031167.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160522-1463901711924037539.jpg "style=" border:0px;float:none; "/>
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
650 "this.width=650;" title= "/HTTP// 7xo6kd.com1.z0.glb.clouddn.com/upload-ueditor-image-20160522-1463901457001037864.png "src=" http// 7xo6kd.com1.z0.glb.clouddn.com/upload-ueditor-image-20160522-1463901712150009866.jpg "style=" border:0px; White-space:normal;float:none; "/>
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"
650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160522-1463901457309098709.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160522-1463901712325097150.jpg "style=" border:0px;white-space:normal;float:none; "/>
Select the image to use for recovery
650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160522-1463901457399072064.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160522-1463901712434056770.jpg "style=" border:0px;white-space:normal;float:none; "/>
View Log/opt/stack/logs/n-api.log
650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160522-1463901457529000369.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160522-1463901712552099559.jpg "style=" border:0px;white-space:normal;float:none; "/>
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.
650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160522-1463901457531097953.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160522-1463901712706086564.jpg "style=" border:0px;float:none; "/>
Nova-compute Performing Actions
View Log/opt/stack/logs/n-cpu.log
Close Instance
650 "this.width=650;" title= "/HTTP// 7xo6kd.com1.z0.glb.clouddn.com/upload-ueditor-image-20160522-1463901457504006976.png "src=" http// 7xo6kd.com1.z0.glb.clouddn.com/upload-ueditor-image-20160522-1463901712846050959.jpg "style=" border:0px; font-family: ' Microsoft Jacob Black '; white-space:normal;float:none;/>
650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160522-1463901457605008877.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160522-1463901713025062085.jpg "style=" border:0px;white-space:normal;float:none; "/>
download the new image and prepare the instance image file
650 "this.width=650;" title= "/HTTP// 7xo6kd.com1.z0.glb.clouddn.com/upload-ueditor-image-20160522-1463901457645020640.png "src=" http// 7xo6kd.com1.z0.glb.clouddn.com/upload-ueditor-image-20160522-1463901713296027212.jpg "style=" border:0px; White-space:normal;float:none; "/>
650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160522-1463901457654011663.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160522-1463901713415033013.jpg "style=" border:0px;white-space:normal;float:none; "/>
Start Instance
650 "this.width=650;" title= "/HTTP// 7xo6kd.com1.z0.glb.clouddn.com/upload-ueditor-image-20160522-1463901457703047371.png "src=" http// 7xo6kd.com1.z0.glb.clouddn.com/upload-ueditor-image-20160522-1463901713559049304.jpg "style=" Border:0px;float: none; "/>
650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160522-1463901457744057836.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160522-1463901713662096620.jpg "style=" border:0px;float:none; "/>
after Rebuild, the GUI shows that instance has used the new image
650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160522-1463901457760078312.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160522-1463901713811043680.jpg "style=" border:0px;white-space:normal;float:none; "/>
The above is the analysis of Rebuild operation, the next section we discuss the Shelve operation.
650) this.width=650; "title=" "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160522-1463901713918085613.jpg "style=" Border:0px;vertical-align:middle;color:rgb ( 63,63,63); font-family: ' Microsoft Yahei '; Font-size:15px;line-height:21.75px;text-align:justify;background-color: RGB (246,246,246); "/>
Rebuild Instance Operation Details-5 minutes a day to play OpenStack (37)