Specific embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention
Formula is described in further detail.
Fig. 1 shows a kind of structural representation of distributed computing system that one embodiment of the invention provides.This distribution
Formula computing system includes: management terminal 120 and physical node 140.
Management terminal 120 is the equipment of such as pocket computer on knee, desk computer, mobile phone, panel computer etc.
Management terminal 120 is used for the ruuning situation of each physical node 140 is managed.Schematically, when physical node 140 needs
Carry out operating system upgrading when, management terminal 120 control each physical node 140 upgraded.
Management terminal 120 is connected with physical node 140 by network 160.This network 160 can be cable network or light
Fibre web network.
Physical node 140 is the server with hardware entities, such as: single-board server.In distributed computing system,
The number of physical node 140 is usually multiple.In FIG, only to be illustrated with the number of physical node 140 for three.
Running on each physical node 140 has at least one Service Instance 142, and each Service Instance 142 is used for offer one
Plant or multiple service.Alternatively, Service Instance 142 is any one in thread, process, container and virtual machine (vmware, vm)
Kind.
Schematically, when distributed computing system is openstack distributed computing system, physical node 140 is single
Plate server, Service Instance 142 is virtual machine.
Generally, same type of Service Instance 142 is disposed on two physical nodes 140 with active and standby form, such as:
Main Service Instance 142 is deployed on a physical node 140, and standby Service Instance 142 is deployed on another physical node 140.
And/or, same type of Service Instance 142 is disposed on different physical nodes 140 with load balancing form, such as same
3 Service Instances 142 of type are deployed on three different physical nodes 140 respectively.
Fig. 2 shows a kind of structural representation of distributed computing system that another embodiment of the present invention provides.This point
Cloth computing system includes: the multiple physical nodes being connected by network 160.So that physical node is 5 as a example, physical node bag
Include: physical node 1, physical node 2, physical node 3, physical node 4 and physical node 5.
Each physical node is the server with hardware entities, such as: single-board server.
Running on each physical node has at least one Service Instance, and each Service Instance is used for providing one or more clothes
Business.Alternatively, Service Instance is any one in thread, process, container and virtual machine (vmware, vm).Generally:
Same type of Service Instance is disposed on two physical nodes with active and standby form.In fig. 2, a represents main service
Example, for Service Instance, Service Instance 1-a is the main Service Instance of first kind Service Instance to behalf, and Service Instance 1-s is
The standby Service Instance of one class Service Instance;Service Instance 3-a is the main Service Instance of the 3rd class Service Instance, Service Instance 3-s
It is the standby Service Instance of the 3rd class Service Instance;Service Instance 4-a is the main Service Instance of the 4th class Service Instance, Service Instance
4-s is the standby Service Instance of the 4th class Service Instance;Service Instance 6-a is the main Service Instance of the 6th class Service Instance, service
Example 6-s is the standby Service Instance of the 6th class Service Instance.
And/or, same type of Service Instance is disposed on different physical nodes with load balancing form.In fig. 2,
Equations of The Second Kind Service Instance includes 5 Service Instances: Service Instance 2-1, Service Instance 2-2, Service Instance 2-3, Service Instance 2-
4th, Service Instance 2-5, each physical node is deployed with an Equations of The Second Kind Service Instance;5th class Service Instance includes 4
Service Instance: Service Instance 5-1, Service Instance 5-2, Service Instance 5-3, Service Instance 5-4, Service Instance 5-1 is deployed in thing
Reason node 2, Service Instance 5-2 is deployed in physical node 3, and Service Instance 5-3 is deployed in physical node 4, and Service Instance 5-4 disposes
In physical node 5.
From unlike Fig. 1, the distributed computing system in Fig. 2 does not need management node, schematically, works as physical node
When needing the upgrading carrying out operating system, each physical node 140 is controlled to enter by the Service Instance 1-a for being responsible for upgrade service
Row upgrading.
Herein, by management terminal and/or be used for being responsible for the Service Instance of upgrade service and be referred to as management end.That is,
This management end can be physical entity or logic entity.
Refer to Fig. 3, the flow chart that the physical node upgrade method of one embodiment of the invention offer is provided.This reality
Apply example to be applied in management end be illustrated with this physical node upgrade method.This physical node upgrade method, comprising:
I-th batch of physical node is determined in the physical node of step 301, never upgrading.
Alternatively, include complete in the Service Instance running in the other physical nodes in addition to i-th batch of physical node
The Service Instance of portion's species, the initial value for integer and i for the i is 0 or 1.
Assume that distributed computing system includes n physical node, i-th batch of physical node is k physical node, then except the
Other physical nodes outside i criticizes physical node are n-k.The physical node that other physical nodes are not possibly upgraded, also may be used
It can be the promoted physical node finishing.
But, in this other physical node, include the Service Instance of all categories.If that is, distributed computing system
Middle operation has m kind Service Instance, then running in other physical nodes has m kind Service Instance, and each Service Instance is at least deposited
In a Service Instance being in upstate.
Step 302, upgrades to i-th batch of physical node.
Step 303, after upgrading finishes, detects whether also there is the physical node do not upgraded.
Step 304, if also there is the physical node do not upgraded, makes i=i+1, re-executes the physical node of never upgrading
In determine the step of i-th batch of physical node.
If there is not the physical node do not upgraded it is determined that upgrading finishes.
In sum, the physical node upgrade method that the present embodiment provides, by determining in the physical node of never upgrading
Go out i-th batch of physical node;I-th batch of physical node is upgraded;After upgrading finishes, detect whether also there is the thing do not upgraded
Reason node;If also there is the physical node do not upgraded, making i=i+1, in the physical node re-executing never upgrading, determining
The step that i criticizes physical node;Solve in prior art when all physical hosts restart upgrading simultaneously, whole distributed system
Service all cannot be externally provided, and the duration of service disruption also can very long problem when duration of upgrading is longer;Having reached will be multiple
Physical node is upgraded according to different batches, the physical node of each batch in upgrading, its in addition to present lot
Its physical node remains able to be provided out servicing, the effect that service will not be interrupted.
Refer to Fig. 4, the flow chart that the physical node upgrade method of another embodiment of the present invention offer is provided.This
Embodiment is applied in management end be illustrated with this physical node upgrade method.This physical node upgrade method, comprising:
Step 401, management end calculates the instance number of the standby Service Instance running in the physical node that each is not upgraded.
Include multiple physical nodes in distributed computing system, each physical node runs has at least one service real
Example, same Service Instance is multiple according to main and standby relation or load balancing relational deployment in different physical nodes.
In the escalation process that operating system is carried out to physical node, the physical node of different batches can be upgraded successively.
When determining the physical node that i-th batch needs upgrading, need to determine the first physical node first.Alternatively, the initial value of i is
1.
So that each physical node in Fig. 2 is upgraded as a example, management end calculates the standby clothes running in 5 physical nodes
The instance number of pragmatic example, result of calculation is: running on physical node 1 to have to run on 1 standby Service Instance, physical node 2 has 1
Run on standby Service Instance, physical node 3 to have to run on 2 standby Service Instances, physical node 4 and physical node 5 and have 0 standby clothes
Pragmatic example.
Therefore, management end be calculated on physical node 3 run standby Service Instance instance number most.
Step 402, management end, by physical nodes most for the instance number of standby Service Instance, is defined as the first physical node.
Schematically, physical node 3 is defined as the first physical node by management end.
Step 403, management end adds the first physical node to i-th batch of physical node.
Schematically, management end adds physical node 3 to first physical node.First physical node is first
Need the physical node of upgrading.
Step 404, management end detects in the physical node do not upgraded in addition to the i-th physical node according to predefined procedure one by one
Remaining physical node whether meet anti-affinity condition.
Alternatively, anti-affinity condition includes: kth kind Service Instance and i-th batch of physics section that present physical node runs
The physical node set that the kth kind Service Instance running in point is constituted is not the complete or collected works of kth kind Service Instance, and k is integer.
In other words, anti-affinity condition includes: the main Service Instance of same Service Instance and standby Service Instance can not
Upgraded in a collection of physical node simultaneously, belonged to each Service Instance of the same Service Instance of load balancing relation
Can not be upgraded in a collection of physical node simultaneously.
Alternatively, according to the order that the numbering of physical node is incremented by, management end detects do not upgrade physical node whether one by one
Meet anti-affinity condition;Or, management end detects, according to the order that the numbering of physical node is successively decreased, the physics do not upgraded one by one
Whether node meets anti-affinity condition
, whether management end accords with to physical node 5, physical node 4, physical node 2 and physical node 1 successively taking Fig. 2 as a example
Close anti-affinity condition to be detected.
If meeting anti-affinity condition, enter step 405;If not meeting anti-affinity condition, enter step 406.
Step 405, if meeting anti-affinity condition, management end adds this remaining physical node to i-th batch of physics section
Point.
Step 406, if not meeting anti-affinity condition, this remaining physical node is retained in the thing do not upgraded by management end
In reason node;
As a example distributed computing system shown in by Fig. 2, in conjunction with reference to Fig. 5:
When management end carries out anti-affinity condition inspection to physical node 5, first physical node 01 includes physics section
Point 3, the Service Instance 2-3 in Service Instance 2-5 and physical node 3 in physical node 5 is only in Equations of The Second Kind Service Instance
Part of service example, the Service Instance 5-2 in Service Instance 5-4 and physical node 3 in physical node 5 is only the 5th class clothes
Part of service example in pragmatic example, so physical node 5 meets anti-affinity condition, management end compared with physical node 3
Physical node 5 is added to first physical node 01.
When management end carries out anti-affinity condition inspection to physical node 4, first physical node 01 includes physics section
Point 3 and physical node 5, the Service Instance 6-s in Service Instance 6-a and physical node 3 in physical node 4 is the 6th class service
Whole Service Instances of example, so physical node 4 is conflicted with physical node 3, physical node 4 is not inconsistent compared with physical node 3
Close anti-affinity condition, physical node 4 is continued to be left the physical node do not upgraded by management end.
When management end carries out anti-affinity condition inspection to physical node 2, first physical node 01 includes physics section
Point 3 and physical node 5, in the Service Instance 2-2 in physical node 2, the Service Instance 2-3 in physical node 3, physical node 5
Service Instance 2-5 be Equations of The Second Kind Service Instance part of service example, the Service Instance 5-1 in physical node 2, physics section
Service Instance 5-2, the Service Instance 5-4 in physical node 5 in point 3 is the part of service example of the 5th class Service Instance,
So physical node 4 meets anti-affinity condition compared with (physical node 3+ physical node 5), physical node 2 is added by management end
Add to first physical node 01.
When management end carries out anti-affinity condition inspection to physical node 1, first physical node 01 includes physics section
Put 3, physical node 5 and physical node 2, the Service Instance 1-a in physical node 1 with the Service Instance 1-s in physical node 2 is
Service Instance in whole Service Instances of first kind Service Instance, the Service Instance 3-a in physical node 1 and physical node 3
3-s is whole Service Instances of the 3rd class Service Instance, the service in the Service Instance 4-s in physical node 1 and physical node 2
Example 4-a is whole Service Instances of the 4th class Service Instance, so physical node 1 and (physical node 3+ physical node 5+ thing
Reason node 2) to compare and do not meet anti-affinity condition, physical node 1 is continued to be left the physical node do not upgraded by management end.
So far, management end determines first physical node 01 needing upgrading: physical node 2, physical node 3 and physics
Node 5.
Step 407, management end will be run in the main Service Instance running in i-th batch of physical node and other physical nodes
Standby Service Instance carries out masterslave switchover.
The standby service that management end will be run in the main Service Instance running in first physical node and other physical nodes
Example carries out masterslave switchover, so that by Service Instance based on the standby Service Instance running in other management nodes change, can be the
In the escalation process of a collection of management node, it is provided out servicing by the main Service Instance in other management nodes.
Schematically, management end is by the main Service Instance 4-a in the physical node 2 in first physical node and physics section
Service Instance 4-s in point 1 carries out masterslave switchover, and it is standby Service Instance 4- that the main Service Instance 4-a in physical node 2 is switched
s.Hereafter, when first physical node 01 being upgraded, provided the service of the 4th class Service Instance by physical node 1.
Step 408, for each Service Instance, management end is in the other physical nodes in addition to i-th batch of physical node
In, detect whether there is the Service Instance being in upstate.
Because some Service Instances may be in malfunction, so formally being risen to i-th batch of physical node
Before level, management end also needs to carry out availability detection to whole system.
Management end needs, to each Service Instance, to be confirmed whether there are the clothes being in upstate in other physical nodes
Pragmatic example.
Schematically, the other physical nodes in addition to first physical node include physical node 1 and physical node 4.
In physical node 1, running has Service Instance 1-a, Service Instance 2-1, Service Instance 3-a, Service Instance 4a, in physical node
In 4, running has Service Instance 5-3 and Service Instance 6-a.So, six kinds of different types of Service Instances are in physical node 1 and thing
All have, in reason node 4, the Service Instance being in upstate.
If each Service Instance all has the Service Instance being in upstate, enter step 409, otherwise suspend and rise
Level.
Step 409, if each Service Instance all has the Service Instance being in upstate, management end is to i-th batch
Physical node is upgraded.
Step 410, after upgrading finishes, management end detects whether also there is the physical node do not upgraded.
Schematically, after the completion of the upgrading of first physical node, management end detects whether also there is the physics do not upgraded
Node.
If also there is the physical node do not upgraded, entering step 411, otherwise terminating to upgrade.
Step 411, if also there is the physical node do not upgraded, makes i=i+1, re-executes the physical node of never upgrading
In determine the step of i-th batch of physical node.
Management end detects that physical node 1 and physical node 4 are not also upgraded, and makes i=1+1, re-executes step 401 and arrives step
Rapid 410.
In management end Computational Physicses node 1 first and physical node 4 run standby Service Instance number of examples, node,
Due to all there is not standby Service Instance, then management end Computational Physicses node 1 and physical node 4 in physical node 1 and physical node 4
The instance number of the Service Instance of middle operation, physical nodes most for the instance number of Service Instance is defined as second batch physical node
In the first physical node.
Schematically, the result of calculation of management end is: running on physical node 1 has on 4 Service Instances, physical node 4
Operation has 3 Service Instances.Therefore, management end is calculated the instance number of the Service Instance run on physical node 1 at most, will
Physical node 1 is defined as the first physical node.
Schematically, management end adds physical node 1 to second batch physical node 02.Second batch physical node is second
Criticize the physical node needing upgrading.
Whether management end meets anti-affinity condition to physical node 4 is detected.When management end is carried out to physical node 4
When anti-affinity condition checks, second batch physical node 02 includes physical node 1, the Service Instance 2-4 in physical node 5 and thing
Service Instance 2-1 in reason node 1 is only the part of service example in Equations of The Second Kind Service Instance, the service in physical node 4
Example 5-3 is only the part of service example in the 5th class Service Instance, so physical node 4 is met compared with physical node 1
Anti- affinity condition, management end adds physical node 4 to second batch physical node 02.
Physical node 1 and physical node 4 are defined as second batch physical node 02 and are upgraded by management end.
The standby clothes that management end will be run in the main Service Instance running in second batch physical node 02 and other physical nodes
Pragmatic example carries out masterslave switchover, so that by Service Instance based on the standby Service Instance running in other management nodes change, Neng Gou
In the escalation process of first management node, it is provided out servicing by the main Service Instance in other management nodes.
Schematically, management end is by the main Service Instance 1-a in the physical node 1 in second batch physical node 02 and physics
Service Instance 1-s in node 2 carries out masterslave switchover, and it is standby Service Instance that the main Service Instance 1-a in physical node 1 is switched
1-s;Main Service Instance 3-a in physical node 1 carries out masterslave switchover, by physics section with the Service Instance 3-s in physical node 3
It is standby Service Instance 3-s that main Service Instance 3-a in point 1 switches;Main Service Instance 4-a in physical node 1 and physical node 2
In Service Instance 4-s carry out masterslave switchover, it is standby Service Instance 4-s that the main Service Instance 4-a in physical node 1 is switched;
Main Service Instance 6-a in physical node 4 is carried out masterslave switchover with the Service Instance 6-s in physical node 3, by physical node
It is standby Service Instance 6-s that main Service Instance 6-a in 4 switches;Hereafter, when second batch physical node 02 being upgraded, by thing
Reason node 2 provides the service of first kind Service Instance and the service of the 4th class Service Instance, provides the 3rd class clothes by physical node 3
The service of pragmatic example and the service of the 6th class Service Instance.
Schematically, the other physical nodes in addition to second batch physical node 02 include physical node 2, physical node 3
With physical node 5.In physical node 2, running has Service Instance 1-a, Service Instance 2-2, Service Instance 4-a, Service Instance
5-1, in physical node 3, running has Service Instance 3-a, Service Instance 2-3, Service Instance 5-2, Service Instance 6-4, in thing
In reason node 5, running has Service Instance 2-5, Service Instance 5-4.So, six kinds of different types of Service Instances are in physical node
2nd, all have, in physical node 3 and physical node 5, the Service Instance being in upstate.
Management end is upgraded to second batch physical node 02, and so far in the present embodiment, whole physical node upgradings finish.
It should be noted that determining the first physics section in the physical node to management end never upgrading for the embodiment of the present invention
The mode of point is not limited.Such as, physical nodes most for the instance number of operation service example is defined as first by management end
Physical node;Again such as, physical nodes most for the main Service Instance number of operation service example is defined as the first thing by management end
Reason node.This several determination mode can also combine enforcement.
In sum, the physical node upgrade method that the present embodiment provides, by determining in the physical node of never upgrading
Go out i-th batch of physical node;I-th batch of physical node is upgraded;After upgrading finishes, detect whether also there is the thing do not upgraded
Reason node;If also there is the physical node do not upgraded, making i=i+1, in the physical node re-executing never upgrading, determining
The step that i criticizes physical node;Solve in prior art when all physical hosts restart upgrading simultaneously, whole distributed system
Service all cannot be externally provided, and the duration of service disruption also can very long problem when duration of upgrading is longer;Having reached will be multiple
Physical node is upgraded according to different batches, the physical node of each batch in upgrading, its in addition to present lot
Its physical node remains able to be provided out servicing, the effect that service will not be interrupted.
The physical node upgrade method that the present embodiment provides, anti-affine by whether each physical node of dynamic detection meets
Whole physical nodes are upgraded it is ensured that physical node escalation process interrupts externally servicing by property condition in batches;So that it is every
In upgrading, the other physical nodes in addition to present lot remain able to be provided out servicing the physical node of individual batch, clothes
The effect that business will not be interrupted.
The physical node upgrade method that the present embodiment provides, by having the most physical node of standby Service Instance true operation
Be set to the first physical node so that need in step 407 to carry out masterslave switchover Service Instance be minimum, can reduce active and standby fall
The service interruption times that the process of changing is brought, reduce out of service time as far as possible.
The physical node upgrade method that the present embodiment provides, also by before upgrading to i-th batch of Service Instance, to every
The availability of the Service Instance of type is judged;Avoid being in malfunction so that escalation process because of certain Service Instance
The disabled problem of Service Instance of middle the type, prevents produced service disruption in the escalation process of physical node.
Alternatively, physical node running has with the Service Instance of active and standby form deployment and/or with load balancing form portion
The Service Instance of administration.
Fig. 6 a and Fig. 6 b shows a kind of structural representation of distributed computing system that further embodiment of the present invention provides
Figure.So that physical node is 4 as a example, physical node includes: physical node 1, physical node 2, physical node 3, physical node 4.
Illustrated by physical node deployment in the present embodiment taking the Service Instance of active and standby form deployment as a example.
Each physical node is the server with hardware entities, such as: single-board server.
Running on each physical node has at least one Service Instance, and each Service Instance is used for providing one or more clothes
Business.Alternatively, Service Instance is any one in thread, process, container and virtual machine (vmware, vm).
Same type of Service Instance is disposed on two physical nodes with active and standby form.In figure 6, Service Instance 1-a
It is the main Service Instance of first kind Service Instance, Service Instance 1-s is the standby Service Instance of first kind Service Instance;Service Instance
2-a is the main Service Instance of Equations of The Second Kind Service Instance, and Service Instance 2-s is the standby Service Instance of Equations of The Second Kind Service Instance;Service
Example 3-a is the main Service Instance of the 3rd class Service Instance, and Service Instance 3-s is the standby Service Instance of the 3rd class Service Instance;
Service Instance 4-a is the main Service Instance of the 4th class Service Instance, and Service Instance 4-s is that the standby service of the 4th class Service Instance is real
Example;Service Instance 5-a is the main Service Instance of the 5th class Service Instance, and Service Instance 5-s is the standby clothes of the 5th class Service Instance
Pragmatic example.
Wherein, Service Instance 1-a, Service Instance 4-s are deployed on physical node 1, Service Instance 1-s, Service Instance 2-
A, Service Instance 3-a, Service Instance 5-a are deployed on physical node 2, Service Instance 2-s, Service Instance 5-s, Service Instance 4-
S is deployed on physical node 3, and Service Instance 3-s is deployed on physical node 4.
Management end calculates the instance number of the standby Service Instance running in 4 physical nodes, and result of calculation is: physical node 1
Upper operation has on 1 standby Service Instance, physical node 2 to run to have to run on 1 standby Service Instance, physical node 32 standby clothes
Run on pragmatic example, physical node 4 and have 1 standby Service Instance.
Therefore, management end be calculated on physical node 3 run standby Service Instance instance number most.
Physical node 3 is defined as the first physical node by management end.
Management end adds physical node 3 to first physical node 01.First physical node 01 is first needs
The physical node of upgrading.
Alternatively, according to the order that the numbering of physical node is incremented by, management end detects do not upgrade physical node whether one by one
Meet anti-affinity condition, that is, whether management end accords with to physical node 1, physical node 2, physical node 2 and physical node 4 successively
Close anti-affinity condition to be detected.
When management end carries out anti-affinity condition inspection to physical node 1, first physical node 01 includes physics section
Point 3, the Service Instance 4-s in Service Instance 4-a and physical node 3 in physical node 1 is the whole of the 4th class Service Instance
Service Instance, so physical node 1 is conflicted with physical node 3, physical node 1 does not meet anti-affinity compared with physical node 3
Condition, physical node 1 is continued to be left the physical node do not upgraded by management end.
When management end carries out anti-affinity condition inspection to physical node 2, first physical node 01 includes physics section
Point 3, the Service Instance 2-s in Service Instance 2-a and physical node 3 in physical node 1 is the whole of Equations of The Second Kind Service Instance
The Service Instance 5-s in Service Instance 5-a and physical node 3 in Service Instance, and physical node 1 is the 5th class Service Instance
Whole Service Instances, so physical node 2 is conflicted with physical node 3, physical node 2 is not met instead compared with physical node 3
Affinity condition, physical node 2 is continued to be left the physical node do not upgraded by management end.
When management end carries out anti-affinity condition inspection to physical node 4, first physical node 01 includes physics section
Point 3, the presence service example 3-s in physical node 4, non-existent Service Instance 3-s in physical node 3, so physical node 4
It is the part in the 3rd class Service Instance with the Service Instance 3-s in physical node 3, so physical node 4 and physical node 3
Compare and meet anti-affinity condition, management end adds physical node 4 to first physical node 01.
So far, management end determines first physical node 01 needing upgrading: physical node 3 and physical node 4.
Management end is by the main Service Instance 4-a in the physical node 3 in first physical node 01 and physical node 1
Service Instance 4-s carries out masterslave switchover, and it is standby Service Instance 4-s that the main Service Instance 4-a in physical node 3 is switched.Hereafter,
When first physical node 01 is upgraded, provided the service of the 4th class Service Instance by physical node 1.
Management end needs, to each Service Instance, to be confirmed whether there are the clothes being in upstate in other physical nodes
Pragmatic example.
Other physical nodes in addition to first physical node 01 include physical node 1 and physical node 2.In physics section
In point 1, running has Service Instance 1-s, Service Instance 4-a, and in physical node 2, running has Service Instance 1-a, Service Instance
2-a, Service Instance 3-a and Service Instance 5-a.So, five kinds of different types of Service Instances are in physical node 1 and physical node
All there is the Service Instance being in upstate in 2.
Management end is upgraded to first physical node 01.
After upgrading finishes, management end detects whether also there is the physical node do not upgraded.Management end detects physics section
Point 1 and physical node 2 are not also upgraded, the example of the standby Service Instance running in management end Computational Physicses node 1 and physical node 2
Number, result of calculation is: running on physical node 1 to have to run on 1 standby Service Instance, physical node 2 has 0 standby Service Instance.
Physical node 1 is defined as the first physical node by management end.
Management end adds physical node 1 to second batch physical node 02.Second batch physical node 02 is second batch needs
The physical node of upgrading.
Whether management end meets anti-affinity condition to physical node 2 is detected.
When management end carries out anti-affinity condition inspection to physical node 2, second batch physical node 02 includes physics section
Point 1, the Service Instance 1-a in Service Instance 1-s and physical node 2 in physical node 2
Service Instance 1-a in physical node 2 is first kind Service Instance with the Service Instance 1-s in physical node 1
All Service Instances, so physical node 2 is conflicted with physical node 1, physical node 2 does not meet anti-parent compared with physical node 1
With property condition, physical node 2 continues to be left the physical node do not upgraded by management end.
So far, management end determines the second batch physical node 02 needing upgrading: physical node 1.
Management end is by the main Service Instance 4-a in the physical node 1 in second batch physical node 02 and physical node 3
Service Instance 4-s carries out masterslave switchover, and it is standby Service Instance 4-s that the main Service Instance 4-a in physical node 1 is switched.Hereafter,
The service of the 4th class Service Instance, when second batch physical node 02 is upgraded, is provided by physical node 3.
Management end needs, to each Service Instance, to be confirmed whether there are the clothes being in upstate in other physical nodes
Pragmatic example.
Other physical nodes in addition to second batch physical node 02 include physical node 2, physical node 3 and physical node
4.In physical node 2, running has Service Instance 1-a, Service Instance 2-a, Service Instance 3-a and Service Instance 5-a, in physics
In node 3, running has Service Instance 2-s, Service Instance 5-s, Service Instance 4-a, and running in physical node 4 has Service Instance
3-s.So, five kinds of different types of Service Instances are all in available in physical node 2, physical node 3 and physical node 4
The Service Instance of state.
Management end is upgraded to second batch physical node 02.
After upgrading finishes, management end detects whether also there is the physical node do not upgraded.Management end only detects now
Remaining physical node 2 is not also upgraded, and because physical node 2 is the node uniquely do not upgraded, physical node 2 is added to the 3rd batch
Physical node 03 is upgraded, and does not now need to carry out anti-affinity inspection.Before the 3rd batch of physical node 03 upgrading, management
Hold the Service Instance 1-s in the main Service Instance 1-a in the physical node 2 in the 3rd batch of physical node 03 and physical node 1
Carry out masterslave switchover, it is standby Service Instance 1-s that the main Service Instance 1-a in physical node 2 is switched;Master in physical node 2
Service Instance 2-a carries out masterslave switchover, by the main Service Instance 2- in physical node 2 with the Service Instance 2-s in physical node 3
It is standby Service Instance 2-s that a switches;Main Service Instance 3-a in the physical node 2 and Service Instance 3-s in physical node 4 is carried out
Masterslave switchover, it is standby Service Instance 3-s that the main Service Instance 3-a in physical node 2 is switched;Main service in physical node 2
Example 5-a carries out masterslave switchover with the Service Instance 5-s in physical node 3, and the main Service Instance 5-a in physical node 2 is fallen
It is changed to standby Service Instance 5-s.Hereafter, when the 3rd batch of physical node 03 being upgraded, provide first kind service by physical node 1
The service of example, physical node 3 provides the service of Equations of The Second Kind Service Instance and the service of the 5th class Service Instance, physical node 4
The service of the 3rd class Service Instance is provided.
Other physical nodes in addition to the 3rd batch of physical node 03 include physical node 1, physical node 3 and physical node
4.In physical node 1, running has Service Instance 1-a, Service Instance 4-a, and in physical node 3, running has Service Instance 2-
A, Service Instance 5-a and Service Instance 4-s, in physical node 4, running has Service Instance 3-a.So, five kinds are dissimilar
Service Instance all have, in physical node 1, physical node 3 and physical node 4, the Service Instance being in upstate.
Management end is upgraded to the 3rd batch of physical node 03.So far in the present embodiment, whole physical node upgradings finish.
Fig. 7 a and Fig. 7 b shows a kind of structural representation of distributed computing system that another embodiment of the present invention provides
Figure.So that physical node is 3 as a example, physical node includes: physical node 1, physical node 2, physical node 3, physical node 4.
Illustrated by physical node deployment in the present embodiment taking the Service Instance of load balancing form deployment as a example.
Each physical node is the server with hardware entities, such as: single-board server.
Running on each physical node has at least one Service Instance, and each Service Instance is used for providing one or more clothes
Business.Alternatively, Service Instance is any one in thread, process, container and virtual machine (vmware, vm).
Same type of Service Instance is disposed on different physical nodes with load balancing form.In the figure 7, the first kind
Service Instance includes 2 Service Instances: Service Instance 1-1 and Service Instance 1-2;It is real that Equations of The Second Kind Service Instance includes 2 services
Example: Service Instance 2-1 and Service Instance 2-2;3rd class Service Instance includes 3 Service Instances: Service Instance 3-1, service are real
Example 3-2 and Service Instance 2-3;4th class Service Instance includes 5 Service Instances: Service Instance 4-1, Service Instance 4-2, service
Example 4-3, Service Instance 4-4 and Service Instance 4-5.
Wherein, Service Instance 1-1, Service Instance 2-1, Service Instance 3-1, Service Instance 4-1 and Service Instance 4-5 deployment
On physical node 1;Service Instance 1-2, Service Instance 2-2, Service Instance 3-2 and Service Instance 4-4 are deployed in physical node 2
On;Service Instance 3-3 and Service Instance 4-3 is deployed on physical node 3, and Service Instance 4-2 is deployed on physical node 4.
Alternatively, management end calculates the instance number of the Service Instance running in 4 physical nodes, and result of calculation is: physics
Run on node 1 to have on 5 Service Instances, physical node 2 to run to have to run on 4 Service Instances, physical node 3 and have 2 clothes
Pragmatic example, physical node 4 runs 1 Service Instance.
Therefore, management end be calculated on physical node 1 run Service Instance instance number most.
Physical node 1 is defined as the first physical node by management end.
Management end adds physical node 1 to first physical node 01.First physical node 01 is first needs
The physical node of upgrading.
Alternatively, according to the order that the numbering of physical node is incremented by, management end detects do not upgrade physical node whether one by one
Meet anti-affinity condition, that is, whether management end meets anti-affinity to physical node 2, physical node 3 and physical node 4 successively
Condition is detected.
When management end carries out anti-affinity condition inspection to physical node 2, first physical node 01 includes physics section
Point 1, the Service Instance 1-1 in Service Instance 1-2 and physical node 1 in physical node 2 is the whole of first kind Service Instance
The Service Instance 2-1 in Service Instance 2-2 and physical node 1 in Service Instance, and physical node 2 is Equations of The Second Kind Service Instance
Whole Service Instances, so physical node 2 is conflicted with physical node 1, physical node 2 is not met instead compared with physical node 1
Affinity condition, physical node 2 is continued to be left the physical node do not upgraded by management end.
When management end carries out anti-affinity condition inspection to physical node 3, first physical node 01 includes physics section
Point 1, the Service Instance 3-1 in Service Instance 3-3 and physical node 1 in physical node 3 is of the 3rd class Service Instance
Point Service Instance, the Service Instance 4-1 in Service Instance 4-3 and physical node 1 in physical node 3, Service Instance 4-5 are the
The part of service example of four class Service Instances, so physical node 3 meets anti-affinity condition compared with physical node 1, pipe
Reason end adds physical node 3 to first physical node 01.
When management end carries out anti-affinity condition inspection to physical node 4, first physical node 01 includes physics section
Point 1, the Service Instance 4-1 in Service Instance 4-2 and physical node 1 in physical node 4, Service Instance 4-1 are the 4th class clothes
The part of service example of pragmatic example, so physical node 4 meets anti-affinity condition compared with physical node 1, management end will
Physical node 3 adds to first physical node 01.
So far, management end determines first physical node 01 needing upgrading: physical node 1, physical node 3 and physics
Node 4.
Due to the Service Instance that on physical node in the present embodiment, only deployment is disposed with load balancing form, so this enforcement
Example does not need to carry out masterslave switchover.
Before upgrading, management end needs to include physical node 2 to the other physical nodes in addition to first physical node 01
Carry out availability detection.
Schematically, in physical node 2, running has Service Instance 1-2, Service Instance 2-2 and Service Instance 3-2 kimonos
Pragmatic example 4-4, so, four kinds of different types of Service Instances all have the Service Instance being in upstate in physical node 2.
Management end is upgraded to first physical node 01.
After the completion of first physical node upgrading 01, management end detects that being now only left physical node 2 does not also upgrade,
Because physical node 2 is the node uniquely do not upgraded, physical node 2 is added and is upgraded to second batch physical node 02, and
Now do not need to carry out anti-affinity inspection.
Due to the Service Instance that on physical node in the present embodiment, only deployment is disposed with load balancing form, so this enforcement
Example does not need to carry out masterslave switchover.
Before upgrading, management end need the other physical nodes in addition to second batch physical node 02 are included physical node 1,
Physical node 3 and physical node 4 carry out availability detection.
Schematically, in physical node 1, running has Service Instance 1-2, Service Instance 2-1, Service Instance 3-1, service
Example 4-1 and Service Instance 4-5, in physical node 3, running has Service Instance 3-3 and Service Instance 4-3, in physical node 4
In, run have Service Instance 4-2 so, four kinds of different types of Service Instances are in physical node 1, physical node 3 and physics section
Point 4 all has the Service Instance being in upstate.
Management end is upgraded to second batch physical node 02.So far in the present embodiment, whole physical node upgradings finish.
Refer to Fig. 8, it illustrates the block diagram of the physical node update device that one embodiment of invention provides.Should
Physical node update device can pass through special hardware circuit, or, being implemented in combination in of software and hardware becomes the whole of server
Or a part.The present embodiment is applied in virtualization system with this physical node update device.This physical node update device, bag
Include: batch determining unit 801, node upgrade unit 802, nodal test unit 803 and upgrading cycling element 804
Batch determining unit 801, for realizing the function of above-mentioned steps 301.
Node upgrade unit 802, for realizing the function of above-mentioned steps 302.
Nodal test unit 803, for realizing the function of above-mentioned steps 303.
Upgrading cycling element 804, for realizing the function of above-mentioned steps 304.
Refer to Fig. 9, it illustrates the block diagram of the physical node update device that one embodiment of invention provides.Should
Physical node update device can pass through special hardware circuit, or, being implemented in combination in of software and hardware becomes the whole of server
Or a part.The present embodiment is applied in virtualization system with this physical node update device.This physical node update device, bag
Include: batch determining unit 901, masterslave switchover unit 902, node upgrade unit 903, nodal test unit 904 and upgrading circulation
Unit 905.
Batch determining unit 901, be used for realizing above-mentioned steps 401, step 402, step 403, step 404, step 405 and
The function of step 406.
Masterslave switchover unit 902, for realizing the function of above-mentioned steps 407.
Node upgrade unit 903, for realizing the function of above-mentioned steps 409.
Nodal test unit 904, for realizing the function of upper step 408 and step 410.
Upgrading cycling element 905, for realizing the function of above-mentioned steps 411.
Above-mentioned mainly from the angle of management terminal or physical node, scheme provided in an embodiment of the present invention is described.
It is understood that management terminal or physical node, in order to realize above-mentioned functions, it comprises each function of execution hard accordingly
Part structure and/or software module.In conjunction with disclosed in this invention the module of each example of embodiment description and algorithm steps, this
Inventive embodiments can be realized with the combining form of hardware or hardware and computer software.Certain function is actually with hardware still
Computer software drives the mode of hardware executing, the application-specific depending on technical scheme and design constraint.This area
Technical staff can use different methods for each specific application realizing described function, but this realization is not
It is considered as the scope of the technical scheme beyond the embodiment of the present invention.
Figure 10 is the management terminal of one embodiment of the invention offer or the structural representation of physical node.For example, this pipe
Reason terminal or physical node are servers, for realizing the physical node upgrade function of said method embodiment.This management terminal
Or physical node 1000 includes: network interface 1010, processor 1020 and memorizer 1030.Network interface 1010 be used for support with
Receive and send messages between outside other physical nodes.Processor 1020 is used for realizing management node or the items of physical node 1000
Function, such as determines the first physical node, controls upgrading of physical node etc..Processor 1020 is additionally operable to execute above-mentioned Fig. 3 extremely
Each step in embodiment illustrated in fig. 4, or other steps of technical scheme described in the invention.
Further, management terminal or physical node 1000 can also include memorizer 1030, and memorizer 1030 is used for depositing
Store up one or more programmed instruction data.This one or more programmed instruction is configured to by processor
1020 execution are to realize above-mentioned Fig. 3 or illustrated in fig. 4 physical node upgrade method.
Additionally, management terminal or physical node 1000 can also include bus 1040.Memorizer 1030 and network interface
1010 are connected with processor 1020 by bus 1040.
It is understood that Figure 10 illustrate only management terminal or the simplification design of physical node 1000.Answer actual
With in, management terminal or physical node 1000 can comprise any number of network interface, processor, memorizer etc., and own
The equipment that the embodiment of the present invention can be realized is all within the protection domain of the embodiment of the present invention.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can pass through hardware
To complete it is also possible to the hardware being instructed correlation by program is completed, described program can be stored in a kind of computer-readable
In storage medium, storage medium mentioned above can be read only memory, disk or CD etc..
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all spirit in the present invention and
Within principle, any modification, equivalent substitution and improvement made etc., should be included within the scope of the present invention.