CN101616025B - Method for determining active-standby of services on control panel and a device - Google Patents

Method for determining active-standby of services on control panel and a device Download PDF

Info

Publication number
CN101616025B
CN101616025B CN2009100897088A CN200910089708A CN101616025B CN 101616025 B CN101616025 B CN 101616025B CN 2009100897088 A CN2009100897088 A CN 2009100897088A CN 200910089708 A CN200910089708 A CN 200910089708A CN 101616025 B CN101616025 B CN 101616025B
Authority
CN
China
Prior art keywords
service
standby
units
main
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN2009100897088A
Other languages
Chinese (zh)
Other versions
CN101616025A (en
Inventor
乔会来
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN2009100897088A priority Critical patent/CN101616025B/en
Publication of CN101616025A publication Critical patent/CN101616025A/en
Application granted granted Critical
Publication of CN101616025B publication Critical patent/CN101616025B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a method for determining the active-standby of services on a control panel and a device, wherein, the method is applied in high-usability HA system containing a plurality of control panels and comprises the following steps: A, for each service, the number N of standby service units for operating the service is determined, N is a positive integer, when N is larger than 1, N standby service units are respectively arranged on different control panels; B, the position information of N standby service units and an active service unit corresponding to the N standby service units in the HA system is respectively determined, wherein, the number of the active service unit is one and is a service unit which is in active state in the processing process of the service; and the active service unit and the standby service units are positioned on different control panels. The invention can save system resources.

Description

Method and device for determining main and standby services on control panel
Technical Field
The present invention relates to data communication technologies, and in particular, to a method and an apparatus for determining a master/standby service of a service on a control board.
Background
In the prior art, the High Availability (HA) technology is a technology for improving system Availability by minimizing down time caused by daily maintenance operations and sudden system breakdown. Referring to fig. 1, fig. 1 is a block diagram of a HA system in the related art. In fig. 1, the HA system includes m +1 control boards (specifically, control board 1 to control board m + 1). Each control board has the same software and hardware capabilities, for example, if the current service to be processed is from service 1 to service 5, each control board has the software and hardware capabilities for operating services 1 to 5.
When the system is started, one control board is selected from the m +1 control boards to serve as a main control board according to a preset competition principle; and the rest control boards are used for backing up the main control board and are marked as backup boards corresponding to the main control board, wherein the preset competition principle specifically comprises that the slot positions of the control boards are the lowest and the like. Under normal conditions, the main control board is in a working state and is communicated with external equipment such as an external interface board, and the backup board is in a backup state and is not communicated with the external equipment; when the main control board works normally, all services to be processed of the HA system are processed on the main control board, and processed service information is backed up to the backup board in real time; when one of the services running on the main control board fails, one of the backup boards is selected again from all the backup boards according to the preset competition mechanism, the main-backup switching is started, namely, the original main control board is switched to the selected backup board, and the backup board is used as a new main control board to continue to execute the service processing operation of the original main control board.
It can be seen that in the existing scheme, one of the control boards needs to be selected from m +1 control boards according to a preset competition principle to serve as a main control board; taking all the rest control boards as backup boards corresponding to the main control board; the backup board is used for taking over the main control board to work when the main control board fails; therefore, a main control board and all backup boards corresponding to the main control board need to be operated, and the main control board and all backup boards operate the same service, for example, if a control board used as the main control board in m +1 control boards shown in fig. 1 operates services 1 to 9, the remaining m control boards also operate services 1 to 9. In practical application, the backup of the main control board does not need to be performed by all the remaining control boards except the main control board, and only one or two of the remaining control boards may be required to perform the backup; thus, when the service is operated, only one or two control boards need to be operated; however, in the existing scheme, the operation of operating all the control boards except the main control board as the backup of the main control board greatly wastes system resources.
Disclosure of Invention
The invention provides a method and a device for determining main and standby services on a control panel, which are used for saving system resources.
A method for determining main and standby services of a service on a control panel is applied to an HA system comprising a plurality of control panels, and one of the control panels is selected from the HA system to be used as a system main control panel; each control board comprises an HA processing unit for managing services and more than one service unit for operating the services, and one of the HA processing units included in each control board is selected as a main HA processing unit; the method comprises the following steps:
a, aiming at each service, a main HA processing unit determines the number N of standby service units for operating the service, wherein the standby service units are service units in a standby state in the service processing process; n is a positive integer and is less than or equal to the total number of control panels in the HA system; when N is larger than 1, N standby service units are respectively positioned on different control panels;
b, the system main control board receives and caches registration information sent when other control boards in the HA system register, when the HA system HAs a pre-configured service configuration file, whether the currently cached registration information completely contains the registration information sent by all the control boards related to the service configuration information of the service in the service configuration file is judged, and if yes, the step C is executed; if not, if the current position reaches the preset position and the time is determined, executing the step D; when the HA system does not have a pre-configured service configuration file; or when the service configuration information does not exist in the service configuration file, if the time is determined when the current position is reached, executing the step E;
the main HA processing unit determines N standby service units and the position information of the corresponding main service units in the HA system according to the service configuration information, wherein the number of the main service units is 1, the service units are in a main state in the service processing process, and the service units and the N standby service units are on different control panels;
d, the main HA processing unit determines the position information of the N standby service units and the corresponding main service unit in the HA system according to the current cached registration information and the service configuration information;
e, the main HA processing unit determines the service unit running the service on the system main control board as the main service unit of the service; and determining that the N service units running the service on the N control boards which have sent the registration information are N standby service units.
An apparatus for determining a primary/standby service of a service on a control board, the apparatus comprising: the system comprises a selection unit, more than one control panel and more than one HA processing unit; each control panel comprises more than one service unit for operating service;
the selection unit is used for selecting one of the control panels contained in the HA system as a system main control panel; selecting one HA processing unit from the HA processing units contained in each control panel as a main HA processing unit;
the system main control board receives and caches registration information sent when other control boards in the HA system register, judges whether the HA system HAs a pre-configured service configuration file at present, and sends a first judgment notice to the position determining subunit if the HA system does not have the pre-configured service configuration file; if so, judging whether the currently cached registration information completely contains the registration information sent by all control panels related to the service configuration information corresponding to the service in the service configuration file, if so, sending a second judgment notice to the position determining subunit, and if not, sending a third judgment notice to the position determining subunit;
the active HA processing unit includes: a number determination subunit, a first position determination subunit, a second position determination subunit, and a third position determination subunit;
the number determining subunit is configured to determine, for each service, the number N of standby service units of the service, where a standby service unit is a service unit in a standby state in a service processing process; n is a positive integer and is less than or equal to the total number of control panels in the HA system; when N is larger than 1, N standby service units are respectively positioned on different control panels;
the first position determining subunit is configured to receive a first determination notification sent by the system main control board, determine that a service unit running the service on the system main control board is a main service unit of the service, and determine that N service units running the service on N control boards that have sent registration information are N standby service units of the service;
the second position determining subunit is configured to receive a second determination notification sent by the system main control board, and determine, according to the existing service configuration information of the service, position information of the N standby service units of the service and the corresponding main service unit in the HA system;
the third position determining subunit is configured to receive a third determination notification sent by the system main control board, and determine, according to the currently cached registration information and the existing service configuration information of the service, position information of the N standby service units and the corresponding main service unit in the HA system; the number of the main service units is 1, the service units in the main state in the service processing process are on different control boards with the N standby service units.
As can be seen from the above, in the method and apparatus provided by the present invention, it is not the case that all control boards except the main control board are directly determined as the backup service unit boards in the prior art; instead, the number N of standby service units for operating the service is determined for each service, and the standby service units are service units in a standby state in the service processing process; n is a positive integer and is less than or equal to the total number of control panels in the HA system; when N is larger than 1, N standby service units are respectively positioned on different control panels; and then, respectively determining the position information of the N standby service units and the main service units corresponding to the N standby service units in the HA system, wherein the number of the main service units is one, and the main service units and the standby service units are on different control panels in the service processing process. Thus, compared with the prior art, the method and the device provided by the invention save system resources. For example, as shown in fig. 1, the HA system includes m +1 control boards, and for a current service 1, if it is determined that the number of the standby service units running the service is 2, the two standby service units are located on different control boards; since the number of the active service units running the service 1 is 1 and the active service units and the standby service units are on different control boards, for the service 1, only 2+ 1-3 control boards are needed to run the service 1, and not m +1 control boards included in the HA system are all used for running the service 1 as in the prior art, so that system resources are greatly saved.
Drawings
FIG. 1 is a block diagram of a prior art HA system;
FIG. 2 is a detailed flow chart provided by an embodiment of the present invention;
fig. 3 is a diagram illustrating an apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
The method provided by the embodiment of the invention is applied to an HA system comprising a plurality of control boards, each control board HAs the same structure and comprises the following steps: HA processing unit, monitoring unit and more than one service unit; the HA processing unit is used for managing the service units on the same control panel with the HA processing unit; the monitoring unit is used for monitoring whether all the service units in the same control panel have faults or not; a service unit is an entity that runs services, and one service unit can run more than one service. For example, if the services to be processed by the HA system are services 1 to 5, each control panel may include 3 service units, which are respectively service unit 1 to service unit 3, where service unit 1 is used to run service 1, service unit 2 is used to run service 2 and service 3, and service unit 3 is used to run service 4 and service 5.
A specific flowchart of the method provided by the embodiment of the present invention can be seen in fig. 2. Referring to fig. 2, fig. 2 is a detailed flow chart provided by the embodiment of the invention. The present embodiment is applied to an HA system including a plurality of control boards, wherein each control board includes the service unit, the HA processing unit, and the monitoring unit. For each service currently to be processed by the HA system, taking service 1 as an example, as shown in fig. 2, the process may include the following steps:
step 201, selecting one of the control boards included in the HA system as a system main control board according to a preset election principle.
Here, the preset election principle may be implemented in various ways, for example, the slot position of the control board is the lowest, or the slot position of the control board is the highest, and the embodiment of the present invention is not limited in detail. And if the preset election principle is that the slot position of the control panel is the lowest, selecting the control panel with the lowest slot position in each control panel as the system main control panel.
It should be noted that, the determination of the system master control board is mainly for uniformly managing the registration of other control boards in the HA system, and specifically, refer to steps 204 to 205.
Step 202, selecting one HA processing unit from the HA processing units included in each control board as an active HA processing unit of the HA system according to a preset determination principle.
Here, the preset determination principle may be the same as or different from the election principle preset in step 201, that is, the active HA processing unit determined in step 202 may be on the system main control board elected in step 201, or may not be on the system main control board elected in step 201, and the embodiment of the present invention is not limited in particular. In order to save system resources, in the embodiment of the present invention, the HA processing unit may be used on the system main control board selected in this step 201 as an example.
Preferably, in this step 202, after determining the active HA processing unit, the HA processing units on the other control boards may be determined as the standby HA processing units corresponding to the active HA processing unit. Here, the main HA processing unit is selected, mainly to facilitate unified management of the service units on each control board in the HA system.
It should be noted that step 202 and step 201 have no fixed time sequence, and step 202 may occur at the time of starting the HA system or at any time after the HA system is started, which is not particularly limited in the embodiment of the present invention.
In step 203, the active HA processing unit determines the number N of standby service units for operating service 1.
Here, the standby service unit is a service unit which is in a standby state (specifically, does not communicate with an external device such as an interface device) during service processing; wherein N is a positive integer and is less than or equal to the total number of control panels of the control equipment in the HA system; when N is greater than 1, the N standby service units determined in step 203 are respectively located on different control device control boards. For example, for a service 1 to be currently processed, the number of standby service units for operating the service 1 is determined, and if the determined number is 2, it indicates that two standby service units are required to operate the service 1, where the two standby service units are respectively located on different control panels.
Here, when the step 203 is implemented specifically, the method may include: when the HA system currently stores a service configuration file, the main HA processing unit may preset the service to be processed for the user in advance, or may be configured by the user when the HA system operates last time; judging whether the service configuration file has service configuration information of the service 1, wherein the service configuration information comprises the number of standby service units for operating the service 1; if so, determining the number of the standby service units for operating the service 1 according to the service configuration information;
if the judgment result is negative, or if no service configuration file exists currently, then,
determining a registration value when the service unit for running the service 1 is started (usually, the registration value of each service unit is preset when the determination operation of step 203 is executed, and when the registration value is preset, the registration value of the service unit running the same service on each control board is the same) as the number N of the standby service units; or determining the HA system default value recorded on the control board where the HA system default value is located (the HA system default value is preset when the determination operation of step 203 is performed) as the number N of the standby service units.
Of course, in the embodiment of the present invention, the active HA processing unit may also directly determine the registration value when the service unit for running the service 1 is started, or the default value of the HA system recorded on the control board where the active HA processing unit is located is the number N of the standby service units for running the service 1, regardless of whether the HA system currently stores the service configuration file. Therefore, the above is only an example and is not intended to limit the application of the embodiments of the present invention.
Step 204, when each control board except the system main control board included in the HA system is started, the control board carries the registration information corresponding to itself in the registration request and sends the registration request to the system main control board.
In this embodiment, the operation in step 204 may include: when each control board except the system main control board included in the HA system is started, the control board may send a registration request to the system main control board through the HA processing unit included in the control board, where the registration request carries registration information, where the registration information may be information of the control board that sent the registration request, slot position information of the control board, or a serial number of the control board. For example, the HA system includes a control board 1 to a control board 3, where the control board 1 is elected as a system main control board in step 203, and when other control boards, such as the control board 2 and the control board 3, are started, for the control board 2, registration information corresponding to the control board 2 needs to be carried in a registration request, and the registration request is sent to the control board 1 by the HA processing unit included in the control board 2 through the HA system internal communication link; for the control board 3, the registration information corresponding to the control board 3 needs to be carried in the registration request and sent to the control board 1 by the HA processing unit included in the control board 3 through the HA system internal communication link.
In step 205, the system main control board receives the registration request, and caches the registration information carried in the registration request in the memory.
Here, the system main control board does not need to respond to the received registration request, and when the system main control board receives the registration request, the system main control board can be recorded as that the control board sending the registration request is registered.
Step 206, when the HA system currently stores the service configuration file, the system main control board determines whether the currently cached registration information completely contains the registration information sent by all control boards related to the service configuration information of the service 1 in the service configuration file, if yes, step 207 is executed; otherwise, if the preset position determination time is currently reached, step 208 is executed.
Here, the service configuration information of the service 1 includes primary configuration information and standby configuration information of the service 1, and the primary configuration information includes information (for example, a slot position or a serial number of a control board, etc.) of the control board where the primary service unit running the service 1 is located; the standby configuration information includes information of the control board (for example, a slot or a serial number of the control board) where the standby service unit running the service 1 is located. For example, the service configuration information of the service 1 is: the number of the standby service units for operating the service 1 is 2, wherein the main configuration information of the service 1 is that the main service unit for operating the service 1 is a service unit for operating the service included in the control panel 1, and the standby configuration information of the service 1 is that 2 standby service units for operating the service 1 are respectively service units for operating the service 1 included in the control panel 2 and the control panel 3; thus, all control boards involved in the service configuration information of the service 1 in the service configuration file in step 206 are control board 1 to control board 3; the operation of determining whether the currently cached registration information completely contains the registration information sent by all the control boards related to the service configuration information of the service 1 in the service configuration file in step 206 specifically includes: and judging whether the currently cached registration information contains the registration information sent by the control boards 1 to 3.
It should be noted that, if the preset position determination time is not reached currently, the process returns to step 204. The preset position determining time is mainly time for determining the position information of the active service unit and the standby service unit, and does not indicate other time after the preset position determining time, and the system main control board does not receive the registration request sent by the control board any more.
Step 207, the active HA processing unit determines the location information of the active service unit and the N standby service units respectively according to the active configuration information and the standby configuration information of the service 1.
Here, it is determined in step 206 that the currently cached registration information completely includes the registration information sent by all control boards involved in the service configuration information of the service 1, which indicates that the currently cached registration information includes the registration information sent by the control board involved in the primary configuration information and the registration information sent by N control boards where N standby service units in the standby configuration information are located; thus, the position information of the main service unit and the N standby service units can be easily determined according to the main configuration information and the standby configuration information of the service 1.
In step 208, the active HA processing unit determines the location information of the active service unit and the N standby service units according to a preset determination principle.
Here, step 208 is performed in three different cases, that is, no service profile of service 1 exists in the service profile, no service profile is currently stored, or registration information sent by a part of the control boards to which the service profile relates is currently cached. The specific operation of step 208 may vary from case to case.
When it is determined in step 206 that the service configuration information of the service 1 does not exist in the service configuration file; or when the service profile is not currently stored, the determining in step 208 may specifically include: determining the service unit running the service 1 on the system main control board selected in step 201 as a main service unit running the service 1; and determining that the N service units running the service 1 on any N control boards registered with the system main control board are N standby service units running the service 1. It should be noted that, when the number of control boards registered with the system main control board is less than the number N determined in step 203, since N standby service units are located on different control boards, the number of standby service units may not reach the number N determined in step 203; in consideration of the applicability of the embodiment of the present invention, the corresponding service unit is started according to the determined location information of the active service unit and the determined location information of the standby service unit without continuously waiting for the number of the standby service units to reach the number determined in step 203.
When a part of the registration information sent by the control board, which is referred to by the service configuration information of the service 1, is currently cached, the determining in step 208 may specifically include:
step 208a, judging whether the registration information cached currently exists registration information sent by a control board where the main service unit related to the main configuration information of the service 1 is located, if so, determining the position information of the main service unit according to the main configuration information; otherwise, determining the service unit of the service 1 running on the system main control board as the main service unit of the service 1;
step 208b, judging whether the current cached registration information has registration information sent by the control board where the N standby service units related to the standby configuration information of the service 1 are respectively located, if so, determining the position information of the N standby service units according to the standby configuration information; if registration information sent by a control board where M standby service units are located in N standby service units included in standby configuration information of service 1 is cached currently, where M is a positive integer and is smaller than N, determining location information of the N standby service units according to a preset standby determination principle.
Specifically, the determining the location information of the N standby service units according to the preset standby determining principle in step 208b may include: preferentially determining the position information of the M standby service units according to the standby configuration information of the service 1;
selecting N-M control boards from other control boards registered with a system main control board, and determining a service unit of the service 1 running on the selected control board as a standby service unit of the service 1; or, when the stacking structure of the HA system is frame stacking, where each frame in the frame stacking structure includes two control panels, selecting N-M control panels from another control panel included in each frame to which each control panel to which M standby service units are respectively located belongs, and determining that a service unit on the selected control panel, which runs service 1, is a standby service unit of service 1; of course, if the total number of another control board included in each frame to which each control board to which M backup service units are respectively located belongs is less than N-M (denoted as L), L control boards are preferentially selected from another control board included in a frame to which the control board to which the M backup service units are respectively located belongs, and the service unit on which the service 1 operates on the selected L control boards is determined as a backup service unit; and selecting N-L control boards from the rest control boards which are registered with the system main control board, and determining the service units of the service 1 running on the selected N-L control boards as standby service units.
It should be noted that step 208a and step 208b are not in a fixed chronological order, and may occur simultaneously. When the number of the control boards registered with the system main control board is less than N-M, or the total number of another control board included in each frame to which each control board to which the current M standby service units are respectively located is less than N-M (marked as L), and the number of the remaining control boards registered with the system main control board is N-L, the number of the standby service units cannot reach the number determined in step 203; in consideration of the applicability of the embodiment of the present invention, the corresponding service unit is started according to the determined location information of the active service unit and the determined location information of the standby service unit without continuously waiting for the number of the standby service units to reach the number N determined in step 203.
To facilitate understanding of the specific operation of step 208 when currently caching a portion of the registration information sent by the control board to which the service configuration information of service 1 relates, a specific embodiment is described. For example, if the service configuration information of the service 1 includes the primary configuration information and the standby configuration information, in step 203, it is determined that the number of the standby service units running the service 1 is 3 according to the service configuration information; the main configuration information of the service 1 is: the main service unit for operating the service 1 is a service unit for operating the service included in the control panel 1, and the standby configuration information is: the 3 standby service units of the operation service 1 are respectively service units of the operation service 1 contained in the control boards 2 to 4; in this way, it can be known that the number of control boards involved in the service configuration information of the service 1 is 4, and the control boards 1 to 4 are respectively referred to. If the registration information sent by the control panel 1 and the control panel 2 is cached currently, determining the registration information sent by a part of control panels related to the service configuration information of the service 1 which is cached currently, and determining the position information of the main service unit according to the main configuration information because the registration information sent by the control panel 1 where the main service unit is located exists in the currently cached registration information; because the number of the standby service units of the service 1 is 3, and the registration information sent by the control panel where only one of the standby service units is located, namely the control panel 2, is cached currently, the service unit on the control panel 2 for running the service 1 is preferentially determined as the standby service unit; and then, randomly selecting two control boards from the registered control boards, and determining the service unit of the service 1 running on the selected control board as a standby service unit. Of course, the determination operation of the standby service unit is only an example, and is not limited to the application of the embodiment of the present invention. Preferably, in the embodiment of the present invention, when the stacking structure of the HA system is frame stacking, where each frame in the frame stacking structure includes two control boards, because only the registration information sent by the control board 2, which is the control board where one standby service unit is located, is currently cached, the service unit running service 1 on the other control board in the same frame as the control board 2 is determined as a standby service unit; and then, randomly selecting 1 control board from the registered control boards, and determining the service unit of the service 1 running on the selected control board as a standby service unit.
It should be noted that, because the location information of the active service unit and the standby service unit is determined by the active HA processing unit, the service unit on each control panel does not know whether it is the active service unit or the standby service unit, preferably, when the service unit on the control panel is started, it needs to consult the active HA processing unit about whether it is the active service unit or the standby service unit, and then performs corresponding work according to the reply of the active HA processing unit, for example, if the reply indicates that the service unit is the active service unit, it works with the identity of the active service unit.
As the system main control board can also receive the registration request sent when the control board is started at any other time after the preset position determination time, thus, for the control board such as the control board 1 which performs registration (sends registration information to the system main control board) at a time after the preset position determination time, when the number of standby service units running the started service such as the service 1 is less than the number determined in step 203, the service unit running the service 1 on the control board such as the control board 1 is started, and the service unit is determined to be the standby service unit of the service 1; or,
if the control panel where the main service unit for running the currently started service, such as service 1, recorded in the currently stored service configuration file is located is a control panel that is registered at a time after the preset position determination time, the operation of the main service unit for currently running service 1 is switched to the service unit for running service 1 on the control panel that is registered at a time after the preset position determination time according to the switching command from the user.
Preferably, in the operation process of the HA system, each operated control panel may also exit from the currently operated HA system according to an actual situation, so that when more than one control panel needs to exit, for example, when the control panel 1 needs to exit, one standby service unit corresponding to the main service unit on the other control panels currently started (registered with the system main control panel) is selected for the main service unit operated on the control panel 1, and the operation of the main service unit is switched to the selected standby service unit;
for a service, such as service 1, operated by a standby service unit on the control board, if the standby service unit for operating the service 1 is not started on other control boards currently started (registered with the system main control board), that is, the current number of the standby service units of the service 1 is only one, and the service unit for operating the service 1 is operated on the control board that needs to be exited, to ensure the stability of the system, one control board can be selected from other currently started control boards, the service unit for operating the service 1 on the control board is started, and the service unit is determined to be the standby service unit for operating the service 1.
Thus, the detailed description of the method provided by the embodiment of the present invention is realized by the above-described operations.
The method provided by the invention is described above, and the device provided by the invention is described in detail below.
Referring to fig. 3, fig. 3 is a block diagram of an apparatus according to an embodiment of the present invention. As shown in fig. 3, the apparatus may include: a selection unit 301, one or more control boards 302, and one or more HA processing units 303.
Wherein, the selection unit 301 is configured to select one of the more than one control boards 302 included in the HA system as a system main control board; and selecting one from the more than one HA processing units 303 as a primary HA processing unit; here, the number of the one or more HA processing units 303 is the same as the number of the one or more control boards 302, and each HA processing unit is distributed on each corresponding control board. If the selection unit 301 selects the control board 1 as the system main control board from the one or more control boards 302, the HA processing unit 1 is selected as the main HA processing unit from the one or more HA processing units 303. The active HA processing unit may be located on the system main control board, or may not be located on the system main control board, which is not limited herein.
Preferably, as shown in fig. 3, the main HA processing unit may include: a number determination subunit 304, a first position determination subunit 305, a second position determination subunit 306, and a third position determination subunit 307;
the system main control board receives and caches registration information sent when other control boards in the HA system register, judges whether the HA system HAs a pre-configured service configuration file at present, and sends a first judgment notice to a first position determination subunit 305 if the HA system does not have the pre-configured service configuration file; if so, it is determined whether the currently cached registration information completely contains the registration information sent by all control boards related to the service configuration information corresponding to the service in the service configuration file, if so, a second determination notification is sent to the second location determining subunit 306, and if not, a third determination notification is sent to the third location determining subunit 307.
The number determining subunit 304 is configured to determine, for each service, the number N of standby service units of the service, where a standby service unit is a service unit in a standby state in a service processing process; n is a positive integer and is less than or equal to the total number of control panels in the HA system; when N is larger than 1, N standby service units are respectively positioned on different control panels;
the first position determining subunit 305 is configured to receive a first determination notification sent by the system main control board, determine that a service unit running the service on the system main control board is a main service unit of the service, and determine that N service units running the service on N control boards that have sent registration information are N standby service units of the service;
the second position determining subunit 306 is configured to receive a second determination notification sent by the system main control board, and determine, according to the existing service configuration information of the service, position information of the N standby service units of the service and the corresponding main service unit in the HA system;
the third position determining subunit 307 is configured to receive a third determination notification sent by the system main control board, and determine, according to the currently cached registration information and the existing service configuration information of the service, position information of the N standby service units and the corresponding main service unit in the HA system; the number of the main service units is 1, the service units in the main state in the service processing process are on different control boards with the N standby service units.
Preferably, the quantity determining subunit 304 may include: a determination module 3041 and a quantity determination module 3042;
the determining module 3041 is configured to determine whether the HA system currently HAs a preconfigured service configuration file, and if not, send a first determination notification to the quantity determining module 3042; if yes, whether the service configuration information of the service exists in the service configuration file is judged, if yes, a second determination notice is sent to the quantity determination module 3042, and if not, a third determination notice is sent to the quantity determination module 3042;
the quantity determination module 3042 is configured to receive the first determination notification or the third determination notification,
determining the registration value of the service unit for running the service as the number N of the standby service units of the service, or determining the HA system default value recorded by the control panel where the control panel is located as the number N of the standby service units of the service;
receiving a second determination notification, and determining the number N of the standby service units of the service according to the service configuration information; the service configuration information includes the number N of the standby service units of the service.
Preferably, the service configuration information includes primary configuration information and standby configuration information, and the primary configuration information includes information of a control board where the primary service unit is located; the standby configuration information comprises information of the control panel where the N standby service units are located;
after receiving the second determination notification, the second position determining subunit 306 determines the position information of the main service unit according to the main configuration information; and respectively determining the position information of the N standby service units according to the standby configuration information.
The third position determining subunit 307 may include: a service master determining module 3071 and a service standby determining module 3072;
the service master determining module 3071 is configured to determine whether registration information sent by a control board where a master service unit related to the master configuration information is located exists in currently cached registration information, and if so, determine location information of the master service unit according to the master configuration information; otherwise, determining the service unit running the service on the system main control board as the main service unit;
the service standby determining module 3072 is configured to determine whether registration information sent by a control board where N standby service units related to the standby configuration information are located exists in currently cached registration information, and if so, determine location information of the N standby service units according to the standby configuration information; if registration information sent by a control board where M standby service units in the N standby service units are located is cached currently, wherein M is a positive integer and is smaller than N, determining position information of the M standby service units according to the standby configuration information;
selecting N-M control boards from other control boards which have sent the registration information, and determining that the N-M service units which run the service on the selected N-M control boards are N-M standby service units; or, when the stacking structure of the HA system is frame stacking, where each frame in the frame stacking structure includes two control panels, N-M control panels are selected from another control panel included in each frame to which each control panel where the M standby service units are located belongs, and it is determined that the N-M service units running the service on the selected N-M control panel are N-M standby service units.
As can be seen from the above description, in the method and apparatus provided by the present invention, not all control boards except the main control board are directly determined as the backup service unit backup board in the prior art; instead, the number N of standby service units for operating the service is determined for each service, and the standby service units are service units in a standby state in the service processing process; n is a positive integer and is less than or equal to the total number of control panels in the HA system; when N is larger than 1, N standby service units are respectively positioned on different control panels; and then, respectively determining the position information of the N standby service units and the main service units corresponding to the N standby service units in the HA system, wherein the number of the main service units is one, and the main service units and the standby service units are on different control panels in the service processing process. Thus, compared with the prior art, the method and the device provided by the invention save system resources. For example, as shown in fig. 1, the HA system includes m +1 control boards, and for a current service 1, if it is determined that the number of the standby service units running the service is 2, the two standby service units are located on different control boards; since the number of the active service units running the service 1 is 1 and the active service units and the standby service units are on different control boards, for the service 1, only 2+ 1-3 control boards are needed to run the service 1, and not m +1 control boards included in the HA system are all used for running the service 1 as in the prior art, so that system resources are greatly saved.
Further, as will be known by those skilled in the art, when a control board runs a service, it needs to consume performance resources of the control board, such as CPU performance on the control board, and the embodiment of the present invention determines to run a unit for a standby service unit according to actual conditions; in the prior art, the control boards except the main control board are not all used for running the service; compared with the prior art, the performance of other control boards in processing other services can be greatly improved. For example, as shown in fig. 1, an HA system includes m +1 control boards, and if it is determined that the number of standby service units running the service is 2 for a current service 1, since the number of active service units running the service 1 is 1 and the standby service units are on different control boards, for the service 1, not all the control boards are used to run the service 1 in the embodiment of the present invention, but only 2+1 — 3 control boards are needed to run the service 1, and the remaining other control boards do not need to run the service 1, so that consumption of performance resources due to running the service 1 is avoided, and accordingly, performance of other control boards in processing other services is greatly improved.
Furthermore, since all control boards in the prior art have completely the same hardware capability, that is, the HA system in the prior art is formed by stacking control boards having the same structure, and in the embodiment of the present invention, not all control boards except the main control board are directly used as standby boards in the prior art, so that the embodiment of the present invention does not require that all control boards have the same software and hardware capability, for example, as shown in fig. 1, the HA system includes m +1 control boards, and for a current service 1, if it is determined that the number of standby service units for operating the service is 2, the number of main service units for operating the service 1 is 1 on each of the control boards 1 to 2, and on the control board 3, it can be required that the control boards 4 to m +1 do not have the software and hardware capability for operating the service 1, and it can be seen that the HA system in the embodiment of the present invention can include control boards having different software and hardware capabilities (or having different hardware capabilities) (or having different node capabilities Structure) of the control panel. Thus, embodiments of the present invention support stacking of heterogeneous systems, relative to the prior art.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for determining main and standby of services on control boards is characterized in that the method is applied to a high-availability HA system comprising a plurality of control boards, and one of the control boards in the HA system is selected as a system main control board; each control board comprises an HA processing unit for managing services and more than one service unit for operating the services, and one of the HA processing units included in each control board is selected as a main HA processing unit; the method comprises the following steps:
a, aiming at each service, a main HA processing unit determines the number N of standby service units for operating the service, wherein the standby service units are service units in a standby state in the service processing process; n is a positive integer and is less than or equal to the total number of control panels in the HA system; when N is larger than 1, N standby service units are respectively positioned on different control panels;
b, the system main control board receives and caches registration information sent when other control boards in the HA system register, when the HA system HAs a pre-configured service configuration file, whether the currently cached registration information completely contains the registration information sent by all the control boards related to the service configuration information of the service in the service configuration file is judged, and if yes, the step C is executed; if not, if the current position reaches the preset position and the time is determined, executing the step D; when the HA system does not have a pre-configured service configuration file; or when the service configuration information does not exist in the service configuration file, if the time is determined when the current position is reached, executing the step E;
the main HA processing unit determines N standby service units and the position information of the corresponding main service units in the HA system according to the service configuration information, wherein the number of the main service units is 1, the service units are in a main state in the service processing process, and the service units and the N standby service units are on different control panels;
d, the main HA processing unit determines the position information of the N standby service units and the corresponding main service unit in the HA system according to the current cached registration information and the service configuration information;
e, the main HA processing unit determines the service unit running the service on the system main control board as the main service unit of the service; and determining that the N service units running the service on the N control boards which have sent the registration information are N standby service units.
2. The method of claim 1, wherein the determining in step a comprises: when the HA system HAs a service configuration file which is pre-configured, the main HA processing unit judges whether the service configuration file HAs service configuration information of the service, and when the judgment result is yes, the number N of standby service units of the service is determined according to the service configuration information; the service configuration information comprises the number of the standby service units of the service;
when the judgment result is negative or when the HA system does not have the service configuration file,
the main HA processing unit determines the registration value of the service unit for operating the service as the number N of the standby service units of the service; or, the active HA processing unit determines that the HA system default value recorded by the control board where the active HA processing unit is located is the number N of the standby service units of the service.
3. The method according to claim 1, wherein the service configuration information includes active configuration information and standby configuration information, and the active configuration information includes information of a control board where the active service unit is located; the standby configuration information comprises information of the control panel where the N standby service units are located;
the judgment in the step B comprises the following steps: judging whether the current cached registration information completely contains the registration information sent by the control panel where the main service unit related to the main configuration information is located and the control panel where the N standby service units related to the standby configuration information are located;
the determination in step C includes: determining the position information of the main service unit according to the main configuration information; and respectively determining the position information of the N standby service units according to the standby configuration information.
4. The method of claim 3, wherein step D comprises:
judging whether registration information sent by a control panel where a main service unit related to the main configuration information is located exists in the current cached registration information, and if so, determining the position information of the main service unit according to the main configuration information; otherwise, determining the service unit running the service on the system main control board as the main service unit; judging whether registration information sent by a control board where N standby service units related to the standby configuration information are located exists in the current cached registration information, and if so, determining the position information of the N standby service units according to the standby configuration information; if registration information sent by a control board where M standby service units in the N standby service units are located is cached currently, wherein M is a positive integer and is smaller than N, determining position information of the M standby service units according to the standby configuration information;
selecting N-M control boards from other control boards which have sent the registration information, and determining that the N-M service units which run the service on the selected N-M control boards are N-M standby service units; or, when the stacking structure of the HA system is frame stacking, each frame in the frame stacking structure includes two control panels, N-M control panels are selected from another control panel included in each frame to which each control panel where the M standby service units are located belongs, and it is determined that the N-M service units running the service on the selected N-M control panel are N-M standby service units.
5. The method of claim 1, further comprising: starting the main service unit and the standby service unit determined in the step C, the step D or the step E;
after the preset position determination time is reached, the method further comprises the following steps: the control board which does not send the registration information before the preset position determination time sends the registration information to the system main control board; for a currently started service, if the number of standby service units of the service is less than the number determined in the step A, starting a service unit which runs the service on a control panel which sends registration information after the preset position determination time is reached, and determining the service unit as the standby service unit of the service; or, if the control panel where the active service unit of the currently started service is located, which is recorded in the service configuration file, is the control panel that sends the registration information after the preset position determination time is reached, switching the operation of the active service unit of the current service to the service unit that runs the service on the control panel that sends the registration information after the preset position determination time is reached according to the switching command of the user.
6. The method of claim 1, further comprising: starting the main service unit and the standby service unit determined in the step C, the step D or the step E;
if a control board needs to be exited currently, the main HA processing unit selects one standby service unit corresponding to the main service unit from other control boards which have sent registration information aiming at the started main service unit on the control board, and switches the work of the main service unit to the selected standby service unit; for the service operated by the started standby service unit on the control panel, if the standby service unit operated by the service is not started on the other currently started control panels, selecting one control panel from the other currently sent registration information, starting the service unit used for operating the service on the control panel, and determining that the started service unit is the standby service unit.
7. An apparatus for determining a master/slave operation of a service on a control board, the apparatus comprising: a selection unit, more than one control board and more than one high availability HA processing unit; each control panel comprises more than one service unit for operating service;
the selection unit is used for selecting one of the more than one control boards as a system main control board; and selecting one from the more than one HA processing units as a main HA processing unit; the active HA processing unit includes: a number determination subunit, a first position determination subunit, a second position determination subunit, and a third position determination subunit;
the system main control board receives and caches registration information sent when other control boards in the HA system register, judges whether the HA system HAs a pre-configured service configuration file at present, and sends a first judgment notice to the first position determination subunit if the HA system does not have the pre-configured service configuration file; if so, judging whether the currently cached registration information completely contains the registration information sent by all control panels related to the service configuration information corresponding to the service in the service configuration file, if so, sending a second judgment notice to the second position determination subunit, and if not, sending a third judgment notice to the third position determination subunit;
the number determining subunit is configured to determine, for each service, the number N of standby service units of the service, where a standby service unit is a service unit in a standby state in a service processing process; n is a positive integer and is less than or equal to the total number of control panels in the HA system; when N is larger than 1, N standby service units are respectively positioned on different control panels;
the first position determining subunit is configured to receive a first judgment notification, determine that a service unit running the service on the system main control board is a main service unit of the service, and determine that N service units running the service on N control boards that have sent registration information are N standby service units of the service;
the second position determining subunit is configured to receive a second judgment notification, and determine, according to the service configuration information, position information of the N standby service units of the service and the corresponding main service unit in the HA system;
the third position determining subunit is configured to receive the third determination notification, and determine, according to the currently cached registration information and the service configuration information, position information of the N standby service units and the corresponding active service unit in the HA system; the number of the main service units is 1, and the service units in the main state in the service processing process are on different control boards from the N standby service units.
8. The apparatus of claim 7, wherein the number determination subunit comprises: a judging module and a quantity determining module;
the judging module is used for judging whether the HA system HAs a pre-configured service configuration file at present, and if not, sending a first determination notice to the quantity determining module; if yes, judging whether the service configuration file has the service configuration information of the service, if yes, sending a second determination notice to the quantity determination module, and if not, sending a third determination notice to the quantity determination module;
the number determination module is configured to receive either the first determination notification or the third determination notification,
determining the registration value of the service unit for running the service as the number N of the standby service units of the service, or determining the HA system default value recorded by the control panel where the control panel is located as the number N of the standby service units of the service;
receiving a second determination notification, and determining the number N of the standby service units of the service according to the service configuration information; the service configuration information includes the number N of the standby service units of the service.
9. The apparatus according to claim 7, wherein the service configuration information includes active configuration information and standby configuration information, and the active configuration information includes information of a control board where the active service unit is located; the standby configuration information comprises information of the control panel where the N standby service units are located;
after receiving a second judgment notification, the second position determining subunit determines the position information of the main service unit according to the main configuration information; and respectively determining the position information of the N standby service units according to the standby configuration information.
10. The apparatus according to claim 7, wherein the service configuration information includes active configuration information and standby configuration information, and the active configuration information includes information of a control board where the active service unit is located; the standby configuration information comprises information of the control panel where the N standby service units are located;
the third position determination subunit includes:
a service master determining module, configured to determine whether registration information sent by a control board where a master service unit related to the master configuration information is located exists in currently cached registration information, and if so, determine location information of the master service unit according to the master configuration information; otherwise, determining the service unit running the service on the system main control board as the main service unit;
the service standby determining module is used for judging whether registration information sent by a control panel where N standby service units related to the standby configuration information are located exists in the current cached registration information, and if so, determining the position information of the N standby service units according to the standby configuration information; if registration information sent by a control board where M standby service units in the N standby service units are located is cached currently, wherein M is a positive integer and is smaller than N, determining position information of the M standby service units according to the standby configuration information;
selecting N-M control boards from other control boards which have sent the registration information, and determining that the N-M service units which run the service on the selected N-M control boards are N-M standby service units; or, when the stacking structure of the HA system is frame stacking, where each frame in the frame stacking structure includes two control panels, N-M control panels are selected from another control panel included in each frame to which each control panel where the M standby service units are located belongs, and it is determined that the N-M service units running the service on the selected N-M control panel are N-M standby service units.
CN2009100897088A 2009-07-21 2009-07-21 Method for determining active-standby of services on control panel and a device Active CN101616025B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100897088A CN101616025B (en) 2009-07-21 2009-07-21 Method for determining active-standby of services on control panel and a device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100897088A CN101616025B (en) 2009-07-21 2009-07-21 Method for determining active-standby of services on control panel and a device

Publications (2)

Publication Number Publication Date
CN101616025A CN101616025A (en) 2009-12-30
CN101616025B true CN101616025B (en) 2011-07-06

Family

ID=41495452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100897088A Active CN101616025B (en) 2009-07-21 2009-07-21 Method for determining active-standby of services on control panel and a device

Country Status (1)

Country Link
CN (1) CN101616025B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102123047A (en) * 2011-01-21 2011-07-13 北京傲天动联技术有限公司 Gridding system network architecture (SNA) of trislot position device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202756A (en) * 2007-12-20 2008-06-18 杭州华三通信技术有限公司 Method and apparatus of message processing
CN101442437A (en) * 2008-10-31 2009-05-27 金蝶软件(中国)有限公司 Method, system and equipment for implementing high availability

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202756A (en) * 2007-12-20 2008-06-18 杭州华三通信技术有限公司 Method and apparatus of message processing
CN101442437A (en) * 2008-10-31 2009-05-27 金蝶软件(中国)有限公司 Method, system and equipment for implementing high availability

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JP特開2002-319970A 2002.10.31

Also Published As

Publication number Publication date
CN101616025A (en) 2009-12-30

Similar Documents

Publication Publication Date Title
US8032786B2 (en) Information-processing equipment and system therefor with switching control for switchover operation
US6859889B2 (en) Backup system and method for distributed systems
CN100342333C (en) System management controller negotiation protocol
US8782211B1 (en) Dynamically scheduling tasks to manage system load
US20090043876A1 (en) Method for managing devices and a management entity in a user network
CN106919452B (en) Multi-core heterogeneous system and management method of hardware resources thereof
CN101150439A (en) A method, system and device for realizing master/slave switching
CN101483540A (en) Master-slave switching method in high class data communication equipment
CN104468521A (en) Online migration method, device and system
JP6179101B2 (en) Management device, management method, and management program
CN101605051B (en) Method and device for realizing changeover between main and standby services on control panels
CN111585835B (en) Control method and device for out-of-band management system and storage medium
US20090303874A1 (en) Transmission network, transmission apparatus, channel switching method and program for transmission network
JP2008015803A (en) Blade type computer management system
US20140129865A1 (en) System controller, power control method, and electronic system
CN101616025B (en) Method for determining active-standby of services on control panel and a device
KR20150104435A (en) Method of performing transition of operation mode for a routing processor
KR100297555B1 (en) Channel resource management method of base station using dynamic function in the mobile communication system
CN114124803B (en) Device management method and device, electronic device and storage medium
CN111510336B (en) Network equipment state management method and device
CN116466613A (en) Execution method of control instruction, controlled equipment, station server and execution device
CN106330542B (en) Access method, control device, system and equipment of remote backup switch
CN101557306A (en) Electronic device and method for setting working modes of line cards thereof
EP3018931B1 (en) Method and system for establishing a self-organized mobile core in a cellular communication network
CN111314272A (en) Task processing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Patentee after: Xinhua three Technology Co., Ltd.

Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base

Patentee before: Huasan Communication Technology Co., Ltd.

CP03 Change of name, title or address