# US 2017/0364382 A1 · Method and apparatus for hot upgrading a virtual machine management service module

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2017/0364382 A1
- Document ID: US20170364382A1
- Status: Published application
- Kind: A1
- Application number: 15/625,981
- Filed: 2017-06-16
- Published: 2017-12-21
- Earliest claimed: 2016-06-17
- Assignees: Alibaba Group Holding Limited
- Applicants: Alibaba Group Holding Limited
- Inventors: Yibo ZHOU
- Web page: https://patentgrep.com/patent/US20170364382A1

## CPC

- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 8/65: Updates (security arrangements therefor G06F21/57)
- G06F 8/656: while running
- G06F 9/546: {Message passing systems or structures, e.g. queues}
- G06F 2009/45575: {Starting, stopping, suspending or resuming virtual machine instances}
- G06F 2009/45591: {Monitoring or debugging support}
- G06F 2009/45595: {Network integration; Enabling network access in virtual machine instances}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Embodiments of the disclosure provide a method and an apparatus for hot upgrading a virtual machine management service module. The method includes creating a request receiving thread and a request handling thread by a virtual machine management service module process, wherein the request receiving thread receives a service request during the hot upgrading; creating a handling thread management unit; and managing, by the handling thread management unit, exit and new start of the request handling thread during the hot upgrading.

## Claims

### Claim 1

A method for hot upgrading a virtual machine management service module, comprising:
creating a request receiving thread and a request handling thread by a virtual machine management service module process, wherein the request receiving thread continuously receives a service request during the hot upgrading;
creating a handling thread management unit; and
managing, by the handling thread management unit, exit and new start of the request handling thread during the hot upgrading.

### Claim 2 (depends on 1)

The method according to claim 1, wherein
the request receiving thread performs parsing and encoding on the service request, and sends the encoded service request to a message stack, and
the request handling thread extracts the encoded service request from the message stack and handles the service request.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the request receiving thread further
parses whether the service request is a normal request;
in response to the service request being not a normal request, reports an error;
in response to the service request being a normal request, encodes the service request; and
sends the encoded service request to the message stack.

### Claim 4 (depends on 2)

The method according to claim 2, wherein the request handling thread further
extracts the encoded service request from the message stack;
decodes the encoded service request;
parses the decoded service request;
queries whether there is a method corresponding to the service request; and
in response to the method existing, handles the service request.

### Claim 5 (depends on 1)

The method according to claim 1, wherein managing, by the handling thread management unit, exit and new start of the request handling thread during the hot upgrading comprises:
receiving a hot upgrade notification;
triggering, based on the hot upgrade notification, the request handling thread of a service processing process to exit;
determining an exit type of the request handling thread after it exits; and
in response to the exit type being a hot upgrade exit type, starting a new request handling thread.

### Claim 6 (depends on 5)

The method according to claim 5, wherein determining an exit type of the request handling thread after it exits, upon the exit type being a hot upgrade exit type, starting a new request handling thread further comprises:
after the new request handling thread is started, extracting the parsed service request from the message stack by the new request handling thread.

### Claim 7 (depends on 5)

The method according to claim 5, wherein triggering, based on the hot upgrade notification, the request handling thread of a service processing process to exit further comprises:
waiting for the request handling thread to check whether the service request is being handled currently; and
in response to the service request being handled currently, waiting to exit until the handling is completed.

### Claim 8 (depends on 5)

The method according to claim 5, further comprising:
re-registering all live monitoring events after the new request handling thread is started.

### Claim 9 (depends on 1)

The method according to claim 1, further comprising:
setting an import type of a main logic processing module related to the virtual machine management service module as a request handling thread import type.

### Claim 10 (depends on 1)

The method according to claim 1, wherein the virtual machine management service module comprises at least one of:
a hypertext transfer protocol service processing process; and
a standard generalized markup language-based remote process call protocol service processing process.

### Claim at position 11

11-20. (canceled)

### Claim 21

A non-transitory computer readable medium that stores a set of instructions that is executable by at least one processor of an electronic apparatus to cause the electronic apparatus to perform a method for hot upgrading a virtual machine management service module, the method comprising:
creating a request receiving thread and a request handling thread by a virtual machine management service module process, wherein the request receiving thread receives a service request during the hot upgrading;
creating a handling thread management unit; and
managing, by the handling thread management unit, exit and new start of the request handling thread during the hot upgrading.

### Claim 22

An apparatus for hot upgrading a virtual machine management service module, comprising:
one or more memory devices that store a set of instructions; and
one or more hardware processors configured to execute the set of instructions to cause the apparatus to:
create a request receiving thread and a request handling thread by a virtual machine management service module process, wherein the request receiving thread receives a service request during the hot upgrading;
create a handling thread management unit; and
manage, by the handling thread management unit, exit and new start of the request handling thread during the hot upgrading.

### Claim 23 (depends on 22)

The apparatus of claim 22, wherein the request receiving thread performs parsing and encoding on the service request, and sends the encoded service request to a message stack, and
the request handling thread extracts the encoded service request from the message stack and handles the service request.

### Claim 24 (depends on 23)

The apparatus according to claim 23, wherein the request receiving thread further
parses whether the service request is a normal request;
in response to the service request being not a normal request, reports an error;
in response to the service request being a normal request, encodes the service request; and
sends the encoded service request to the message stack.

### Claim 25 (depends on 23)

The apparatus according to claim 23, wherein the request handling thread further
extracts the encoded service request from the message stack;
decodes the encoded service request;
parses the decoded service request;
queries whether there is a method corresponding to the service request; and
in response to the method existing, handles the service request.

### Claim 26 (depends on 22)

The apparatus according to claim 22, wherein the one or more hardware processors are configured to execute the set of instructions to further cause the apparatus to:
receive a hot upgrade notification;
trigger, based on the hot upgrade notification, the request handling thread of a service processing process to exit;
determine an exit type of the request handling thread after it exits; and
in response to the exit type being a hot upgrade exit type, start a new request handling thread.

### Claim 27 (depends on 26)

The apparatus according to claim 26, wherein the one or more hardware processors are configured to execute the set of instructions to further cause the apparatus to:
after the new request handling thread is started, extract the parsed service request from the message stack by the new request handling thread.

### Claim 28 (depends on 26)

The apparatus according to claim 26, wherein the one or more hardware processors are configured to execute the set of instructions to further cause the apparatus to:
wait for the request handling thread to check whether the service request is being handled currently; and
in response to the service request being handled currently, wait to exit until the handling is completed.

### Claim 29 (depends on 26)

The apparatus according to claim 26, wherein the one or more hardware processors are configured to execute the set of instructions to further cause the apparatus to:
re-register live monitoring events after the new request handling thread is started.

### Claim 30 (depends on 22)

The apparatus according to claim 22, wherein the one or more hardware processors configured are configured to execute the set of instructions to further cause the apparatus to:
set an import type of a main logic processing module related to the virtual machine management service module as a request handling thread import type.
