CN108804129B - Software upgrading method and device - Google Patents

Software upgrading method and device Download PDF

Info

Publication number
CN108804129B
CN108804129B CN201810556569.4A CN201810556569A CN108804129B CN 108804129 B CN108804129 B CN 108804129B CN 201810556569 A CN201810556569 A CN 201810556569A CN 108804129 B CN108804129 B CN 108804129B
Authority
CN
China
Prior art keywords
target
type container
configuration
container
application
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
CN201810556569.4A
Other languages
Chinese (zh)
Other versions
CN108804129A (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
New 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 New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201810556569.4A priority Critical patent/CN108804129B/en
Publication of CN108804129A publication Critical patent/CN108804129A/en
Application granted granted Critical
Publication of CN108804129B publication Critical patent/CN108804129B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/656Updates while running

Abstract

The invention provides a software upgrading method and a device, wherein the method comprises the following steps: receiving an uninterrupted software upgrade instruction for a target application in a target first type container; creating a target second type container corresponding to the target first type container, and controlling the target first type container and the target second type container to carry out configuration and state data synchronization; and when the configuration and state data synchronization is determined to be completed, controlling the target first type container to be switched to a standby state and controlling the target second type container to be switched to an active state. The embodiment of the invention can improve the reliability and maintainability of the network equipment.

Description

Software upgrading method and device
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a software upgrading method and apparatus.
Background
In networks of key service use scenarios such as operators and data centers, network equipment is required to have extremely high service uninterrupted capacity and high reliability.
At present, the software complexity of network equipment is higher and higher, and software needs to be upgraded in operation and maintenance to solve software bug (bug) and add new functions. The software upgrade process often results in service outages, which cause experience degradation and direct economic loss to operators and data center infrastructure providers, as well as end users.
The ISSU (In Service Software Upgrade) technology is a key means for upgrading Software online and ensuring continuous Service.
At present, when network equipment carries out software upgrading through an ISSU technology, in the software upgrading process, a forwarding plane of the network equipment is kept unchanged, but a control plane needs to be restarted, and the restarting process is fastest and is also in the order of minutes, so that the control plane is unavailable for a long time, and further business oscillation can be caused.
Disclosure of Invention
The invention provides a software upgrading method and device, which aim to solve the problem that a control plane is unavailable for a long time when network equipment carries out software upgrading through an ISSU technology.
According to a first aspect of embodiments of the present invention, there is provided a software upgrading method applied to a network device, where at least one first type container is built on the network device, and the first type container is used for service operation, the method including:
receiving an uninterrupted software upgrade instruction for a target application in a target first type container;
creating a target second type container corresponding to the target first type container, and controlling the target first type container and the target second type container to carry out configuration and state data synchronization; the target second type container and the target first type container run the same application, the software version of the target application running in the target second type container is an upgraded version, the initial state of the target second type container is a standby state, and the container in the standby state does not perform forwarding layer control;
and when the configuration and state data synchronization is determined to be completed, controlling the target first type container to be switched to a standby state and controlling the target second type container to be switched to an active state.
According to a second aspect of the embodiments of the present invention, there is provided a software upgrading apparatus, applied to a network device, where at least one first type container is built on the network device, and the first type container is used for service operation, the apparatus including:
a receiving unit for receiving uninterrupted software upgrade instructions for a target application in a target first type container;
a creating unit for creating a target second type container corresponding to the target first type container; the target second type container and the target first type container run the same application, the software version of the target application running in the target second type container is an upgraded version, the initial state of the target second type container is a standby state, and the container in the standby state does not perform forwarding layer control;
the control unit is used for controlling the target first type container and the target second type container to carry out configuration and state data synchronization;
the control unit is further configured to control the target first type container to be switched to a standby state and the target second type container to be switched to an active state when it is determined that the configuration and the state data are synchronized.
According to a third aspect of embodiments of the present invention, there is provided a software upgrading apparatus comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to perform the software upgrading method described above.
According to a fourth aspect of embodiments of the present invention, there is provided a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to perform the software upgrade method described above.
By applying the embodiment of the invention, the business process is loaded into the container, when the application in the container needs to be upgraded by ISSU, creating a container which has the same application as the container running and the software version of the application is the standby state of the upgraded version, and controls the container to perform configuration and state data synchronization with its corresponding container in a standby state, furthermore, when the configuration and state data are synchronized, the control layer management channel switching is carried out by controlling the container and the corresponding container in the standby state, the control of the forwarding layer is carried out by replacing the container by the container in the standby state, compared with the unavailable time of minute level in the control level in the existing ISSU process, the unavailable time of the control level of the software upgrading scheme provided by the embodiment of the invention is reduced to millisecond level, thereby avoiding service shock caused by long-time unavailable control level and improving the reliability and maintainability of network equipment.
Drawings
Fig. 1 is a schematic flowchart of a software upgrading method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an application scenario provided by an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a software upgrading method according to an embodiment of the present invention;
FIGS. 4A-4D are schematic diagrams of software upgrade implementations provided by embodiments of the present invention;
fig. 5 is a schematic structural diagram of a software upgrading apparatus provided in an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of another software upgrading device provided by the embodiment of the invention;
FIG. 7 is a schematic structural diagram of another software upgrading device provided by the embodiment of the invention;
fig. 8 is a schematic diagram of a hardware structure of a software upgrading apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions in the embodiments of the present invention better understood and make the above objects, features and advantages of the embodiments of the present invention more comprehensible, the technical solutions in the embodiments of the present invention are described in further detail below with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a software upgrading method provided in an embodiment of the present invention is schematically shown, where the software upgrading method may be applied to a network device, and the network device is built with at least one container (referred to as a first type container, and may also be referred to as a service container) for service operation, as shown in fig. 1, the software upgrading method may include the following steps:
step 101, receiving an uninterrupted software upgrade instruction for a target application of a target first type container.
In the embodiment of the present invention, the target first-type container does not refer to a fixed container, but may refer to any first-type container of at least one first-type container built on the network device.
Similarly, the target application is not specific to a fixed application, but may refer to any application running in the target first type container, and the embodiments of the present invention will not be repeated in the following.
In the embodiment of the invention, in order to avoid service interruption of the network equipment, when the network equipment needs software upgrading, the software upgrading can be carried out by an uninterrupted software upgrading (namely ISSU) technology.
Accordingly, when software upgrade needs to be performed on the target application in the target first-type container, an uninterrupted software upgrade instruction (hereinafter, referred to as an ISSU upgrade instruction) for the target application in the target first-type container may be issued to the network device.
And 102, creating a target second type container corresponding to the target first type container, and controlling the target first type container and the target second type container to perform configuration and state data synchronization.
In the embodiment of the present invention, in order to improve the reliability of the network device, when the network device determines that the application of the first type container needs to be upgraded, the network device may not upgrade the application in the first type container, but directly create a container (referred to as a second type container) that has the same application as the first type container and runs with the upgraded software version, and after the first type container and the second type container complete configuration and state data synchronization, control the first type container and the second type container to perform control layer management channel switching, and replace the first type container with the second type container to perform forwarding layer control, and the unavailable time of the control plane is greatly reduced while the upgrade of the parts is realized.
Accordingly, in the embodiment of the present invention, when the network device receives an ISSU upgrade instruction for a target application in a target first type container, the network device may create a second type container (referred to herein as a target second type container) corresponding to the target first type container; the target second type container and the target first type container run the same application, and the software version of the target application running in the target second type container is an upgraded version (the upgraded version of the target application can be carried in the ISSU upgrade instruction).
The initial state of the target second-type container is a standby (standby) state, and the container in the standby state does not perform forwarding plane control, that is, the target first-type container in an Active (Active) state still performs forwarding plane control at this time.
In the embodiment of the present invention, after the network device creates the target second type container, the network device may control the target first type container and the target second type container to perform configuration and state data synchronization, so as to ensure that the same application in the target first type container and the target second type container has the same configuration and state data.
And 103, when the configuration and state data synchronization is determined to be completed, controlling the target first type container to be switched to a standby state, and controlling the target second type container to be switched to an active state.
In the embodiment of the present invention, when the network device determines that the target first type container and the target second type container complete configuration and state data synchronization, the network device may control the target first type container and the target second type container to perform control layer management channel switching, that is, control the target first type container to be switched to a standby state (from an active state to a standby state), and control the target second type container to be switched to an active state (from the standby state to the active state), that is, control the target second type container to replace the target first type container to perform forwarding plane control.
The target second type container and the target first type container have the same configuration and state data, so that the normal operation of the service is not influenced after the target second type container and the target first type container complete state switching, and in addition, the software upgrading can be realized without performing a special software upgrading process in the target first type container or the target second type container because the application after the software version upgrading is operated in the target second type container.
It can be seen that, in the method flow shown in fig. 1, when the target application in the target first-type container needs to be upgraded by the ISSU, the target second-type container running the same application and having the software version of the application as the version after the software upgrade is created, and after the configuration and the state data synchronization of the target first-type container and the target second-type container are completed, the target first-type container and the target second-type container are controlled to perform state switching, before the switching, the target first-type container performs forwarding plane control, and after the switching, the target second-type container performs forwarding plane control, that is, in the software upgrade process, only in the state switching process (millisecond level), the situation that the control plane is unavailable is not available is realized, while the software upgrade is realized, the time that the control plane is unavailable is greatly reduced, and the reliability and maintainability of the network device are improved.
Further, in the embodiment of the present invention, it is considered that when there is a lot of configuration and status data in the target first type container, a change of the configuration and status data may occur in the process of performing configuration and status data synchronization on the target first type container and the target second type container, and at this time, the changed configuration and status data needs to be synchronized again, that is, the configuration and status data synchronization may be implemented in a full-synchronization + incremental synchronization manner.
Accordingly, in an embodiment of the present invention, the creating a target second type container corresponding to the target first type container, and controlling the target first type container and the target second type container to perform configuration and state data synchronization may include:
sending a first message to a target first type container, wherein the first message is used for informing the target first type container to store the configuration and state data of a first moment in a designated storage space; the first moment is the moment when the target first-type container receives the first message;
creating a target second type container so that the target second type container acquires configuration and state data at a first moment from a specified storage space;
when a second message sent by a target second type container is received, sending the incremental configuration and the state data of the target first type container to the target second type container; and the second message is sent by the target second container when the configuration and state data at the first moment are acquired, the incremental configuration and state data are the configuration and state data change from the first moment to the second moment, and the second moment is the moment when the second message is received.
In this embodiment, when the network device receives an ISSU upgrade instruction, the network device may, on the one hand, send a first message to the target first type container; when the target first-type container receives the first message, configuration and status data at a first time (i.e., the time the first message was received), which may be referred to as full configuration and status data, may be stored to a designated storage space.
On the other hand, the network device may create a target second-type container; after the target second-type container is started, the configuration and state data of the target first-type container at the first moment can be acquired from the specified storage space.
When the target second-type container acquires the configuration and state data of the target first-type container at the first time (i.e., full configuration and state data synchronization after completion), a second message may be sent to the network device.
In this embodiment, in consideration that the configuration and status data in the target first-type container may be changed during the full configuration and status data synchronization, the network device may also monitor the configuration and status data of the target first-type container and record the configuration and status data of the target first-type container when sending the first message to the target first-type container.
When the network device receives a second message sent by the target second-type container, the network device may further send a configuration and status data change (which may be referred to as incremental configuration and status data herein) of the target first-type container between the first time and the second time (i.e., the time when the second message is received) to the target second-type container through a third message; when the target second-type container receives the third message, the local configuration and state data can be updated according to the change of the configuration and state data carried in the third message.
Because the general data volume of the incremental configuration and the state data is smaller, the synchronization time of the incremental configuration and the state data is also short, and in the process, the probability that the configuration and the state data change again in the target first-type container is very low, and further, the synchronization of the configuration and the state data of the target first-type container and the target second-type container can be ensured in the full synchronization and incremental synchronization mode.
Further, in this embodiment, when it is considered that the network device performs incremental configuration and state data synchronization on the target second-type container, an event (referred to as a target event herein) that can cause a change in configuration and state data may exist in the target first-type container when the application is processing the event, and at this time, when the incremental synchronization is performed, it cannot be guaranteed that all configuration and state data changes corresponding to the application are synchronized to the target second-type container.
Accordingly, in an implementation manner of this embodiment, the sending, to the target second-type container, the incremental configuration and the status data of the target first-type container when receiving the second message sent by the target second-type container may include:
when a second message sent by the target second type container is received, determining whether a first application which is processing the target event exists in the target first type container;
if so, sending incremental configuration and state data corresponding to a second application which is not processing the target event to the target second type container;
when the first application finishes the processing of the target event, sending the incremental configuration and the state data corresponding to the first application to a target second type; the incremental configuration and state data corresponding to the first application is the configuration and state data change between the first time and the third time corresponding to the first application, and the third time is the time when the first application finishes the target event processing.
In this embodiment, when the network device receives the second message, the network device may determine whether an application (referred to herein as a first application) that is handling the target event is present in the target first-type container; if the incremental configuration and the status data corresponding to the first application are not synchronized, the network device may synchronize the incremental configuration and the status data corresponding to the application (referred to as a second application herein) that is not processing the target event (i.e., the configuration and the status data change between the first time and the second time corresponding to the second application) to the target second type container.
When the first application completes the target event processing, the network device may synchronize the incremental configuration and the state data corresponding to the first application (the configuration and state data change between the first time and the third time (the time when the first application completes the target event processing) corresponding to the first application) to the target second type container.
Further, considering that after the incremental configuration and the state data corresponding to the second application are synchronized, and before the incremental configuration and the state data corresponding to the first application are synchronized, the second application may also start to process the target event, at this time, the network device may simulate the target event occurring after the second time in the target first type container in the target second type container, that is, when the network device detects that the target event occurs in the second application (after the second time) in the target first type container, simulate the target event in the target second type container, so as to ensure consistency of the configuration and the state data corresponding to the second application in the target first type container and the target second type container.
When the target second-type container is in the standby state, the application in the target second-type container does not perform an action such as a decision or configuration on hardware when processing the target event, that is, does not control the forwarding plane.
Further, in the embodiment of the present invention, in order to save system resources, after the target first type container is switched to the standby state, the network device may perform resource recovery on the target first type container, that is, notify the target first type container to exit, and release the resources.
In order to enable those skilled in the art to better understand the technical solution provided by the embodiment of the present invention, the technical solution provided by the embodiment of the present invention is described below with reference to a specific application scenario.
Referring to fig. 2, which is a schematic diagram of an application scenario provided in the embodiment of the present invention, as shown in fig. 2, a service container 210 is built on a network device 200, where applications APP1, APP2, and APP3 run in the service container 210.
It should be noted that, in this embodiment, when the network device 200 operates normally, the service container 210 is in an Active state; wherein, the service container in Active state can control the forwarding layer.
Based on the application scenario shown in fig. 2, the software upgrading scheme provided by the embodiment of the present invention is implemented as follows:
in this embodiment, assuming that the APP1 needs to be upgraded with software (the software version is upgraded from version a to version b), the network device 200 performs software upgrade on the APP1 through ISSU (abbreviated as ISSU upgrade), and a software upgrade implementation flow thereof is shown in fig. 3, and may include the following steps:
step 301, the network device 200 receives an ISSU upgrade instruction for the APP1, and starts the ISSU management module 201.
In this embodiment, when the APP1 on the network device 200 needs to be upgraded by an ISSU, an ISSU upgrade instruction for the APP1 may be issued to the network device 200.
When the network device 200 receives an ISSU upgrade instruction for the APP1, the ISSU management module 201 may be started, and the ISSU management module 201 may be used to take charge of management of the entire ISSU process, container state tracking, notification of related process events, and the like.
Step 302, the ISSU management module 201 sends a message M100 to the service container 210, where the message M100 is used to notify the service container 210 to start the ISSU process.
In this embodiment, it is assumed that the ISSU management module 201 sends the message M100 to the traffic container 210 at the same time as the traffic container 210 receives the message M100 (assumed to be T1).
Step 303, the service container 210 acquires the configuration and state data at time T1, and stores the acquired configuration and state data in the storage unit 220.
In this embodiment, when receiving the message M100 sent by the ISSU management module 201, the service container 210 may obtain the configuration and state Data at the time T1, and store the obtained configuration and state Data (referred to as Data _ T1 herein) in the storage unit 220 (process P100), which may be as shown in fig. 4A.
For example, assuming that the APP1 is an OSPF (Open Shortest Path First) management unit and the network device has 100 routes at time T1, the service container 210 may store the 100 routes to the storage unit.
Step 304, the ISSU management module 201 creates a service container 230, and the service container 230 runs with applications APP1, APP2 and APP 3; the service container 230 is in a standby state, and the software version of the APP1 in the service container 230 is version b.
In this embodiment, after the ISSU management module 201 is started, on one hand, the service container 210 may be notified according to the above step 302 to store the configuration and state data at the time T1 to the storage unit 220; on the other hand, the ISSU management module 201 may start another service container (service container 230), where the service container 230 and the service container 210 run the same application (all running APP1, APP2, and APP3), and the difference therebetween is that the application running in the service container 210 is a version before software upgrade, and the application running in the service container 230 is a version after software upgrade, that is, in this embodiment, the software version of APP1 in the service container 210 is version a, and the software version of APP1 in the service container 230 is version b.
When the service container 230 is created, it is in a standby state (the service container in the standby state does not perform forwarding plane control).
Step 305, the traffic container 230 reads Data _ T1 from the storage unit 220.
In this embodiment, after the service container 230 is started, the configuration and status Data (i.e., Data _ T1) of the service container 210 at time T1 can be read from the storage unit 220 (process P200), so that the service container 230 can have the full configuration and status of the service container 210 at time T1, and the schematic diagram can be as shown in fig. 4B.
After the service container 230 completes the Data _ T1 reading, a message M200 may be sent to the ISSU management module 201, where the message M200 is used to notify the ISSU management module 201 that the Data _ T1 reading is completed.
It is assumed that the transmission of message M200 by service container 230 to ISSU management module 201 is at the same time (assumed to be time T2) as the reception of message M200 by ISSU management module 201.
Step 306, the ISSU management module 201 synchronizes the configuration and status data change of the service container 210 from time T1 to time T2 to the service container 230 through message M300.
In this embodiment, after the ISSU management module 201 sends the message M100 to the traffic container 210, the configuration and status Data of the traffic container 210 may be monitored (process P300), and changes in the configuration and status Data of the traffic container 210 are recorded (referred to herein as Data _ T1-T2).
When the ISSU management module 201 receives the message M200 sent by the service container 230, the ISSU management module 201 may send a message M300 to the service container 230, where the message M300 carries Data _ T1-T2.
For example, still taking the OSPF routing protocol as an example, assuming that APP1 is an OSPF management unit, from time T1 to time T2, the network device issues 3 new routes and cancels 5 routes, at this time, the change of these 8 routes is recorded by ISSU management module 201 and is synchronized to service container 230 through message M300 at time T2, and its schematic diagram may be as shown in fig. 4C.
Step 307, the service container 230 performs configuration and status Data update according to the Data _ T1-T2 carried in the received message M300.
At this point, the service container 230 has all the configuration and state data for the service container 210 at time T2.
It should be noted that, in this embodiment, if any one of the steps 301 to 307 is abnormal, the software upgrade may be terminated, and the service container 210 continues to perform forwarding plane control.
Step 308, the service container 230 sends a message M400 to the ISSU management module 201, where the message M400 is used to notify the ISSU management module 201 of completing configuration and status data update.
Step 309, the ISSU management module 201 sends a message M500 to the service container 210, where the message M500 is used to notify the service container 210 to perform control layer management channel switching.
In this embodiment, when the service container 230 completes the configuration and status data update, a message M400 may be sent to the ISSU management module 201 to notify the ISSU management module 201 that the configuration and status data update is completed.
When receiving the message M400, the ISSU management module 201 may send a message M500 to the service container 210 to notify the service container 210 to perform control layer management channel switching.
When receiving the message M500, the service container 210 switches its Active state to the Standby state, and notifies the service container 230 to switch the Standby state to the Active state, thereby completing control layer management channel switching (process P400), which may be shown in fig. 4D.
So far, the software version of APP1 in service container 230 is upgraded to version b by version a, and in this process, the forwarding plane normally works all the time, and the control plane only stops working in the control layer management channel switching process (this process is ms level (about 50ms), and service oscillation cannot be caused), thereby ensuring the service stability when APP1 performs ISSU upgrade, and further improving the reliability and maintainability of network equipment.
It should be noted that, in this embodiment, if, in step 306, when the ISSU management module 201 receives the message M200 (i.e., at time T2), the ISSU management module 201 monitors that there is an event (i.e., a target event) in the service container 210, where the event may cause a change to the configuration and state data corresponding to the application, in the process of processing the event, the ISSU management module 201 may not synchronize the change to the configuration and state data of the part of the application.
For example, assuming that the ISSU management module 201 monitors that the APP2 is processing the target event at time T2 in step 306, the ISSU management module 201 may synchronize the configuration and state data changes from time T1 to time T2 corresponding to the APPs 1 and 3 to the service container 230 (through message M300), and synchronize the configuration and state data changes corresponding to the APP2 from time T1 to time T3 to the service container 230 (through message M300) when the APP2 completes processing the target event (assuming time T3).
Considering that, during the time period from T2 to T3, the APP1 or/and APP3 may also have a change in configuration and state data, during the time period from T2 to T3, for a target event (such as traffic or/and configuration information) that may cause the change in configuration and state data of APP1 or/and APP3, the ISSU management module 201 may perform simulation in the service container 230.
For example, during the time T2 to the time T3, traffic sent to APP3 in the traffic container 210 may duplicate a copy of APP3 sent to the traffic container 230 to ensure that the configuration and state data of APP3 in the traffic container 210 and the traffic container 230 are consistent.
It should be noted that, in the embodiment of the present application, the application in the service container in the Standby state does not perform actions such as decision or configuration on hardware, that is, does not control the forwarding plane.
Further, in this embodiment, in order to improve the resource utilization, after the control layer management channel is switched, the ISSU management module 201 may notify the service container 210 to exit and release the resource.
As can be seen from the above description, in the technical solution provided in the embodiment of the present invention, by loading a service process into a container, when an application in the container needs to perform an ISSU upgrade, creating a container in a standby state in which the same application runs as the container and the software version of the application is an upgraded version, and controlling the container and a container in a standby state corresponding to the container to perform configuration and state data synchronization, and further, when the configuration and state data synchronization is completed, controlling the container and the container in the standby state corresponding to the container to perform control layer management channel switching, and controlling a forwarding layer by using the container in the standby state instead of the container, compared with an unavailable time at a minute level that occurs in a control layer in an existing ISSU process, a time at which the control layer is unavailable is reduced to a millisecond level, thereby avoiding service oscillation caused by long-time unavailability of the control layer, the reliability and maintainability of the network equipment are improved.
Referring to fig. 5, a schematic structural diagram of a software upgrading apparatus according to an embodiment of the present invention is provided, where the software upgrading apparatus may be applied to a network device in the foregoing method embodiment, and as shown in fig. 5, the software upgrading apparatus may include:
a receiving unit 510 for receiving uninterrupted software upgrade instructions for a target application in a target first type container;
a creating unit 520 for creating a target second type container corresponding to the target first type container; the target second type container and the target first type container run the same application, the software version of the target application running in the target second type container is an upgraded version, the initial state of the target second type container is a standby state, and the container in the standby state does not perform forwarding layer control;
a control unit 530 for controlling the target first type container and the target second type container to perform configuration and status data synchronization;
the control unit 530 is further configured to control the target first type container to switch to the standby state and the target second type container to switch to the active state when it is determined that the configuration and status data synchronization is completed.
In an optional embodiment, the control unit 530 is specifically configured to send a first message to the target first type container, where the first message is used to notify the target first type container to store the configuration and state data at the first time in the specified storage space; the first moment is the moment when the target first-type container receives the first message;
a creating unit 520, specifically configured to create a target second-type container, so that the target second-type container obtains configuration and state data at a first time from a specified storage space;
the control unit 530 is further specifically configured to send, when the receiving unit 510 receives the second message sent by the target second type container, the incremental configuration and status data of the target first type container to the target second type container; and the second message is sent by the target second container when the configuration and state data at the first moment are acquired, the incremental configuration and state data are the configuration and state data change from the first moment to the second moment, and the second moment is the moment when the second message is received.
Referring to fig. 6, a schematic structural diagram of another software upgrading apparatus according to an embodiment of the present invention is shown in fig. 6, where, on the basis of the software upgrading apparatus shown in fig. 5, the software upgrading apparatus shown in fig. 6 further includes:
a determining unit 540, configured to determine whether a first application that is processing the target event exists in the target first-type container when the receiving unit 510 receives the second message sent by the target second-type container; wherein the target events include events that can cause changes to configuration and status data;
a control unit 530, configured to send, to the target second-type container, incremental configuration and state data corresponding to a second application that is not processing the target event if the incremental configuration and state data exist;
the control unit 530 is further specifically configured to send, to the target second type, incremental configuration and state data corresponding to the first application when the first application completes target event processing; the incremental configuration and state data corresponding to the first application is the configuration and state data change between the first time and the third time corresponding to the first application, and the third time is the time when the first application finishes the target event processing.
In an optional embodiment, the control unit 530 is further configured to, after sending the incremental configuration and status data corresponding to the second application to the target second type container, before sending the incremental configuration and status data corresponding to the first application to the target second type container, simulate a target event in the target second type container when it is detected that the second application exists in the target first type container and the target event occurs.
Referring to fig. 7 together, a schematic structural diagram of another software upgrading apparatus according to an embodiment of the present invention is shown in fig. 7, where, on the basis of the software upgrading apparatus shown in fig. 5, the software upgrading apparatus shown in fig. 7 further includes:
a resource recycling unit 550, configured to recycle resources of the target first-type container after the control unit 530 controls the target first-type container to be switched to the standby state and the target second-type container to be switched to the active state.
Please refer to fig. 8, which is a schematic diagram of a hardware structure of a software upgrading apparatus according to an embodiment of the present invention. The software upgrade apparatus includes at least a processor 801, a machine-readable storage medium 802 storing machine-executable instructions. The processor 801 and the machine-readable storage medium 802 may communicate via a system bus 803. Also, the processor 801 may perform the software upgrade methods described above by reading and executing machine executable instructions in the machine readable storage medium 802 corresponding to the software upgrade logic.
The machine-readable storage medium 802 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
Embodiments of the present invention also provide a machine-readable storage medium, such as machine-readable storage medium 802 in fig. 8, comprising machine-executable instructions that are executable by processor 801 in a software upgrade apparatus to implement the software upgrade methods described above.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement it without inventive effort.
As can be seen from the above embodiments, by loading the business processes into the container, when an application in the container needs to perform an ISSU upgrade, creating a container which has the same application as the container running and the software version of the application is the standby state of the upgraded version, and controls the container to perform configuration and state data synchronization with its corresponding container in a standby state, furthermore, when the configuration and state data are synchronized, the control layer management channel switching is carried out by controlling the container and the corresponding container in the standby state, the control of the forwarding layer is carried out by replacing the container by the container in the standby state, compared with the unavailable time of minute level in the control level in the existing ISSU process, the unavailable time of the control level of the software upgrading scheme provided by the embodiment of the invention is reduced to millisecond level, thereby avoiding service shock caused by long-time unavailable control level and improving the reliability and maintainability of network equipment.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (12)

1. A software upgrading method is applied to network equipment, at least one first type container is built on the network equipment, and the first type container is used for service operation, and the method is characterized by comprising the following steps:
receiving an uninterrupted software upgrading instruction aiming at a target application in a target first type container, wherein an upgraded version of the target application is carried in the uninterrupted software upgrading instruction;
creating a target second type container corresponding to the target first type container, and controlling the target first type container and the target second type container to carry out configuration and state data synchronization; the target second type container and the target first type container run the same application, the software version of the target application running in the target second type container is an upgraded version carried by the uninterrupted software upgrading instruction, the initial state of the target second type container is a standby state, and the container in the standby state does not perform forwarding level control;
and when the configuration and state data synchronization is determined to be completed, controlling the target first type container to be switched to a standby state, controlling the target second type container to be switched to an active state, and controlling the forwarding layer by the container in the active state.
2. The method of claim 1, wherein the creating a target second type container corresponding to the target first type container and controlling the target first type container to perform configuration and state data synchronization with the target second type container comprises:
sending a first message to the target first type container, wherein the first message is used for informing the target first type container to store the configuration and state data of a first moment in a designated storage space; wherein the first time is a time when the first message is received by the target first-type container;
creating a target second type container so that the target second type container acquires the configuration and state data of the first moment from the specified storage space;
when a second message sent by the target second type container is received, sending the incremental configuration and the state data of the target first type container to the target second type container; the second message is sent by the target second container when the configuration and state data at the first time are acquired, the incremental configuration and state data is the configuration and state data change from the first time to a second time, and the second time is the time when the second message is received.
3. The method of claim 2, wherein sending incremental configuration and status data for the target first type container to the target second type container upon receiving a second message sent by the target second type container comprises:
when a second message sent by the target second type container is received, determining whether a first application which is processing a target event exists in the target first type container; wherein the target events include events that can cause changes to configuration and status data;
if so, sending incremental configuration and state data corresponding to a second application which is not processing the target event to the target second type container;
when the first application finishes target event processing, sending incremental configuration and state data corresponding to the first application to the target second type; the incremental configuration and state data corresponding to the first application is the configuration and state data change between the first time and a third time corresponding to the first application, and the third time is the time when the first application completes target event processing.
4. The method of claim 3, wherein after sending the incremental configuration and status data corresponding to the second application to the target second type container and before sending the incremental configuration and status data corresponding to the first application to the target second type container, further comprising:
and when detecting that a second application occurrence target event exists in the target first type container, simulating the target event in the target second type container.
5. The method of claim 1, wherein after controlling the target first-type container to switch to a standby state and the target second-type container to switch to an active state, further comprising:
and performing resource recovery on the target first type container.
6. A software upgrading device is applied to network equipment, at least one first type container is built on the network equipment, and the first type container is used for service operation, and the device is characterized by comprising:
the receiving unit is used for receiving an uninterrupted software upgrading instruction aiming at a target application in a target first type container, and an upgraded version of the target application is carried in the uninterrupted software upgrading instruction;
a creating unit for creating a target second type container corresponding to the target first type container; the target second type container and the target first type container run the same application, the software version of the target application running in the target second type container is an upgraded version carried by the uninterrupted software upgrading instruction, the initial state of the target second type container is a standby state, and the container in the standby state does not perform forwarding level control;
the control unit is used for controlling the target first type container and the target second type container to carry out configuration and state data synchronization;
the control unit is further configured to control the target first type container to be switched to a standby state and the target second type container to be switched to an active state when it is determined that the configuration and the state data are completed synchronously, and the container in the active state performs forwarding level control.
7. The apparatus of claim 6,
the control unit is specifically configured to send a first message to the target first-type container, where the first message is used to notify the target first-type container to store configuration and state data of a first time in a specified storage space; wherein the first time is a time when the first message is received by the target first-type container;
the creating unit is specifically configured to create a target second-type container, so that the target second-type container obtains the configuration and state data at the first time from the specified storage space;
the control unit is further specifically configured to send, to the target second-type container, incremental configuration and status data of the target first-type container when the receiving unit receives a second message sent by the target second-type container; the second message is sent by the target second container when the configuration and state data at the first time are acquired, the incremental configuration and state data is the configuration and state data change from the first time to a second time, and the second time is the time when the second message is received.
8. The apparatus of claim 7, further comprising:
a determining unit, configured to determine whether a first application that is processing a target event exists in the target first-type container when the receiving unit receives a second message sent by the target second-type container; wherein the target events include events that can cause changes to configuration and status data;
the control unit is specifically configured to send, to the target second-type container, incremental configuration and state data corresponding to a second application that is not processing the target event if the incremental configuration and state data exist;
the control unit is further specifically configured to send, to the target second type, incremental configuration and state data corresponding to the first application when the first application completes target event processing; the incremental configuration and state data corresponding to the first application is the configuration and state data change between the first time and a third time corresponding to the first application, and the third time is the time when the first application completes target event processing.
9. The apparatus of claim 8,
the control unit is further configured to, after sending the incremental configuration and state data corresponding to the second application to the target second-type container and before sending the incremental configuration and state data corresponding to the first application to the target second-type container, simulate a target event in the target second-type container when it is detected that the target event occurs in the target first-type container in the second application.
10. The apparatus of claim 6, further comprising:
and the resource recovery unit is used for recovering the resources of the target first type container after the control unit controls the target first type container to be switched to the standby state and the target second type container to be switched to the active state.
11. A software upgrade apparatus, comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to perform the method of any one of claims 1 to 5.
12. A machine-readable storage medium having stored thereon machine-executable instructions which, when invoked and executed by a processor, cause the processor to perform the method of any of claims 1-5.
CN201810556569.4A 2018-05-31 2018-05-31 Software upgrading method and device Active CN108804129B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810556569.4A CN108804129B (en) 2018-05-31 2018-05-31 Software upgrading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810556569.4A CN108804129B (en) 2018-05-31 2018-05-31 Software upgrading method and device

Publications (2)

Publication Number Publication Date
CN108804129A CN108804129A (en) 2018-11-13
CN108804129B true CN108804129B (en) 2022-04-29

Family

ID=64090165

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810556569.4A Active CN108804129B (en) 2018-05-31 2018-05-31 Software upgrading method and device

Country Status (1)

Country Link
CN (1) CN108804129B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110928645B (en) * 2019-11-21 2023-01-24 网易(杭州)网络有限公司 Server maintenance method and device, storage medium, processor and electronic device
CN111666088A (en) * 2020-06-07 2020-09-15 中信银行股份有限公司 Pod replacement method and device, electronic equipment and computer-readable storage medium
CN113448609B (en) * 2021-08-30 2021-11-19 恒生电子股份有限公司 Container upgrading method, device, equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5873097A (en) * 1993-05-12 1999-02-16 Apple Computer, Inc. Update mechanism for computer storage container manager
US6904593B1 (en) * 2000-03-24 2005-06-07 Hewlett-Packard Development Company, L.P. Method of administering software components using asynchronous messaging in a multi-platform, multi-programming language environment
CN101102219A (en) * 2007-07-30 2008-01-09 华为技术有限公司 Software update system and software update method
CN101286867A (en) * 2007-05-29 2008-10-15 深圳市同洲电子股份有限公司 Software updating method and system of network equipment
CN101969384A (en) * 2010-10-11 2011-02-09 北京星网锐捷网络技术有限公司 Compatibility judging method, device and network equipment for switching between active and standby main control boards
US7957330B1 (en) * 2007-11-27 2011-06-07 Juniper Networks, Inc. Failsafe management of periodic communications during system upgrade for a network device
CN106406953A (en) * 2016-09-21 2017-02-15 郑州云海信息技术有限公司 A storage system software online upgrade method
CN106528224A (en) * 2016-11-03 2017-03-22 腾讯科技(深圳)有限公司 Content updating method and system for Docker container, and server
CN107577475A (en) * 2017-08-22 2018-01-12 清华大学 A kind of software package management method and system of data center's group system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9870219B1 (en) * 2016-07-06 2018-01-16 Cisco Technology, Inc. Mechanisms for performing switch upgrades using remote containers

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5873097A (en) * 1993-05-12 1999-02-16 Apple Computer, Inc. Update mechanism for computer storage container manager
US6904593B1 (en) * 2000-03-24 2005-06-07 Hewlett-Packard Development Company, L.P. Method of administering software components using asynchronous messaging in a multi-platform, multi-programming language environment
CN101286867A (en) * 2007-05-29 2008-10-15 深圳市同洲电子股份有限公司 Software updating method and system of network equipment
CN101102219A (en) * 2007-07-30 2008-01-09 华为技术有限公司 Software update system and software update method
US7957330B1 (en) * 2007-11-27 2011-06-07 Juniper Networks, Inc. Failsafe management of periodic communications during system upgrade for a network device
CN101969384A (en) * 2010-10-11 2011-02-09 北京星网锐捷网络技术有限公司 Compatibility judging method, device and network equipment for switching between active and standby main control boards
CN106406953A (en) * 2016-09-21 2017-02-15 郑州云海信息技术有限公司 A storage system software online upgrade method
CN106528224A (en) * 2016-11-03 2017-03-22 腾讯科技(深圳)有限公司 Content updating method and system for Docker container, and server
CN107577475A (en) * 2017-08-22 2018-01-12 清华大学 A kind of software package management method and system of data center's group system

Also Published As

Publication number Publication date
CN108804129A (en) 2018-11-13

Similar Documents

Publication Publication Date Title
US10509680B2 (en) Methods, systems and apparatus to perform a workflow in a software defined data center
CN102708018B (en) Method and system for exception handling, proxy equipment and control device
EP3234774B1 (en) Elasticity for highly availabile applications
CN108804129B (en) Software upgrading method and device
US10810096B2 (en) Deferred server recovery in computing systems
US11892922B2 (en) State management methods, methods for switching between master application server and backup application server, and electronic devices
US20060218545A1 (en) Server system and online software update method
CN114003349B (en) Virtual machine migration method and equipment
CN108984195B (en) Software upgrading method and device
CN105426213A (en) Software update method and system
CN104503861A (en) Abnormality handling method and system, agency device and control device
CN111342986B (en) Distributed node management method and device, distributed system and storage medium
CN110196749B (en) Virtual machine recovery method and device, storage medium and electronic device
CN112751693B (en) Data processing method and device of distributed storage system and electronic equipment
WO2017000586A1 (en) Method and device for upgrading virtual network element, and computer storage medium
CN114168261A (en) OpenStack-based high availability method and device for managing bare metal instances
CN108471364B (en) Exception handling method and device
US20220276890A1 (en) Software updating apparatus, software updating method, and program
CN111142921A (en) Software upgrading method and device
CN111083068A (en) Aggregation link convergence method, device and storage medium
CN113839801B (en) Method and device for switching operation state, main and standby management system and network system
CN111698116B (en) Resource release method, device, equipment and machine readable storage medium
WO2023198276A1 (en) Handling failure of an application instance
CN117648304A (en) Database switching method, device, terminal equipment and storage medium
CN117971393A (en) Method and device for executing jobs under single cluster in distributed scene

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