CN111082974B - Service recovery method and device and electronic equipment - Google Patents

Service recovery method and device and electronic equipment Download PDF

Info

Publication number
CN111082974B
CN111082974B CN201911193658.8A CN201911193658A CN111082974B CN 111082974 B CN111082974 B CN 111082974B CN 201911193658 A CN201911193658 A CN 201911193658A CN 111082974 B CN111082974 B CN 111082974B
Authority
CN
China
Prior art keywords
interface
protocol
delay
service
service interface
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
CN201911193658.8A
Other languages
Chinese (zh)
Other versions
CN111082974A (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 Hefei Branch
Original Assignee
New H3C Technologies Co Ltd Hefei Branch
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 New H3C Technologies Co Ltd Hefei Branch filed Critical New H3C Technologies Co Ltd Hefei Branch
Priority to CN201911193658.8A priority Critical patent/CN111082974B/en
Publication of CN111082974A publication Critical patent/CN111082974A/en
Application granted granted Critical
Publication of CN111082974B publication Critical patent/CN111082974B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention provides a service recovery method, a service recovery device and electronic equipment. The method comprises the following steps: after restarting, acquiring protocol delays of the plurality of service interfaces, wherein the protocol delays are used for representing the time required for establishing a protocol associated with the service interface when the service interface is in an up state; sequentially restoring the plurality of service interfaces according to the sequence of the protocol delays from large to small; each time one of the traffic interfaces is restored, a protocol associated with the one traffic interface is established through the one traffic interface. The recovery sequence of each service interface can be reasonably set according to the protocol delay, so that the protocols associated with each interface are approximately established at the same time, and the service interruption time caused by restarting the equipment for recovering the service is effectively shortened.

Description

Service recovery method and device and electronic equipment
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a service recovery method, an apparatus, and an electronic device.
Background
In some application scenarios, the network device needs to be restarted due to practical requirements, such as upgrading the system version. After restarting, each service interface in the network device is in a down (closed) state, and needs to be restored to an up (open) state again, and a network protocol associated with the service interface is established through each service interface so as to execute corresponding service processing.
In order to shorten the service interruption time caused by restarting the network device, in the related art, before the network device is restarted, the service traffic loaded on the network device may be switched to other network devices, and after the network device is restarted, the service traffic may be switched to the network device again.
However, in the process of recovering the interfaces and establishing the associated network protocols, after a network protocol is established, the service traffic corresponding to the network protocol is switched to the network device, and if the network protocol associated to all the service interfaces of the network device is not completed at this time, the service interfaces cannot perform subsequent receiving and sending of data packets under the processing of the incomplete network protocol, so that the network device cannot perform corresponding service processing, and service interruption occurs for a certain time.
Disclosure of Invention
An object of the embodiments of the present invention is to provide a method and an apparatus for recovering a service, and an electronic device, so as to shorten a duration of service interruption caused by restarting the device for recovering the service. The specific technical scheme is as follows:
in a first aspect of the present invention, a method for recovering a service is provided, where the method includes:
after restarting, acquiring protocol delays of the plurality of service interfaces, wherein the protocol delays are used for representing the time required for establishing a protocol associated with the service interface when the service interface is in an up state;
sequentially restoring the plurality of service interfaces according to the sequence of the protocol delays from large to small;
each time one of the traffic interfaces is restored, a protocol associated with the one traffic interface is established through the one traffic interface.
In one possible implementation, the method further includes:
before restarting, recording the moment when one service interface enters the up state as the moment when the service interface enters the up state;
before restarting, recording the moment when one protocol is established as the protocol establishing moment when the one protocol is established;
the obtaining of the protocol delays of the plurality of service interfaces includes:
and aiming at each service interface, acquiring the difference value between the protocol establishment time of the protocol associated with the service interface and the interface up time of the service interface as the protocol delay of the service interface.
In a possible implementation manner, the sequentially recovering the plurality of service interfaces according to the sequence of the protocol delays from large to small includes:
for each service interface, configuring the recovery delay of the service interface according to the protocol delay of the service interface, wherein the recovery delay is negatively related to the protocol delay;
and restoring one service interface each time the restoration delay of the service interface arrives.
In a possible implementation manner, the configuring, according to the protocol delay of the service interface, a recovery delay of the service interface includes:
and configuring the difference value between the preset upper limit delay and the protocol delay of the service interface as the recovery delay of the service interface.
In a possible implementation manner, the configuring the recovery delay of the service interface according to the protocol delay of the service interface includes
And configuring a difference value obtained by subtracting the protocol delay and the processing delay of the service interface from a preset upper limit delay as the recovery delay of the service interface, wherein the processing delay is used for representing the difference value between the time for configuring the service interface and the time for configuring the first recovery delay.
In one possible implementation, the network device further includes a cross device aggregation interface and a MAD detection interface; the method further comprises the following steps: and when the preset upper limit delay is reached, recovering the cross-device aggregation interface and the MAD detection interface.
In a second aspect of the present invention, there is provided a traffic restoration apparatus, comprising:
a protocol time obtaining module, configured to obtain protocol delays of the multiple service interfaces after restart, where the protocol delays are used to indicate time required for establishing a protocol associated with the service interface when the service interface is in an up state;
the interface recovery module is used for sequentially recovering the plurality of service interfaces according to the sequence of the protocol delay from large to small;
and the protocol establishing module is used for establishing a protocol associated with one service interface through the one service interface every time the one service interface is recovered.
In a possible implementation manner, the apparatus further includes a time recording module, configured to record, before restarting, a time when one service interface enters the up state as an interface up time when the one service interface enters the up state;
before restarting, recording the moment when one protocol is established as the protocol establishing moment when the one protocol is established;
the protocol time obtaining module is specifically configured to obtain, for each service interface, a difference between a protocol establishment time of a protocol associated with the service interface and an interface up time of the service interface, and use the difference as a protocol delay of the service interface.
In a possible implementation manner, the interface recovery module is specifically configured to configure, for each service interface, a recovery delay of the service interface according to the protocol delay of the service interface, where the recovery delay is negatively related to the protocol delay;
and restoring one service interface each time the restoration delay of the service interface arrives.
In a possible implementation manner, the interface recovery module is specifically configured to configure a difference between a preset upper limit delay and the protocol delay of the service interface as a recovery delay of the service interface.
In a possible implementation manner, the interface recovery module is specifically configured to configure a difference obtained by subtracting the protocol delay and the processing delay of the service interface from a preset upper limit delay as the recovery delay of the service interface, where the processing delay is used to indicate a difference between a time for configuring the service interface and a time for configuring a first recovery delay.
In one possible implementation, the network device further includes a cross device aggregation interface and a MAD detection interface;
the interface recovery module is further configured to recover the inter-device aggregation interface and the MAD detection interface when the preset upper limit delay is reached.
In a third aspect of the present invention, there is provided an electronic device comprising:
a memory for storing a computer program;
a processor adapted to perform the method steps of any of the above first aspects when executing a program stored in the memory.
In a fourth aspect of the present invention, a computer-readable storage medium is provided, having stored therein a computer program which, when executed by a processor, performs the method steps of any of the above-mentioned first aspects.
The service recovery method, the device and the electronic equipment provided by the embodiment of the invention can reasonably set the recovery sequence of each service interface according to the protocol delay, so that the protocols associated with each interface are approximately established at the same time, and the service interruption time caused by restarting the equipment for recovering the service is effectively shortened. Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a principle of an ISSU method in the case of version incompatibility according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a service recovery method according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a service interface recovery method according to an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating a principle of an ISSU method in a case where a version of smooth service recovery provided by an embodiment of the present invention is incompatible;
fig. 5 is a schematic structural diagram of a service recovery apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
To more clearly describe the service recovery method provided by the embodiment of the present invention, a possible application scenario will be described below:
in some application scenarios, a plurality of network devices may be aggregated by an IRF (Intelligent Resilient Framework) technology to form an IRF system, in which one of the network devices is configured in a Master (Master) state (hereinafter, the network device in the Master state is referred to as a Master frame device), and the other network devices are configured in a Slave (Slave) state (hereinafter, the network device in the Slave state is referred to as a Slave frame device). The main frame device and the standby frame device are respectively used for executing respective service processing. When the version of the network device In the IRF system needs to be upgraded, the upgrade can be performed by using an ISSU (In-Service Software upgrade) method. If the upgraded version is not compatible with the version before upgrading, the network device needs to be restarted in the upgrading process.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating a principle of an ISSU method under a condition that versions provided by an embodiment of the present invention are incompatible, and for convenience of description, an IRF system including one main frame device and one standby frame device will be described below as an example. The method can comprise the following steps:
and S101, restarting the original frame equipment to update the version of the original frame equipment.
And switching the service processing executed by the original main frame equipment to the service processing executed by the original standby frame equipment. For example, assuming that the original frame device is used to execute the service process a and the service process B, and the original main frame device executes the service process C and the service process D, the original main frame device may be controlled not to execute the service process a and the service process B, and the original main frame device is controlled to replace the original frame device to execute the service process a and the service process B.
The handover process causes service interruption, but the duration of the handover process is often short, and therefore the impact is small.
And S102, after the original frame equipment is restarted, the service of the original frame equipment is recovered.
The original frame equipment can be controlled to gradually restore the service interfaces in the down state to the up state, and a related network protocol is constructed through the service interfaces, so that the original frame equipment can execute corresponding service processing. In the service recovery process, after each protocol is established, the service processing corresponding to the protocol is switched to be executed by the original frame equipment again, and because the time spent for completing the establishment of the protocol associated with each interface of the original frame equipment is different, when the establishment of other protocols except the protocol which is finally established is completed, the protocol which is not completed is existed, and at this time, the original frame equipment cannot execute the corresponding service processing, and the service interruption is generated.
And S103, after the original main frame device is restarted, restarting the original main frame device to update the version of the original main frame device, and configuring the original main frame device as a new main frame device in the IRF system.
And switching the service processing executed by the original main frame equipment to the original standby frame equipment. If the original frame device is still in service recovery, the original frame device may not be able to execute the corresponding service processing, and therefore, the service processing executed by the original main frame device is switched to be executed by the original frame device, which may cause service interruption. The handover process causes service interruption, but the duration of the handover process is often short, and therefore the impact is small.
And S104, after the original main frame equipment is restarted and the service is recovered, adding the original main frame equipment into the IRF system as new standby frame equipment.
After the original main frame device is added to the IRF system as a new standby frame device, part of the service processing performed by the new main frame device may be switched to be performed by the new standby frame device, so as to share the service pressure of the new main frame device by the new standby frame device. The handover process causes service interruption, but the duration of the handover process is often short, and therefore the impact is small.
As analyzed above, the duration of service interruption due to handover during ISSU is often short. And the service interruption time length caused by the service recovery after the restart of the original frame equipment may be longer. Therefore, if the service interruption time caused by restarting the original frame equipment for recovering the service can be effectively shortened, the service interruption time in the ISSU process can be effectively reduced, so that the service execution in the ISSU process is smoother.
In view of this, an embodiment of the present invention provides a service recovery method, which may be applied to any network device having a service recovery function, where the network device has multiple service interfaces, and it may be understood that service recovery of a backup frame device in the ISSU process is only one possible application example of the service recovery method provided in the embodiment of the present invention.
Referring to fig. 2, fig. 2 is a schematic flow chart of a service recovery method according to an embodiment of the present invention, where the schematic flow chart may include:
s201, after restarting, obtaining the protocol delay of a plurality of service interfaces.
The protocol delay is used for representing the time required for establishing the protocol associated with the service interface when the service interface is in the up state. For example, assuming that the service interface a is associated with the protocol 1, and it takes 10ms to establish the protocol 1 when the service interface a is in the up state, the protocol delay of the service interface a may be 10 ms.
If the service interface a is associated with a plurality of protocols, the protocol delay of the service interface may refer to a maximum value of time required for respectively establishing each protocol in the plurality of protocols when the service interface a is in the up state. For example, assuming that the service interface a is associated with the protocol 1, the protocol 2, and the protocol 3, when the service interface a is in the up state, it takes 10ms to establish the protocol 1, 15ms to establish the protocol 2, and 20ms to establish the protocol 3, and the protocol delay of the service interface a may be 20 ms.
In a possible embodiment, before restarting, each time one service interface of the network device enters the up state, the time when the one service interface enters the up state is recorded as the interface up time. When one protocol is established, the time when the one protocol is established is recorded as the protocol establishment time. Then, for each service interface, the difference between the protocol establishment time of the protocol associated with the service interface and the interface up time of the service interface may be obtained as the protocol delay of the service interface. For example, assuming that when t is 20ms, the service interface a enters the up state from the down state, and the interface up time of the service interface a is recorded to be 20 ms. Assuming that the protocol 1 is established when t is 40ms, the protocol establishment time of the recording protocol 1 is 40 ms.
If service interface a is associated and only protocol 1 is associated, the protocol delay for acquiring service interface a is 20 ms. If the service interface A is associated with a plurality of protocols, the difference value between the protocol establishment time of each protocol associated with the service interface A and the interface up time of the service interface A can be obtained, and the obtained maximum difference value is used as the protocol delay of the service interface A. For example, assuming that the service interface a is associated with the protocol 1 and the protocol 2, and the protocol establishment time t of the protocol 2 is 60ms, the protocol latency for acquiring the service interface a is 40 ms.
The recording may be recording in a storage medium local to the network device, or may be transmitting information to the other device by the network device, so that the other device records in the storage medium of the other device. The form of the record may be a form of a table, or may be another form other than a table, which is not limited in this embodiment.
And S202, sequentially recovering a plurality of service interfaces according to the sequence of the protocol delays from large to small.
And recovering the service interface means recovering the service interface from the down state to the up state. And after restarting, the service interface in the network equipment is in a down state. Exemplary, suppose
S203, each time one service interface is recovered, a protocol associated with the one service interface is established through the one service interface.
After the establishment of the protocols associated with all the service interfaces is completed, the network device can execute corresponding service processing, i.e. complete service recovery. Therefore, the time required for the network device to complete service restoration is equal to the time required for starting service restoration until all protocol establishments associated with all service interfaces are completed.
For a service interface in a down state, a protocol associated with the service interface can be established through the service interface only by restoring the service interface to an up state. Therefore, for a traffic interface in the down state, it takes two phases of time to establish a protocol associated with the traffic interface. The first stage time is the time required for restoring the service interface from the down state to the up state, and the second stage time is the time required for establishing a protocol associated with the service interface when the service interface is in the up state, namely the protocol delay.
For convenience of description, assume that the first phase time of the i-th recovered traffic interface is denoted as FiAnd one has N service interfaces, and the N service interfaces are recovered in sequence according to a certain sequence. The first-stage time of the first-recovered service interface is less than the first-stage time of the later-recovered service interface. Considering that in some possible application scenarios, multiple traffic interfaces may also be recovered simultaneously (in other possible application scenarios, different traffic interfaces may also be recovered at different times), the sequence { F }1,…,FNIs an increasing sequence. Then, assuming that the protocol time delay of the service interface at the kth bit is S when the service interfaces are sequenced according to the sequence of the protocol time from big to smallkAnd the service interface is the c _ k recovered service interface, the time required for establishing the protocol associated with the interface is Fc_k+Sk. Thus, for the protocols associated with the various interfaces of the network device, the time required to complete the established protocol first is { F }c_1+S1,…,Fc_N+SNThe minimum value of, i.e., min { F }c_1+S1,…,Fc_N+SNThe time required for finally establishing the established protocol is { F }c_1+S1,…,Fc_N+SNMaximum value of, i.e., max { F }c_1+S1,…,Fc_N+SN}。
Propositions can be demonstrated by the nature of the inequality: max { F when c _ k ═ k is satisfied for any kc_1+S1,…,Fc_N+SNThe value of min is smallest, and min { F }c_1+S1,…,Fc_N+SNThe value of is maximal. Below only for max { F }c_1+S1,…,Fc_N+SNMin { F } is proved by minimum valuec_1+S1,…,Fc_N+SNThe proof of the largest value can be obtained in the same way, and the proof process can be as follows:
for the case of N-2, if c _ 1-2 and c _ 2-1, then Fc_1+S1=F2+S1,Fc_2+S2=F1+S2Due to { F1,…,FNIs an increasing sequence, so F1≤F2. Due to { S1,…,SNIs a decreasing sequence, so S2≤S1. Thus max { F }c_1+S1,Fc_2+S2}=F2+S1. If c _1 is equal to 1 and c _2 is equal to 2, Fc_1+S1=F1+S1,Fc_2+S2=F2+S2Due to F1≤F2Thus F1+S1≤F2+S1. Due to S2≤S1Thus F2+S2≤F2+S1. Thus, compared to c _1 being 2, c _2 being 1, c _1 being 1, c _2 being 2, max { F { (F) }c_1+S1,Fc_2+S2The values of are smaller (or equal). That is, the above conclusion is established
Assuming that the above conclusion holds for N ═ x, max { F for N ═ x +1c_1+S1,…,Fc_N+SNCan be rewritten as max { F }c_1+S1,…,Fc_N-1+SN-1},Fc_N+SN}. If c _ (x +1) ≠ x +1, then there is a range of values [1, x ≠ X +]Is turning toInteger z, satisfying c _ z ═ x +1, since { F ═ F1,…,FNIs an increasing sequence, and S1,…,SNIs a decreasing sequence, so that Fx+1+Sz>Fc_N+Sx+1Available max { F }c_1+S1,…,Fc_N+SN}=max{Fc_1+S1,…,Fc_N-1+SN-1Max { F } since the above conclusion holds when N ═ xc_1+S1,…,Fc_N-1+SN-1The minimum value of is max { F }1+S1,…,Fc_(x+1)-1+Sc_(x+1)-1,Fc_(x+1)+1+Sc_(x+1),…,Fx+1+Sx}。
If c _ (x +1) ═ x +1, then since { S }1,…,SNIs a decreasing sequence, so that Fx+1+Sx>Fx+1+Sx+1I.e. Fx+1+Sx+1≤max{F1+S1,…,Fc_(x+1)-1+Sc_(x+1)-1,Fc_(x+1)+1+Sc_(x+1),…,Fx+1+Sx}. And since the above conclusion holds when N ═ x, max { F {, is truec_1+S1,…,Fc_N-1+SN-1The minimum value of is max { F }1+S1,…,Fx+SxDue to { F }1,…,FNIs an increasing sequence, so { F }1+S1,…,Fx+SxEach element in the element is not larger than { F }1+S1,…,Fc_(x+1)-1+Sc_(x+1)-1,Fc_(x+1)+1+Sc_(x+1),…,Fx+1+SxAre cis-identical elements, so max { F }1+S1,…,Fx+Sx}≤max{F1+S1,…,Fc_(x+1)-1+Sc_(x+1)-1,Fc_(x+1)+1+Sc_(x+1),…,Fx+1+Sx}. In summary, max { F) } when c _ (x +1) ≠ x +1, as compared to when c _ (x +1) ≠ x +1c_1+S1,…,Fc_N+SNEnergy is enoughSmaller values can be taken. That is, in the case where N is x +1, the proposition described above holds.
The induction method can prove that the proposition is true for any value of N. Since the above conclusion is established, it can be seen that when a plurality of service interfaces are sequentially restored in the order of the protocol delays from large to small, the time difference between the protocol that is established first and the protocol that is established last can be minimized. Namely, the embodiment is adopted, and the recovery sequence of each service interface can be reasonably set according to the protocol delay, so that the protocols associated with each interface are approximately established at the same time, and the service interruption time caused by restarting the equipment for recovering the service is effectively shortened.
The restoration of the traffic interface will be described in detail below. Referring to fig. 3, fig. 3 is a schematic flow chart of a service interface recovery method according to an embodiment of the present invention, where the method includes:
s301, aiming at each service interface, configuring the recovery delay of the service interface according to the protocol delay of the service interface.
The recovery delay is inversely related to the protocol delay, i.e. if the protocol delay is larger, the recovery delay is smaller, and if the protocol delay is smaller, the recovery delay is larger, without considering the influence of other factors except the protocol delay.
In one possible embodiment, the difference between the preset upper limit delay and the protocol delay may be used as the recovery delay of the service interface, that is, the recovery delay is equal to the preset upper limit delay — the protocol delay. The preset upper limit delay can be set according to actual requirements or user experience. By adopting the embodiment, the establishment of the protocols associated with the service interfaces can be further completed at the same time, so that the service recovery speed can be further improved.
In another possible embodiment, a difference obtained by subtracting the protocol delay and the processing delay of the service interface from the preset upper limit delay may be configured as a recovery delay of the service interface, that is, the recovery delay is equal to a preset upper limit threshold-protocol delay-processing delay. The processing delay is used to indicate a difference between a time for configuring the service interface and a time for configuring the first recovery delay, and may be a timestamp recorded at a current time when the service interface is configured, where the processing delay is a timestamp when the current service interface is configured — a timestamp when the service interface is configured for the first time. It can be understood that it may take a certain time to configure one service interface, and with this embodiment, the time spent configuring the service interface may be considered when the configuration is resumed, so as to further reduce the time difference between the completion of the establishment of the protocol associated with each service interface, thereby further effectively shortening the time duration of service interruption caused by the service resumption.
S302, each time the recovery delay of one service interface arrives, the service interface is recovered.
An aging timer may be maintained for each traffic interface, the aging timer configured such that the aging timer ages when the recovery delay for the traffic interface arrives. Every time an aging timer ages, the traffic interface for which the aging timer is intended is restored.
For example, assuming that the recovery delay of the traffic interface a is 10ms, an aging timer may be maintained, and the aging timer may age when the duration reaches 10 ms. When the aging timer ages, service interface a is restored.
Referring to fig. 4, fig. 4 is a schematic diagram illustrating an ISSU method in a case where a version of smooth service restoration provided by an embodiment of the present invention is incompatible, where the schematic diagram may include:
s401, the ISSU pre-upgrading module initializes an interface delay table.
The ISSU pre-upgrade module may be integrated in the original equipment frame or the original main frame, or may be independent from the original equipment frame and the original main frame, which is not limited in this embodiment. The interface delay table is used to record the interface-protocol delay.
S402, the former frame device reports the ISSU pre-upgrade module when the interface up and the protocol are established.
The original frame equipment may report interface up information of one service interface to the ISSU pre-upgrade module when the service interface enters an up state after the IRF system is started, and report protocol setup information of one protocol to the ISSU pre-upgrade module when the one protocol is setup.
And S403, the ISSU pre-upgrading module constructs an interface delay table according to the information reported by the original frame equipment.
The ISSU pre-upgrade module may record one interface in the interface delay table every time it receives one interface up message. When protocol establishing information of one protocol is received, an interface associated with the protocol is searched in an interface delay table, and the protocol delay corresponding to the interface are updated in the interface delay table.
For example, the interface latency table for initialization assuming null (null) is as follows:
interface Protocol Protocol delay
When the ISSU pre-upgrade module receives the interface up information of the interface a when t is 20ms, the interface a is recorded in the interface delay table, and the interface delay table may be as follows:
interface Protocol Protocol delay
Interface A
And if the ISSU pre-upgrade module receives the protocol establishment information of the protocol 1 when t is 40ms, and if the protocol 1 is associated with the interface A, finding the interface A in the interface delay table, and updating the protocol and the protocol delay corresponding to the interface A. Since the time difference between the receipt of the interface up information of the interface a and the receipt of the protocol setup information of the protocol 1 is 20ms, the updated interface delay table may be as follows:
interface Protocol Protocol delay
Interface A Protocol 1 20ms
And if the ISSU pre-upgrade module receives the protocol establishment information of the protocol 2 when t is 60ms, and if the protocol 2 is associated with the interface A, finding the interface A in the interface delay table, and updating the protocol and the protocol delay corresponding to the interface A. Since the time difference between the receipt of the interface up information of the interface a and the receipt of the protocol setup information of the protocol 1 is 40ms, the updated interface delay table may be as follows:
interface Protocol Protocol delay
Interface A Protocol 1, protocol 2 40ms
S404, restarting the original frame device to update the version of the original frame device.
And switching the service processing executed by the original main frame equipment to the service processing executed by the original standby frame equipment.
S405, the ISSU pre-upgrading module writes the interface delay table into the original frame equipment.
The ISSU pre-upgrading module can write the interface delay table into the original frame device in the form of a temporary file.
S406, the original frame device reads the interface delay table to obtain the protocol delay of each service interface.
S407, the original frame equipment establishes an interface recovery table.
The interface recovery table is used to record < interface-recovery delay >. For determining the recovery delay of the service interface, reference may be made to the related description in the foregoing S301, and details are not described herein again. The original frame device may further include other interfaces besides the service interface, and the interfaces included in the other interfaces may be different according to different application scenarios. For example, the raw box device may further include a cross-device aggregation interface and a MAD (Multi-Active Detection) Detection interface. The original equipment frame device may include one type of interface among the cross-equipment aggregation interface and the MAD detection interface, or may include both the cross-equipment aggregation interface and the MAD detection interface, and the recovery delay of the included cross-equipment aggregation interface and the MAD detection interface may be configured to be 0, that is, when the preset upper limit delay arrives, the cross-equipment aggregation interface and/or the MAD detection interface are recovered (if the original equipment frame device includes both the cross-equipment aggregation interface and the MAD detection interface, when the preset upper limit delay arrives, the cross-equipment aggregation interface and the MAD detection interface are recovered).
It is understood that only one main frame device can exist in the IRF system in order to maintain the stability of the IRF system. After the original spare frame device is upgraded and restarted, the original spare frame device is used as a new main frame device, and the original main frame device is not upgraded and restarted at this time, so that if the MAD detection interface or the cross-device aggregation interface is recovered, a situation of a double-main frame device occurs, the original main frame device needs to be down, and the service processing executed by the original main frame device needs to be switched to be executed by the new main frame device. If the MAD detection interface or the cross-device aggregation interface is restored before the preset upper limit delay is reached, the original frame device may not complete the establishment of all protocols, and therefore cannot execute corresponding service processing, at this time, the original main frame device is down, and the service processing executed by the original main frame device is switched to be executed by a new main frame device, which may generate service interruption. Therefore, the embodiment can effectively shorten the service interruption time length caused by that the original standby frame device does not finish the service recovery when the original main frame device is restarted, namely, the service interruption time length caused by that the original standby frame device is restarted for recovering the service can be further shortened.
And S408, the original frame equipment restores the interface according to the interface restoring table.
And S409, restarting the original main frame device to update the version of the original main frame device when the preset upper limit delay is reached, and configuring the original standby frame device as a new main frame device in the IRF system.
And switching the service processing executed by the original main frame equipment to the new main frame equipment.
And S410, after the original main frame equipment is restarted and the service is recovered, adding the original main frame equipment into the IRF system as new standby frame equipment.
At which point the ISSU completes.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a service restoration apparatus according to an embodiment of the present invention, where the schematic structural diagram may include:
a protocol time obtaining module 501, configured to obtain protocol delays of a plurality of service interfaces after restarting, where the protocol delays are used to indicate time required for establishing a protocol associated with the service interface when the service interface is in an up state;
an interface recovery module 502, configured to sequentially recover a plurality of service interfaces according to a sequence of protocol delays from large to small;
a protocol establishing module 503, configured to establish a protocol associated with one service interface through the one service interface each time the one service interface is recovered.
In a possible implementation manner, the apparatus further includes a time recording module, configured to record, before restart, a time when one service interface enters the up state as an interface up time when the service interface enters the up state;
before restarting, recording the moment when one protocol is established as the protocol establishing moment when the one protocol is established;
the protocol time obtaining module 501 is specifically configured to obtain, for each service interface, a difference between a protocol establishment time of a protocol associated with the service interface and an interface up time of the service interface, as a protocol delay of the service interface.
In a possible implementation manner, the interface recovery module 502 is specifically configured to configure, for each service interface, a recovery delay of the service interface according to a protocol delay of the service interface, where the recovery delay is negatively related to the protocol delay;
and restoring one service interface each time the restoration delay of the service interface arrives.
In a possible implementation manner, the interface recovery module 502 is specifically configured to configure a difference between a preset upper limit delay and a protocol delay of the service interface as a recovery delay of the service interface.
In a possible implementation manner, the interface recovery module 502 is specifically configured to configure a difference obtained by subtracting a protocol delay and a processing delay of the service interface from a preset upper limit delay as a recovery delay of the service interface, where the processing delay is used to indicate a difference between a time for configuring the service interface and a time for configuring a first recovery delay.
In one possible implementation, the network device further includes a cross device aggregation interface;
and the interface recovery module is also used for recovering the cross-device aggregation interface when the preset upper limit delay is reached.
In one possible implementation, the network device further includes a cross-device aggregation interface and a MAD detection interface;
and the interface recovery module is further used for recovering the cross-device aggregation interface and the MAD detection interface when the preset upper limit delay is reached.
An embodiment of the present invention further provides an electronic device, as shown in fig. 6, including:
a memory 601 for storing a computer program;
the processor 602 is configured to implement the following steps when executing the program stored in the memory 601:
after restarting, acquiring protocol delays of a plurality of service interfaces, wherein the protocol delays are used for expressing the time required for establishing a protocol associated with the service interfaces when the service interfaces are in an up state;
according to the sequence of protocol delay from large to small, restoring a plurality of service interfaces in sequence;
each time one of the traffic interfaces is restored, a protocol associated with the one traffic interface is established through the one traffic interface.
In one possible implementation, the method further includes:
before restarting, recording the moment when one service interface enters the up state as the moment when the service interface enters the up state;
before restarting, recording the moment when one protocol is established as the protocol establishing moment when the one protocol is established;
acquiring protocol delays of a plurality of service interfaces, comprising:
and aiming at each service interface, acquiring the difference value between the protocol establishment time of the protocol associated with the service interface and the interface up time of the service interface as the protocol delay of the service interface.
In a possible implementation manner, sequentially recovering a plurality of service interfaces according to a sequence of protocol delays from large to small includes:
for each service interface, configuring the recovery delay of the service interface according to the protocol delay of the service interface, wherein the recovery delay is negatively related to the protocol delay;
and restoring one service interface each time the restoration delay of the service interface arrives.
In a possible implementation manner, configuring the recovery delay of the service interface according to the protocol delay of the service interface includes:
and configuring the difference value between the preset upper limit delay and the protocol delay of the service interface as the recovery delay of the service interface.
In one possible implementation, configuring the recovery delay of the service interface according to the protocol delay of the service interface includes
And the difference value obtained by subtracting the protocol delay and the processing delay of the service interface from the preset upper limit delay is configured as the recovery delay of the service interface, and the processing delay is used for representing the difference value between the time for configuring the service interface and the time for configuring the first recovery delay.
In one possible implementation, the network device further includes a cross-device aggregation interface and a MAD detection interface; and when the preset upper limit delay is reached, restoring the cross-device aggregation interface and the MAD detection interface.
The Memory mentioned in the above electronic device may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In another embodiment provided by the present invention, a computer-readable storage medium is further provided, which stores instructions that, when executed on a computer, cause the computer to execute any of the service restoration methods in the above embodiments.
In a further embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the traffic restoration methods of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, the electronic device, the computer-readable storage medium, and the computer program product embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (12)

1. A method for recovering services, applied to a network device, wherein the network device includes a plurality of service interfaces, the method comprising:
after restarting, acquiring protocol delays of the plurality of service interfaces, wherein the protocol delays are used for representing the time required for establishing a protocol associated with the service interface when the service interface is in an up state;
sequentially restoring the plurality of service interfaces according to the sequence of the protocol delays from large to small;
each time one of the traffic interfaces is restored, a protocol associated with the one traffic interface is established through the one traffic interface.
2. The method of claim 1, further comprising:
before restarting, recording the moment when one service interface enters the up state as the moment when the service interface enters the up state;
before restarting, recording the moment when one protocol is established as the protocol establishing moment when the one protocol is established;
the obtaining of the protocol delays of the plurality of service interfaces includes:
and aiming at each service interface, acquiring the difference value between the protocol establishment time of the protocol associated with the service interface and the interface up time of the service interface as the protocol delay of the service interface.
3. The method according to claim 1, wherein said sequentially recovering said plurality of service interfaces in an order from large to small of said protocol delay comprises:
for each service interface, configuring the recovery delay of the service interface according to the protocol delay of the service interface, wherein the recovery delay is negatively related to the protocol delay;
and restoring one service interface each time the restoration delay of the service interface arrives.
4. The method of claim 3, wherein configuring the recovery delay of the service interface according to the protocol delay of the service interface comprises:
and configuring the difference value between the preset upper limit delay and the protocol delay of the service interface as the recovery delay of the service interface.
5. The method of claim 3, wherein configuring the recovery delay of the traffic interface according to the protocol delay of the traffic interface comprises
And configuring a difference value obtained by subtracting the protocol delay and the processing delay of the service interface from a preset upper limit delay as the recovery delay of the service interface, wherein the processing delay is used for representing the difference value between the time for configuring the service interface and the time for configuring the first recovery delay.
6. The method of claim 4 or 5, wherein the network device further comprises a cross device aggregation interface, MAD detection interface;
the method further comprises the following steps:
when the preset upper limit delay is reached, recovering the cross-device aggregation interface; and restoring the MAD detection interface.
7. A service restoration apparatus, applied to a network device, wherein the network device includes a plurality of service interfaces, the apparatus comprising:
a protocol time obtaining module, configured to obtain protocol delays of the multiple service interfaces after restart, where the protocol delays are used to indicate time required for establishing a protocol associated with the service interface when the service interface is in an up state;
the interface recovery module is used for sequentially recovering the plurality of service interfaces according to the sequence of the protocol delay from large to small;
and the protocol establishing module is used for establishing a protocol associated with one service interface through the one service interface every time the one service interface is recovered.
8. The apparatus according to claim 7, wherein the apparatus further comprises a time recording module, configured to record, before restarting, a time when one service interface enters the up state as an interface up time each time the one service interface enters the up state;
before restarting, recording the moment when one protocol is established as the protocol establishing moment when the one protocol is established;
the protocol time obtaining module is specifically configured to obtain, for each service interface, a difference between a protocol establishment time of a protocol associated with the service interface and an interface up time of the service interface, and use the difference as a protocol delay of the service interface.
9. The apparatus according to claim 7, wherein the interface recovery module is specifically configured to configure, for each service interface, a recovery delay of the service interface according to the protocol delay of the service interface, where the recovery delay is inversely related to the protocol delay;
and restoring one service interface each time the restoration delay of the service interface arrives.
10. The apparatus according to claim 9, wherein the interface recovery module is specifically configured to configure a difference between a preset upper-limit delay and the protocol delay of the service interface as a recovery delay of the service interface.
11. The apparatus according to claim 9, wherein the interface recovery module is specifically configured to configure a difference obtained by subtracting the protocol delay and the processing delay of the service interface from a preset upper-limit delay as the recovery delay of the service interface, where the processing delay is used to represent a difference between a time for configuring the service interface and a time for configuring a first recovery delay.
12. The apparatus of claim 10 or 11, wherein the network device further comprises a cross device aggregation interface and a MAD detection interface;
the interface recovery module is further configured to recover the inter-device aggregation interface and recover the MAD detection interface when the preset upper limit delay is reached.
CN201911193658.8A 2019-11-28 2019-11-28 Service recovery method and device and electronic equipment Active CN111082974B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911193658.8A CN111082974B (en) 2019-11-28 2019-11-28 Service recovery method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911193658.8A CN111082974B (en) 2019-11-28 2019-11-28 Service recovery method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111082974A CN111082974A (en) 2020-04-28
CN111082974B true CN111082974B (en) 2022-03-22

Family

ID=70312545

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911193658.8A Active CN111082974B (en) 2019-11-28 2019-11-28 Service recovery method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111082974B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1740982A (en) * 2004-08-24 2006-03-01 微软公司 Generating an optimized database restore plan
CN102882704A (en) * 2012-09-03 2013-01-16 杭州华三通信技术有限公司 Link protection method and apparatus in soft restart upgrade process of ISSU (in-service software upgrade)
CN106330780A (en) * 2015-06-24 2017-01-11 联想企业解决方案(新加坡)有限公司 Switch, apparatus and method for forming aggregated link
US10079725B1 (en) * 2015-04-01 2018-09-18 Cisco Technology, Inc. Route map policies for network switches
CN109800031A (en) * 2019-01-18 2019-05-24 广州虎牙信息科技有限公司 Service control method, server, terminal and device based on mobile office system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1740982A (en) * 2004-08-24 2006-03-01 微软公司 Generating an optimized database restore plan
CN102882704A (en) * 2012-09-03 2013-01-16 杭州华三通信技术有限公司 Link protection method and apparatus in soft restart upgrade process of ISSU (in-service software upgrade)
US10079725B1 (en) * 2015-04-01 2018-09-18 Cisco Technology, Inc. Route map policies for network switches
CN106330780A (en) * 2015-06-24 2017-01-11 联想企业解决方案(新加坡)有限公司 Switch, apparatus and method for forming aggregated link
CN109800031A (en) * 2019-01-18 2019-05-24 广州虎牙信息科技有限公司 Service control method, server, terminal and device based on mobile office system

Also Published As

Publication number Publication date
CN111082974A (en) 2020-04-28

Similar Documents

Publication Publication Date Title
WO2019223469A1 (en) Block chain network management method, device, medium and electronic device
CN105426439B (en) Metadata processing method and device
US11531535B2 (en) Firmware upgrade method and apparatus, and terminal
US9367301B1 (en) Dynamic update of a distributed message processing system
CN105487980B (en) The method and device that repairing applications are operating abnormally
US7814064B2 (en) Dynamic distributed consensus algorithm
RU2653254C1 (en) Method, node and system for managing data for database cluster
US11093335B2 (en) Data replication method, apparatus, and system
WO2015157904A1 (en) File synchronization method, server, and terminal
US8174966B2 (en) Switching program, switching method and duplex system
CN109617950B (en) Data updating method, device, equipment and readable storage medium
CN111082974B (en) Service recovery method and device and electronic equipment
CN107547285B (en) Configuration information storage method and device
CN111078418B (en) Operation synchronization method, device, electronic equipment and computer readable storage medium
CN104104701A (en) Online service configuration updating method and system
CN112069152A (en) Database cluster upgrading method, device, equipment and storage medium
WO2018010603A1 (en) Storage mode upgrade method, apparatus and system based on video cloud storage system
CN110928727A (en) Method for rapidly restoring factory settings of operating system
CN110955460A (en) Service process starting method and device, electronic equipment and storage medium
CN112711466B (en) Hanging affair inspection method and device, electronic equipment and storage medium
CN113032021B (en) System switching and data processing method, device, equipment and storage medium thereof
US10972343B2 (en) System and method for device configuration update
US20160320974A1 (en) System, method, and apparatus for updating data in a distributed storage system
CN111400404A (en) Node initialization method, device, equipment and storage medium
CN107153699B (en) Method and device for dynamically expanding cluster server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant