Pause/resume Instance Operation Details-5 minutes a day to play OpenStack (34)

Source: Internet
Author: User

650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160516-1463348282742049864.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160516-1463348282742049864.png "alt=" Image201.5.png "style=" border:0px;line-height:1.5; "/ >

This section analyzes Nova Pause/resume operations in detail through logs.

Sometimes you need to pause instance for a short time, and you can save the instance state to the host's memory through the pause operation. When recovery is required, perform a resume operation, read back the instance state from memory, and then continue running instance.

Here is the flowchart for pause instance

650 "this.width=650;" title= "/HTTP// 7xo6kd.com1.z0.glb.clouddn.com/upload-ueditor-image-20160512-1463039685764071455.png "src=" http// 7xo6kd.com1.z0.glb.clouddn.com/upload-ueditor-image-20160516-1463348249257038197.jpg "style=" border:0px; White-space:normal;float:none; "/>

    1. Send a request to NOVA-API

    2. Nova-api sending messages

    3. 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 another program) sends a request to the API (NOVA-API): "Help me to pause this Instance"

650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160516-1463348215824059797.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160516-1463348249399004055.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-20160516-1463348216000010862.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160516-1463348249538042255.jpg "style=" border:0px;white-space:normal;float:none; "/>

Note: For the Pause operation, the log does not have the previous Start record so detailed.

For example, there is no log of the nova.api.openstack.compute.servers and NOVA.COMPUTE.API code modules, which may be because the logic of the operation is simple and the developer does not include the log when coding.

Nova-api sending Messages

Nova-api sent a message to Messaging (RabbitMQ): "Pause this Instance" to view the source code/opt/stack/nova/nova/compute/api.py by pausing.

650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160516-1463348216107016303.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160516-1463348249728010176.jpg "style=" border:0px;white-space:normal;float:none; "/>

Nova-compute Performing Actions

View Log/opt/stack/logs/n-cpu.log

650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160516-1463348216288060705.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160516-1463348249868022330.jpg "style=" border:0px;white-space:normal;float:none; "/>

After the pause operation executes successfully, the instance state changes to Paused

650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160516-1463348216186030321.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160516-1463348249138043035.jpg "style=" border:0px;white-space:normal;float:none; "/>

resume operations is reserved for everyone to practice. Tip: The Resume operation here is actually a unpause operation, which can be used to locate the log through the keyword "unpause".

The above is a detailed analysis of Pause/resume, the next section we continue to analyze suspend/resume operations.
650) this.width=650; "title=" "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160516-1463348250019020727.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;white-space: Normal;background-color:rgb (246,246,246); "/>

Pause/resume Instance Operation Details-5 minutes a day to play OpenStack (34)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.