Host upgrade method and device
AssigneeHuawei Technologies Co., Ltd.
InventorsWei Gao, Muqiang Xia
Life of this patent
Estimating the term…
Abstract
A host upgrade method and a device include selecting at least one target host from a plurality of hosts for an upgrade. After the at least one target host is selected, a service running on all virtual machines that are in one or more target service groups and that are deployed on the at least one target host is stopped, and a service running on a virtual machine that is in the one or more target service groups and that is not deployed on the at least one target host is maintained. Then, the at least one target host is upgraded.
Claims20
A host upgrade method, comprising:
- selecting a target host from a plurality of hosts, wherein a plurality of first virtual machines on the hosts belongs to a plurality of first service groups, wherein each of the first service groups processes a first service, wherein different second service groups in the first service groups process different second services, wherein all second virtual machines deployed on the target host belong to one or more target service groups in the first service groups, wherein, for the second virtual machines, a total quantity of third virtual machines that belongs to each of the one or more target service groups is not greater than a maximum shutdown quantity corresponding to a corresponding target service group, wherein a maximum shutdown quantity corresponding to each of the first service groups is a maximum quantity of fourth virtual machines that are allowed to be shut down in each of the first service groups when the first service keeps running;
- stopping a third service running on the second virtual machines;
- maintaining a fourth service running on a fifth virtual machine that is in the one or more target service groups and that is not deployed on the target host;
- and
- upgrading the target host after the third service is stopped running on the second virtual machines and while the fourth service is maintained running on the fifth virtual machine.
A host upgrade method, comprising:
- selecting a first host from a plurality of hosts, wherein a plurality of first virtual machines on the hosts belongs to a plurality of first anti-affinity groups, wherein each of the first anti-affinity groups processes a first service, wherein different virtual machines in each of the first anti-affinity groups are deployed on different hosts, wherein second virtual machines deployed on the first host belong to one or more target anti-affinity groups in the first anti-affinity groups, wherein, for the second virtual machines, a total quantity of third virtual machines that belongs to each of the one or more target anti-affinity groups is not greater than a maximum shutdown quantity corresponding to a corresponding target anti-affinity group, wherein a maximum shutdown quantity corresponding to each of the first anti-affinity groups is a maximum quantity of fourth virtual machines that are allowed to be shut down in each of the first anti-affinity groups when the first service keeps running;
- selecting a second host from the hosts, wherein fifth virtual machines deployed on the second host do not belong to the one or more target anti-affinity groups;
- adding the second host and the first host to an upgrade group;
- stopping a second service running sixth virtual machines that are in the one or more target anti-affinity groups and that are deployed on a third host in the upgrade group;
- maintaining a third service running on a seventh virtual machine that is in the one or more target anti-affinity groups and that is not deployed on the third host;
- and
- upgrading the third host after the second service is stopped running on the sixth virtual machines and while the third service is maintained running on the seventh virtual machine.
An upgrade device comprising:
- a memory configured to store program instructions;
- and
- a processor coupled to the memory, wherein the program instructions cause the processor to be configured to:
- select a target host from a plurality of hosts, wherein a plurality of first virtual machines on the hosts belongs to a plurality of first service groups, wherein each of the first service groups processes a first service, wherein different second service groups in the first service groups process different second services, wherein second virtual machines deployed on the target host belong to one or more target service groups in the first service groups, wherein, for the second virtual machines, a total quantity of third virtual machines that belongs to each of the one or more target service groups is not greater than a maximum shutdown quantity corresponding to a corresponding target service group, wherein a maximum shutdown quantity corresponding to each of the first service groups is a maximum quantity of fourth virtual machines that are allowed to be shut down in each of the first service groups when the first service keeps running;
- stop a third service running on the second virtual machines;
- maintain a fourth service running on a fifth virtual machine that is in the one or more target service groups and that is not deployed on the target host;
- and
- upgrade the target host after the third service is stopped running on the second virtual machines and while the fourth service is maintained running on the fifth virtual machine.
An upgrade device comprising:
- a memory configured to store program instructions;
- and
- a processor coupled to the memory, wherein the program instructions cause the processor to be configured to:
- select a first host from a plurality of hosts, wherein a plurality of first virtual machines on the hosts belongs to a plurality of first anti-affinity groups, wherein each of the first anti-affinity groups processes a first service, wherein different virtual machines in each of the first anti-affinity groups are deployed on different hosts, wherein second virtual machines deployed on the first host belong to one or more target anti-affinity groups in the first anti-affinity groups, wherein, for the second virtual machines, a total quantity of third virtual machines that belongs to each of the one or more target anti-affinity groups is not greater than a maximum shutdown quantity corresponding to a corresponding target anti-affinity group, wherein a maximum shutdown quantity corresponding to each of the first anti-affinity groups is a maximum quantity of fourth virtual machines that are allowed to be shut down in each of the first anti-affinity groups when the first service keeps running;
- select a second host from the plurality of hosts, wherein fifth virtual machines deployed on the second host do not belong to the one or more target anti-affinity groups;
- add the second host and the first host to an upgrade group;
- stop a second service running sixth virtual machines that are in the one or more target anti-affinity groups and that are deployed on a third host in the upgrade group;
- maintain a third service running on a seventh virtual machine that is in the one or more target anti-affinity groups and that is not deployed on the third host;
- and
- upgrade the third host after the second service is stopped running on the sixth virtual machines and while the third service is maintained running on the seventh virtual machine.
Dependencies are inferred from the claim text.