CN116996369B - Containerized management server, main and standby management method and device thereof, and storage medium - Google Patents

Containerized management server, main and standby management method and device thereof, and storage medium Download PDF

Info

Publication number
CN116996369B
CN116996369B CN202311247064.7A CN202311247064A CN116996369B CN 116996369 B CN116996369 B CN 116996369B CN 202311247064 A CN202311247064 A CN 202311247064A CN 116996369 B CN116996369 B CN 116996369B
Authority
CN
China
Prior art keywords
environment
standby
main
condition
state
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
CN202311247064.7A
Other languages
Chinese (zh)
Other versions
CN116996369A (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.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain Intelligent Technology 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 Suzhou Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Priority to CN202311247064.7A priority Critical patent/CN116996369B/en
Publication of CN116996369A publication Critical patent/CN116996369A/en
Application granted granted Critical
Publication of CN116996369B publication Critical patent/CN116996369B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Hardware Redundancy (AREA)

Abstract

The invention discloses a containerized management server, a main and standby management method, a main and standby management device and a storage medium thereof, which relate to the technical field of containerized deployment and are used for solving the problems that the existing main and standby disaster recovery scheme cannot be switched automatically and the unified access entrance configuration cost is high, and the method comprises the following steps: after the configuration of the main environment and the standby environment corresponding to the current access domain name is completed, detecting the respective survival conditions of the main environment and the standby environment; if the survival condition of the main environment is in a non-survival state and the survival condition of the standby environment is in a survival state, modifying the mapping network cooperative address corresponding to the current access domain name into the network cooperative address of the standby environment; modifying the starting condition of the main environment into a non-starting state, and modifying the starting condition of the standby environment into a starting state; the invention realizes unified access entrance by utilizing the domain name resolution function of the containerized management server, and reduces the budget of users; and by switching on the condition, the automatic fault switching of the active and standby environments is realized.

Description

Containerized management server, main and standby management method and device thereof, and storage medium
Technical Field
The present invention relates to the field of containerized deployment technologies, and in particular, to a containerized management server, and a primary and backup management method, an apparatus, and a storage medium thereof.
Background
In recent years, cloud computing has been completely integrated into life of people, and many APP (Application) software used by people are deployed in the cloud end. The cloud data is critical to enterprises and users, and once the data is damaged or lost, the data can have a great influence on the enterprises; on the other hand, the fault of the data center level continuously appears in the world, and various news such as fire, flood and earthquake continuously appear, so in order to prevent the data from losing, each cloud computing management manufacturer also provides a backup scheme of the cloud computing management manufacturer to cope with the risk of data loss.
At present, various existing primary and backup disaster recovery schemes still have some problems although the backup of data is realized: firstly, the main environment is down, the backup environment cannot be automatically restored and started, the switching is needed by manpower, the switching time is long, and the labor is consumed; secondly, after the main downtime is switched to the standby, or the IP (Internet Protocol, network protocol) address accessed by the client is changed, the experience is poor; or require clients to introduce third party GSLB (Global Server Load Balance, global load balancing) +dns (Domain Name System ) to access by domain name, which is also a little expense for small and medium enterprises. Therefore, how to realize the automatic switching of the faults of the active and standby environments and the unified access entrance, reduce the budget of users and improve the user experience is a problem which needs to be solved rapidly nowadays.
Disclosure of Invention
The invention aims to provide a main and standby management method and device of a containerized management server, the containerized management server and a computer readable storage medium, so as to realize automatic fault switching and unified access entry of a main and standby environment, reduce user budget and improve user experience.
In order to solve the above technical problems, the present invention provides a master/slave management method of a containerized management server, including:
after the configuration of the main environment and the standby environment corresponding to the current access domain name is completed, detecting the respective survival conditions of the main environment and the standby environment; the current access domain name is any preset access domain name, the main environment and the standby environment are both containerized environments, and the main label and the standby label of the main environment and the standby environment are respectively a main environment label and a standby environment label;
if the survival condition of the main environment is a non-survival state, and the survival condition of the standby environment is a survival state, modifying the mapping network protocol address corresponding to the current access domain name into the network protocol address of the standby environment;
modifying the starting condition of the main environment into an unactivated state, and modifying the starting condition of the standby environment into an activated state so as to provide environment resource operation service of the current access domain name by utilizing the standby environment; and the starting conditions of the main environment and the standby environment are different and are in starting states.
In some embodiments, the detecting survival of each of the primary environment and the backup environment includes:
detecting the survival condition of the disaster recovery environment of the opposite end by the current disaster recovery environment; the current disaster recovery environment is the main environment or the standby environment, and the opposite-end disaster recovery environment is the standby environment or the main environment opposite to the current disaster recovery environment.
In some embodiments, the detecting the survival condition of the disaster recovery environment at the opposite end by the current disaster recovery environment includes:
the current disaster recovery environment detects the survival condition of the disaster recovery environment of the opposite end according to a preset detection time interval.
In some embodiments, after detecting the survival condition of each of the primary environment and the backup environment, the method further includes:
and if the survival conditions of the main environment and the standby environment are both survival states, the starting condition of the main environment is starting state, and the starting condition of the standby environment is non-starting state, backing up the resource data in the main environment to the standby environment for storage.
In some embodiments, the backing up the resource data in the primary environment to the backup environment for storage includes:
and backing up the resource data in the main environment to the standby environment for storage according to the disaster-tolerant condition corresponding to the current access domain name.
In some embodiments, the backing up the resource data in the primary environment to the backup environment according to the disaster situation corresponding to the current access domain name for storage includes:
if the disaster-tolerant situation is in a main-standby unsynchronized state, backing up the resource data in the main environment to the standby environment for storage, and modifying the disaster-tolerant situation into a main-standby synchronized state;
and if the disaster recovery condition is the main-to-standby synchronous state, executing the step of detecting the survival condition of each of the main environment and the standby environment.
In some embodiments, the backing up the resource data in the primary environment to the backup environment for storage, and modifying the disaster-tolerant situation to a primary-to-backup synchronization state includes:
importing all resource data in the main environment into the standby environment, and configuring data increment synchronization from the main environment to the standby environment;
configuring a mapping network protocol address corresponding to the current access domain name as the network protocol address of the main environment;
and modifying the disaster-tolerant situation into a main-to-standby synchronous state.
In some embodiments, importing all resource data in the primary environment into the backup environment, and configuring data delta synchronization of the primary environment to the backup environment includes:
Using a database logic backup tool to export and import all resource data in the main environment into the backup environment;
and configuring data increment synchronization from the main environment to the standby environment by using a database increment synchronization tool.
In some embodiments, the modifying the mapping network coordination address corresponding to the current access domain name to the network coordination address of the backup environment includes:
if the disaster recovery condition is in a main-to-standby synchronous state, modifying a mapping network protocol address corresponding to the current access domain name into a network protocol address of the standby environment, and modifying the disaster recovery condition into a standby starting state;
and if the disaster recovery condition is a standby enabling state, executing the step of detecting the survival condition of each of the main environment and the standby environment.
In some embodiments, before modifying the mapped network address corresponding to the current access domain name to the network address of the backup environment, the method further includes:
judging whether the disaster-tolerant situation is in a main-to-standby synchronous state or not;
if the state is a main-to-standby synchronous state, executing the step of modifying the mapping network cooperative address corresponding to the current access domain name into the network cooperative address of the standby environment and modifying the disaster-tolerant situation into a standby starting state;
If the synchronous state is not from the main synchronous state to the standby synchronous state, judging whether the disaster-tolerant situation is in a standby starting state or not;
and if the active environment is in the standby enabling state, executing the step of detecting the survival condition of each of the main environment and the standby environment.
In some embodiments, after the determining whether the disaster-tolerant situation is in the ready-to-use state, the method further includes:
and if the disaster-tolerant condition is in a primary-standby unsynchronized state, outputting data alarm prompt information.
In some embodiments, the outputting the data alert cue information includes:
and sending data alarm prompt information to a preset mailbox through a network.
In some embodiments, the backing up the resource data in the primary environment to the backup environment for storage includes:
and the main environment backs up the stored resource data to the standby environment for storage.
In some embodiments, after detecting the survival condition of each of the primary environment and the backup environment, the method further includes:
if the survival conditions of the main environment and the standby environment are both survival states, the starting condition of the main environment is not started, and the starting condition of the standby environment is started, importing all resource data in the standby environment into the main environment, and configuring data increment synchronization from the main environment to the standby environment;
Configuring a mapping network protocol address corresponding to the current access domain name as the network protocol address of the main environment;
and modifying the starting condition of the main environment into a starting state, and modifying the starting condition of the standby environment into an unactivated state.
In some embodiments, the method further comprises:
obtaining a disaster recovery simulation instruction of a current access domain name;
and modifying the starting condition of the main environment into an unactivated state according to the disaster recovery simulation instruction, and modifying the starting condition of the standby environment into an activated state.
In some embodiments, the method further comprises: the configuration process of the main environment and the standby environment corresponding to the current access domain name;
the configuration process of the main environment and the standby environment corresponding to the current access domain name comprises the following steps:
obtaining a disaster recovery configuration instruction corresponding to a current access domain name; the disaster recovery configuration instruction comprises a current access domain name and a network coordination address of the main environment;
determining the containerized environment of the network co-address as the main environment according to the network co-address of the main environment;
configuring a containerized environment as the standby environment in other containerized management servers except for the containerized management server in which the main environment is located;
And configuring the mapping network cooperative address corresponding to the current access domain name as the network cooperative address of the main environment.
In some embodiments, the obtaining the disaster recovery configuration instruction corresponding to the current access domain name includes:
acquiring a disaster recovery configuration instruction triggered by a disaster recovery menu in a cloud platform interface corresponding to a current disaster recovery environment; the current disaster recovery environment is the main environment or the standby environment.
In some embodiments, if the current disaster recovery environment starting condition is modified to be in a starting state, displaying the disaster recovery menu and the resource menu on a cloud platform interface corresponding to the current disaster recovery environment; and if the starting condition of the current disaster recovery environment is modified to be in a non-starting state, displaying the disaster recovery menu on a cloud platform interface corresponding to the current disaster recovery environment.
In some embodiments, the disaster tolerant menu is configured to display a disaster tolerant situation corresponding to the current access domain name.
The invention also provides a master and slave management device of the containerized management server, which comprises:
the environment detection module is used for detecting respective survival conditions of the main environment and the standby environment after the configuration of the main environment and the standby environment corresponding to the current access domain name is completed; the current access domain name is any preset access domain name, the main environment and the standby environment are both containerized environments, and the main label and the standby label of the main environment and the standby environment are respectively a main environment label and a standby environment label;
The mapping switching module is used for modifying the mapping network cooperative address corresponding to the current access domain name into the network cooperative address of the standby environment if the survival condition of the main environment is a non-survival condition and the survival condition of the standby environment is a survival condition;
the starting and switching module is used for modifying the starting condition of the main environment into an unactivated state and modifying the starting condition of the standby environment into an activated state so as to provide environment resource operation service of the current access domain name by utilizing the standby environment; and the starting conditions of the main environment and the standby environment are different and are in starting states.
The invention also provides a containerized management server, comprising:
a memory for storing a computer program;
and a processor for implementing the steps of the master/slave management method of the containerized management server when executing the computer program.
In addition, the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the steps of the master and slave management method of the containerized management server when being executed by a processor.
The invention provides a main and standby management method of a containerized management server, which comprises the following steps: after the configuration of the main environment and the standby environment corresponding to the current access domain name is completed, detecting the respective survival conditions of the main environment and the standby environment; the current access domain name is any preset access domain name, the main environment and the standby environment are both containerized environments, and the main labels of the main environment and the standby environment are respectively a main environment label and a standby environment label; if the survival condition of the main environment is in a non-survival state and the survival condition of the standby environment is in a survival state, modifying the mapping network cooperative address corresponding to the current access domain name into the network cooperative address of the standby environment; modifying the starting condition of the main environment into an unactivated state, and modifying the starting condition of the standby environment into an activated state so as to provide environment resource operation service of the current access domain name by using the standby environment; the starting conditions of the main environment and the standby environment are different and are in starting states;
Therefore, if the survival condition of the main environment is in a non-survival state and the survival condition of the standby environment is in a survival state, the mapping network cooperative address corresponding to the current access domain name is modified to be the network cooperative address of the standby environment, and the self domain name resolution function of the containerized management server is utilized, so that a unified access entrance is realized, and the user budget is reduced; and the starting condition of the main environment is modified to be in a non-starting state, and the starting condition of the standby environment is modified to be in a starting state, so that the standby environment can be utilized to provide the environment resource operation service of the current access domain name, the automatic fault switching of the main environment and the standby environment is realized, and the user experience is improved. In addition, the invention also provides a main and standby management device of the containerized management server, the containerized management server and a computer readable storage medium, which also have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for managing a primary and a secondary of a containerized management server according to an embodiment of the present invention;
FIG. 2 is a flowchart of a primary and backup management method of another containerized management server according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a master/slave switching logic of another master/slave management method of a containerized management server according to an embodiment of the present invention;
fig. 4 is a block diagram of a master/slave management device of a containerized management server according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a simplified structure of a containerized management server according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a specific structure of a containerized management server according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a computer readable storage medium according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart of a master/slave management method of a containerized management server according to an embodiment of the present invention. The method may include:
step 101: after the configuration of the main environment and the standby environment corresponding to the current access domain name is completed, detecting the respective survival conditions of the main environment and the standby environment; the current access domain name is any preset access domain name, the main environment and the standby environment are both containerized environments, and the main labels of the main environment and the standby environment are respectively a main environment label and a standby environment label.
It can be understood that the current access domain name in this embodiment may be any preset access domain name that accesses the containerized management server; the preset access domain name may be a domain name which is preset in the containerized management server and can access a corresponding containerized environment. The main environment and the standby environment corresponding to the current access domain name in the embodiment can be a pair of containerized environments for realizing the disaster recovery function corresponding to the current access domain name configured in the containerized management server; accordingly, the primary environment and the backup environment may be provided in different containerized management servers. The containerized management server in the embodiment may be a server in a server cluster of a containerized application, for example, a server in a server cluster of a cloud computing management platform; the embodiment is not limited to a specific server type of the containerized management server, as long as the containerized management server can provide containerized applications and realize configuration of a containerized environment, for example, the containerized management server may be a server in kubernetes (k 8s, an open-source container orchestration engine) cluster.
Correspondingly, in this embodiment, the management of the main environment and the standby environment corresponding to the preset access domain name in the server cluster corresponding to the containerized management server is shown as an example, and the management of the main environment and the standby environment corresponding to the other preset access domain name in the server cluster can be implemented in the same or similar manner as the method provided in this embodiment, which is not limited in any way.
In order to distinguish the primary and secondary environments of a pair of containerized environments for realizing the disaster recovery function corresponding to the current access domain name, in this embodiment, a primary and secondary label may be added to the attribute of the containerized environment, that is, the containerized environment in which the primary and secondary labels are primary environment labels may be primary environment, and the containerized environment in which the primary and secondary labels are secondary environment labels may be secondary environment.
The specific mode of detecting the respective survival conditions of the main environment and the standby environment after the configuration of the main environment and the standby environment corresponding to the current access domain name is completed by the processor in the step can be set by a designer according to the practical scene and the user requirement, for example, the processor in any containerized management server in the server cluster can detect the survival conditions of the main environment and the standby environment corresponding to the current access domain name, namely, the survival conditions of the containerized management server where the main environment and the standby environment are respectively located, so that after the containerized management server where the main environment or the standby environment is located is down, the corresponding survival condition is determined to be non-survival. In this embodiment, the survival condition of the opposite party may be detected by the main environment and the standby environment, that is, the current disaster recovery environment may detect the survival condition of the disaster recovery environment of the opposite end; the current disaster recovery environment is a main environment or a standby environment, and the opposite-end disaster recovery environment is a standby environment or a main environment opposite to the current disaster recovery environment; that is, the processor in the containerized management server where the disaster recovery environment is located can detect the survival condition of the containerized management server where the disaster recovery environment is located at the opposite end; for example, an environment state detection module may be added to the cloud computing management platform, and after the configuration of the active and standby environments is completed, the environment state detection module on the active and standby environments may start a monitoring and checking procedure to check whether each other still survives, so as to determine whether the own environment needs to be subjected to environment switching.
For example, the processor in this step may detect the survival condition of the disaster recovery environment at the opposite end according to a preset detection time interval by using the current disaster recovery environment; for example, the current disaster recovery environment may send a survival message to the opposite disaster recovery environment at a preset detection time interval; after the current time interval of the current disaster recovery environment receives the survival message sent by the opposite-end disaster recovery environment, the survival condition of the opposite-end disaster recovery environment is determined to be a survival state, otherwise, the non-survival state of the opposite-end disaster recovery environment is determined.
Correspondingly, the preset detection time interval may be RTO (Recovery Time Objective, i.e. recovery time target) time, and the embodiment is not limited to a specific value of the preset detection time interval, for example, the preset detection time interval may be 1 minute; in order to ensure that data is not lost, the embodiment may also set the preset detection time interval to be 0, that is, rp0=0, that is, the processor may use the current disaster recovery environment to detect the survival condition of the disaster recovery environment of the opposite end in real time.
It should be noted that, in this embodiment, after detecting and acquiring respective survival conditions of the main environment and the standby environment, the processor may configure a mapping network co-address corresponding to the current access domain name and a disaster tolerance condition corresponding to the current access domain name according to respective current survival conditions and starting conditions of the main environment and the standby environment; the mapping network protocol address corresponding to the current access domain name can be a network protocol address (IP address) of a main environment or a standby environment, and the disaster recovery condition can be a main-standby unsynchronized state, a main-standby synchronized state or a standby enabling state; the active/standby unsynchronized state may be an unsynchronized state between the active environment and the standby environment, the active/standby synchronized state may be a state in which the active environment synchronizes data to the standby environment, and the standby enabled state may be a state in which the standby environment is enabled when the active environment does not survive.
Correspondingly, when the survival condition of the main environment is in a non-survival state and the survival condition of the standby environment is in a survival state, configuring the mapping network protocol address corresponding to the current access domain name and the disaster recovery condition corresponding to the current access domain name according to the respective survival condition and the starting condition of the main environment and the standby environment may include step 102 and step 103 to implement modification of the mapping network protocol address corresponding to the current access domain name and switching of the standby environment, that is, switching of the starting state.
In some embodiments, the processor may further configure a mapping network address corresponding to the current access domain name and a disaster tolerance condition corresponding to the current access domain name according to respective current survival conditions and activation conditions of the main environment and the standby environment and a current disaster tolerance condition corresponding to the current access domain name. For example, the processor of any containerized management server in the cluster may configure the mapping network co-address corresponding to the current access domain name and the disaster tolerance condition corresponding to the current access domain name according to the respective current survival condition and starting condition of the main environment and the standby environment and the current disaster tolerance condition corresponding to the current access domain name. Or the processor of the containerized management server of the main environment or the standby environment can configure the mapping network cooperative address corresponding to the current access domain name and the disaster tolerance condition corresponding to the current access domain name according to the current survival condition and the starting condition of the main environment and the standby environment respectively and the current disaster tolerance condition corresponding to the current access domain name.
Step 102: and if the survival condition of the main environment is in a non-survival state and the survival condition of the standby environment is in a survival state, modifying the mapping network protocol address corresponding to the current access domain name into the network protocol address of the standby environment.
It may be understood that, in this step, the processor may modify the mapping IP address (i.e. the mapping network co-address) corresponding to the current access domain name from the previous IP address of the main environment to the IP address of the standby environment when the main environment is not alive and the standby environment is alive, so that the subsequent user can access the standby environment by using the current access domain name, for example, the processor in the containerized management server where the standby environment is located in this step may configure the IP (i.e. the mapping network co-address) corresponding to the current access domain name configured in the CoreDNS (a containerized DNS server) container of the standby environment as the IP address of the standby environment, so that the containerized management server in the cluster can find the IP address of the standby environment according to the obtained current access domain name.
That is, in this embodiment, the domain name resolution function of the containerized management server may be utilized, such as the CoreDNS container described above, to serve as a domain name resolution server in the primary and standby environments, so as to implement domain name resolution between the access domain name and the primary or standby environment, thereby implementing a unified access portal without introducing third parties GSLB and DNS, and reducing user budget.
Step 103: modifying the starting condition of the main environment into an unactivated state, and modifying the starting condition of the standby environment into an activated state so as to provide environment resource operation service of the current access domain name by using the standby environment; wherein, the starting conditions of the main environment and the standby environment are different and are in starting states.
It can be understood that, in this step, the processor may modify the enabling condition of the main environment from the enabled state to the non-enabled state and modify the enabling condition of the standby environment from the non-enabled state to the enabled state in the case that the main environment is non-alive and the standby environment is alive, so as to provide the environment resource operation service of the current access domain name by using the standby environment. In this embodiment, an enabling condition may be added to an attribute of the containerized environment, so that the primary environment and the standby environment cannot be enabled at the same time by adding the enabling condition, and a condition that resource operations are performed at the primary environment and the standby environment at the same time is prevented from occurring.
It should be noted that, the present step and the step 102 are both steps performed under the condition that the main environment is not alive and the standby environment is alive, and the specific sequence of the steps 102 and 103 is not limited in this embodiment, and the step 102 may be performed first and then the step 103 may be performed, or the step 103 may be performed before the step 102 is performed.
Correspondingly, the processor in this embodiment may further determine whether to perform active-standby switching according to the current disaster situation corresponding to the current access domain name; if the disaster tolerant situation includes a main-to-standby synchronization state, a standby enabling state and a main-to-standby non-synchronization state, if the disaster tolerant situation is the main-to-standby synchronization state, the steps 102 and 103 can be entered to modify the mapping network co-address corresponding to the current access domain name into the network co-address of the standby environment, modify the enabling situation of the main environment into the non-enabling state, modify the enabling situation of the standby environment into the enabling state, and modify the disaster tolerant situation into the standby enabling state; if the disaster recovery condition is a standby enabling state or a primary and standby unsynchronized state, the process may be ended or step 101 may be entered, and the respective survival conditions of the primary environment and the standby environment may be continuously detected. If the disaster situation is in a primary-backup unsynchronized state, namely, the resource data in the primary environment is not backed up in the backup environment, the processor can output data alarm prompt information, such as displaying the data alarm prompt information on a cloud platform interface corresponding to the current access domain name, so as to prompt a user that the risk of data loss exists.
For example, the processor in step 102 may determine whether the disaster-tolerant situation is a master-to-slave synchronization state; if the synchronous state is from the main to the standby, modifying the mapping network cooperative address corresponding to the current access domain name into the network cooperative address of the standby environment, and modifying the disaster-tolerant situation into the standby starting state; if the synchronous state is not from the main synchronous state to the standby synchronous state, judging whether the disaster-tolerant situation is in a standby starting state or not; if the state is the standby starting state, entering step 101; if the data alarm prompt information is not in the standby starting state (namely, the disaster situation is in the primary and standby asynchronous state), outputting the data alarm prompt information, such as sending the data alarm prompt information to a preset mailbox or a preset IP address through a network, or highlighting the data alarm prompt information on a cloud platform interface.
Further, the method provided by the embodiment may further include a data backup process from the main environment to the standby environment; for example, the processor may backup the resource data in the primary environment to the standby environment for storage when the survival conditions of the primary environment and the standby environment are both survival states, the enabling condition of the primary environment is an enabling state, and the enabling condition of the standby environment is an disabling state, so as to implement configuration of the primary-to-standby synchronization state.
Correspondingly, for the specific mode that the processor backs up the resource data in the main environment to the standby environment for storage, the specific mode can be set by a designer, for example, in order to avoid that complete data backup is needed for each backup, the processor can import all the resource data in the main environment to the standby environment and configure data increment synchronization from the main environment to the standby environment; for example, the processor may export and import all resource data in the primary environment into the backup environment using a database logical backup tool (e.g., mysqldump, a logical backup tool that the mysql database is self-contained in); the data increment synchronization from the primary environment to the backup environment is configured using a database increment synchronization tool (e.g., the increment synchronization tool of the mysql database). In some embodiments, the processor may backup the resource data in the main environment to the standby environment according to the disaster situation corresponding to the current access domain name, so as to determine whether to need to backup from the main environment to the standby environment according to the current disaster situation corresponding to the current access domain name; for example, if the disaster recovery condition is in a primary-backup unsynchronized state, importing all resource data in the primary environment into the backup environment, and configuring data increment synchronization from the primary environment to the backup environment; configuring a mapping network protocol address corresponding to the current access domain name as a network protocol address of the main environment; the disaster-tolerant situation is modified to be in a main-to-standby synchronous state; if the disaster recovery condition is the main-to-standby synchronization state, the process is ended or step 101 is entered.
Furthermore, the method provided by the embodiment can further comprise a data backup process when the backup environment is started; for example, the processor may import all resource data in the standby environment into the main environment and configure data increment synchronization from the main environment to the standby environment when the survival conditions of the main environment and the standby environment are both survival states, the enabling condition of the main environment is not enabled, and the enabling condition of the standby environment is enabled; configuring a mapping network protocol address corresponding to the current access domain name as a network protocol address of the main environment; the starting condition of the main environment is modified to be in a starting state, and the starting condition of the standby environment is modified to be in an unactivated state.
That is, the processor may implement the simulation exercise of the active-standby switching by modifying the active condition of the active environment to an inactive state and modifying the active condition of the standby environment to an active state when both the active environment and the standby environment survive. Correspondingly, the processor in this embodiment may obtain a disaster recovery simulation instruction of the current access domain name; according to the disaster recovery simulation instruction, the starting condition of the main environment is modified to be in an unactivated state, and the starting condition of the standby environment is modified to be in an activated state.
Further, the present embodiment may further include a configuration process of a main environment and a standby environment corresponding to the current access domain name, for example, the processor may configure the main environment and the standby environment corresponding to the current access domain name respectively by using two different containerized management servers, and configure the mapping network protocol address corresponding to the current access domain name as the network protocol address of the main environment. The processor may also use the configured containerized environment in one containerized management server as a main environment, and further configure another containerized environment in another containerized management server as a standby environment, and configure the mapping network co-address corresponding to the current access domain name as the network co-address of the main environment. For example, the processor may obtain a disaster recovery configuration instruction corresponding to the current access domain name; the disaster recovery configuration instruction comprises a current access domain name and a network protocol address of a main environment; according to the network coordination address of the main environment, determining the containerized environment of the network coordination address as the main environment; and configuring the containerized environment as a standby environment in other containerized management servers except the containerized management server where the main environment is located.
Furthermore, in this embodiment, the processor may design a disaster recovery menu on the cloud platform interface, so as to provide the configuration functions of the address information (such as the main environment IP address, the standby environment IP address, the user name and the password) of the main environment and the standby environment of the platform and the unified access domain name (i.e. the preset access domain name) and the functions of recording and logging of automatic switching of the system and displaying the current disaster recovery condition (such as the main-standby unsynchronized state, the main-standby synchronized state and the standby enabled state) by using the disaster recovery menu.
Correspondingly, in order to ensure that the main and standby environments cannot perform resource management at the same time, after the disaster recovery function of the main and standby environments is used, the menus in the cloud platform interface displayed by the main and standby environments are controlled, and only when a certain square environment is started, all the menus are displayed, so that the resource management can be performed; after the non-enabled party logs in, only a disaster recovery menu in the cloud platform interface is displayed, and a resource menu (such as a cloud host, a network and other menus) is not displayed, so that the current disaster recovery environment is in a disaster recovery backup state.
That is, the method provided in this embodiment may further include a process of displaying a cloud platform interface corresponding to the current disaster recovery environment; if the starting condition of the current disaster recovery environment is modified to be in a starting state, a cloud platform interface corresponding to the current disaster recovery environment displays a disaster recovery menu and a resource menu; and if the starting condition of the current disaster recovery environment is modified to be in a non-starting state, displaying a disaster recovery menu on a cloud platform interface corresponding to the current disaster recovery environment.
Correspondingly, the processor can also acquire a command triggered in a cloud platform interface corresponding to the current disaster recovery environment, such as a disaster recovery configuration command, a disaster recovery simulation command, an environment resource adjustment command and the like; for example, a user may configure a preset access domain name, a main environment IP address, etc. on a disaster recovery menu in a cloud platform interface corresponding to a current disaster recovery environment, so as to trigger a disaster recovery configuration instruction; the user can modify the starting conditions of the main environment and the standby environment in the disaster recovery menu in the cloud platform interface corresponding to the current disaster recovery environment so as to trigger a disaster recovery simulation instruction. When the current disaster recovery environment is in an enabling state, a user can configure adjustment resources in a resource menu in a cloud platform interface corresponding to the current disaster recovery environment so as to trigger an environment resource adjustment instruction, so that the current disaster recovery environment can execute corresponding environment resource operation, and environment resource operation service is realized.
In the embodiment of the invention, if the survival condition of the main environment is in a non-survival state and the survival condition of the standby environment is in a survival state, the mapping network cooperative address corresponding to the current access domain name is modified into the network cooperative address of the standby environment, and the self domain name resolution function of the containerized management server is utilized, so that a unified access entrance is realized, and the user budget is reduced; and the starting condition of the main environment is modified to be in a non-starting state, and the starting condition of the standby environment is modified to be in a starting state, so that the standby environment can be utilized to provide the environment resource operation service of the current access domain name, the automatic fault switching of the main environment and the standby environment is realized, and the user experience is improved.
Based on the above embodiment, the embodiment of the present invention further provides another active/standby management method of the containerized management server; correspondingly, fig. 2 is a flowchart of another master/slave management method of the containerized management server according to an embodiment of the present invention. The method may include:
step 201: after the configuration of the main environment and the standby environment corresponding to the current access domain name is completed, detecting the survival condition of the disaster recovery environment of the opposite end by the current disaster recovery environment according to a preset detection time interval; the current disaster recovery environment is a main environment or a standby environment.
It can be understood that, in this embodiment, the disaster recovery environment at the opposite end is a containerized environment opposite to the current disaster recovery environment, for example, when the current disaster recovery environment is the main environment, the disaster recovery environment at the opposite end is the backup environment; when the current disaster recovery environment is a standby environment, the opposite disaster recovery environment is a main environment.
For example, in this embodiment, the current disaster recovery environment may periodically send a survival message to the opposite disaster recovery environment, so as to determine the survival condition of the opposite disaster recovery environment according to the sending of the survival message by the opposite disaster recovery environment; as shown in fig. 3, the current disaster recovery environment may periodically send a survival message to the opposite disaster recovery environment by using the environment detection module, so as to detect the survival condition of the opposite disaster recovery environment. That is, the processor of the containerized management server where the current disaster recovery environment is located may periodically send the survival message to the opposite disaster recovery environment by using the current disaster recovery environment, and determine the survival condition of the opposite disaster recovery environment according to the sending of the survival message by the opposite disaster recovery environment.
Step 202: the current disaster recovery environment configures a mapping network cooperative address corresponding to the current access domain name and a disaster recovery condition corresponding to the current access domain name according to the respective current survival condition and starting condition of the main environment and the standby environment and the current disaster recovery condition corresponding to the current access domain name.
For example, when the current disaster recovery environment is a primary environment and the survival condition of the primary environment is a survival state, the primary environment can perform control of primary-backup switching, for example, when the primary environment and the backup environment are both alive and the disaster recovery condition is not synchronous, the primary environment is enabled and the backup environment is not enabled, the primary environment can call the disaster recovery management module interface to fully export and import resource data in a database (such as a mariadib database, a mysql database) of the primary environment to the backup environment based on mysqldump command, and then configure primary-backup data incremental synchronization based on the otter; acquiring a main environment IP address and a configured current access domain name, and respectively configuring a mapping IP address corresponding to the current access domain name as a main environment IP address in a CoreDNS container of a main and standby environment by a disaster recovery management module calling a CoreDNS plug-in API (Application Program Interface ) interface; the disaster-tolerant situation is modified to be in a synchronous state from main to standby, the main environment is set to be in an enabled state, and the standby environment is set to be in an unoperated state. That is, the correspondence between the current access domain name and the mapping IP address in the CoreDNS of the primary and backup environments is consistent, that is, the current access domain name is the IP address of the environment in the same enabled state, which is resolved on the CoreDNS of the primary environment or the CoreDNS of the backup environment.
Correspondingly, the main environment and the standby environment are both alive, the disaster recovery condition is a main-to-standby synchronous state, and the process can be directly entered into step 201 or ended when the main environment is started and the standby environment is not started. The main environment and the standby environment are both alive, the disaster recovery condition is a main-to-standby synchronization state, under the condition that the main environment is not started and the standby environment is started, the main environment can export and import resource data of the standby environment to the main environment by using a mysqldump command, and then the master-to-standby incremental synchronization is configured; configuring a mapping IP address corresponding to a current access domain name as a main environment IP address in a CoreDNS container of the main and standby environments; the main environment is set to an enabled state, and the standby environment is set to an un-enabled state.
Correspondingly, when the disaster recovery condition is in a standby starting state, the main environment is not started and the standby environment is started, the main environment can export and import resource data of the standby environment to the main environment by using a mysqldump command, and then allocate the master-to-standby increment synchronization; configuring a mapping IP address corresponding to a current access domain name as a main environment IP address in a CoreDNS container of the main and standby environments; setting the main environment to be in an enabled state and the standby environment to be in an unoperated state; and modifying the disaster-tolerant situation into a main-to-standby synchronous state. In the case where the primary environment is alive and the backup environment is not alive, the primary environment may directly end the process or return to step 201.
Correspondingly, when the current disaster recovery environment is a standby environment, the survival condition of the standby environment is a survival state and the survival condition of the main environment is a non-survival state, the standby environment can be used for controlling the main-standby switching. If the disaster situation is in the active/standby unsynchronized state, the process may be ended or the process returns to step 201; when the disaster-tolerant situation is in a main-to-standby synchronous state, the standby environment can check whether the main environment survives; if so, ending the flow or returning to step 201; if the domain name is not stored, the CoreDNS container of the backup environment is modified to be provided with the mapping IP address corresponding to the current access domain name as the backup environment IP address, the disaster recovery condition is modified to be in a backup enabling state, and the backup environment is set to be in the enabling state, so that the backup environment provides service. If the disaster is in the ready state, the process may be ended or the process returns to step 201.
As shown in fig. 3, after the two containerized management servers build the active and standby environments respectively, a user can log in a cloud platform interface corresponding to the active environment in the cloud computing management platform, configure a preset access domain name (https:// xxxx.xxx.com), and configure an active and standby environment IP address; after the configuration is completed, a user can see that the disaster situation is changed from a main-standby unsynchronized state to a main-standby synchronized state automatically, and the data is indicated to be synchronized from the main to the standby; as shown in the dotted flow in fig. 3, a database of a primary environment (e.g., a mariadib database) may be configured for incremental synchronization of data to a database of a backup environment using a database incremental synchronization tool (e.g., an otter). The user may specify a DNS server address on a local computer accessing the cloud computing management platform, e.g., a primary DNS server address is set to a primary context IP address, and a backup DNS server address is set to a backup context IP address. The user can access the cloud computing management platform by using the preset access domain name, if the main environment is normal, the main environment (namely, main-enabled, standby-not enabled) is accessed when the login to the cloud computing management platform is successful, and the process of domain name resolution and access environment by using a containerized domain name system server (such as CoreDNS) can be performed according to the solid line flow as shown in fig. 3; after the primary environment is powered off, the user can restore normal access within 1 minute (i.e. a preset detection time interval) through the preset access domain name access platform, and then the user is automatically switched to the backup environment (i.e. primary-not enabled, backup-enabled) to check that the disaster recovery condition is in the backup-enabled state, and the process of domain name resolution and access environment by using the containerized domain name system server (such as CoreDNS) can be performed according to the dotted line flow as shown in fig. 3, so that the user can automatically switch back to the primary environment after the primary environment is restored to normal.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a primary and secondary management device of a containerized management server, where the primary and secondary management device of the containerized management server described below and the primary and secondary management method of the containerized management server described above may be referred to correspondingly.
Referring to fig. 4, fig. 4 is a block diagram illustrating a master/slave management apparatus of a containerized management server according to an embodiment of the present invention. The apparatus may include:
the environment detection module 10 is configured to detect respective survival conditions of the main environment and the standby environment after the configuration of the main environment and the standby environment corresponding to the current access domain name is completed; the current access domain name is any preset access domain name, the main environment and the standby environment are both containerized environments, and the main labels of the main environment and the standby environment are respectively a main environment label and a standby environment label;
the mapping switching module 20 is configured to modify a mapping network address corresponding to the current access domain name into a network address of the backup environment if the survival condition of the primary environment is a non-survival condition and the survival condition of the backup environment is a survival condition;
an enabling switching module 30, configured to modify an enabling condition of the main environment into an inactive state, and modify an enabling condition of the standby environment into an active state, so as to provide an environment resource operation service of a current access domain name by using the standby environment; wherein, the starting conditions of the main environment and the standby environment are different and are in starting states.
In some embodiments, the environment detection module 10 may be specifically configured to detect the survival condition of the disaster-tolerant environment at the opposite end by using the current disaster-tolerant environment; the current disaster recovery environment is a main environment or a standby environment, and the opposite disaster recovery environment is a standby environment or a main environment opposite to the current disaster recovery environment.
In some embodiments, the environment detection module 10 may be specifically configured to detect the survival condition of the disaster recovery environment at the opposite end according to a preset detection time interval by using the current disaster recovery environment.
In some embodiments, the apparatus may further comprise:
and the disaster recovery management module is used for backing up the resource data in the main environment to the standby environment for storage if the survival conditions of the main environment and the standby environment are both survival states and the starting condition of the main environment is starting state and the starting condition of the standby environment is non-starting state.
In some embodiments, the disaster recovery management module may be specifically configured to backup, according to a disaster recovery condition corresponding to the current access domain name, resource data in the primary environment to the backup environment for storage.
In some embodiments, the disaster recovery management module may be specifically configured to backup the resource data in the primary environment to the backup environment for storage if the disaster recovery condition is in a primary-backup unsynchronized state, and modify the disaster recovery condition to a primary-backup synchronized state; and if the disaster recovery condition is a main-to-standby synchronous state, sending a starting signal to the environment detection module 10.
In some embodiments, the disaster recovery management module may include:
the synchronization sub-module is used for importing all resource data in the main environment into the standby environment and configuring data increment synchronization from the main environment to the standby environment;
the mapping sub-module is used for configuring a mapping network protocol address corresponding to the current access domain name as a network protocol address of the main environment;
and the disaster recovery submodule is used for modifying the disaster recovery condition into a main-to-standby synchronous state.
In some embodiments, the disaster recovery management module may include:
the importing sub-module is used for exporting and importing all resource data in the main environment into the standby environment by utilizing a database logic backup tool;
and the increment sub-module is used for configuring data increment synchronization from the main environment to the standby environment by utilizing a database increment synchronization tool.
In some embodiments, the mapping switching module 20 may be specifically configured to modify a mapping network address corresponding to a current access domain name to a network address of a standby environment if the disaster tolerance situation is in a primary-to-standby synchronization state, and modify the disaster tolerance situation to a standby activation state; and if the disaster recovery condition is in the standby enabling state, sending a starting signal to the environment detection module 10.
In some embodiments, mapping switch module 20 may include:
The first judging submodule is used for judging whether the disaster-tolerant situation is in a main-to-standby synchronous state or not;
the switching modification submodule is used for modifying the mapping network cooperative address corresponding to the current access domain name into the network cooperative address of the standby environment if the synchronous state is from the main to the standby, and modifying the disaster-tolerant situation into the standby starting state;
the second judging submodule is used for judging whether the disaster-tolerant situation is in a standby starting state if the disaster-tolerant situation is not in a main-to-standby synchronous state; if the active state is set, a start signal is sent to the environment detection module 10.
In some embodiments, mapping switch module 20 may further include:
and the alarm sub-module is used for outputting data alarm prompt information if the disaster-tolerant situation is in a primary and standby unsynchronized state.
In some embodiments, the alert sub-module may be specifically configured to send the data alert prompt to a preset mailbox through a network.
In some embodiments, the mapping switch module 20 may be further configured to output a data alert prompt if the disaster situation is in a primary-standby unsynchronized state.
In some embodiments, the disaster recovery management module may be specifically configured to backup the stored resource data to the backup environment for storage by using the primary environment.
In some embodiments, the apparatus may further comprise:
the standby-to-main synchronization module is used for importing all resource data in the standby environment into the main environment and configuring data increment synchronization from the main environment to the standby environment if the survival conditions of the main environment and the standby environment are both survival states and the starting condition of the main environment is not starting state and the starting condition of the standby environment is starting state;
the mapping configuration module is used for configuring the mapping network protocol address corresponding to the current access domain name as the network protocol address of the main environment;
and the starting modification module is used for modifying the starting condition of the main environment into a starting state and modifying the starting condition of the standby environment into an unactivated state.
In some embodiments, the apparatus may further comprise:
the simulation acquisition module is used for acquiring a disaster recovery simulation instruction of the current access domain name;
the simulation modification module is used for modifying the starting condition of the main environment into an unactivated state and modifying the starting condition of the standby environment into an activated state according to the disaster recovery simulation instruction.
In some embodiments, the apparatus may further comprise: the environment configuration module is used for configuring a main environment and a standby environment corresponding to the current access domain name;
wherein, the environment configuration module may include:
The configuration acquisition module is used for acquiring a disaster recovery configuration instruction corresponding to the current access domain name; the disaster recovery configuration instruction comprises a current access domain name and a network protocol address of a main environment;
the configuration modification module is used for determining the containerized environment of the network coordination address as the main environment according to the network coordination address of the main environment;
the environment configuration module is used for configuring the containerized environment as a standby environment in other containerized management servers except the containerized management server where the main environment is located;
and the configuration mapping module is used for configuring the mapping network protocol address corresponding to the current access domain name as the network protocol address of the main environment.
In some embodiments, the configuration obtaining module may be specifically configured to obtain a disaster recovery configuration instruction triggered by a disaster recovery menu in a cloud platform interface corresponding to a current disaster recovery environment; the current disaster recovery environment is a main environment or a standby environment.
In some embodiments, if the current disaster recovery environment starting condition is modified to be in a starting state, displaying a disaster recovery menu and a resource menu on a cloud platform interface corresponding to the current disaster recovery environment; and if the starting condition of the current disaster recovery environment is modified to be in a non-starting state, displaying a disaster recovery menu on a cloud platform interface corresponding to the current disaster recovery environment.
In some embodiments, the disaster tolerant menu is used for displaying disaster tolerant conditions corresponding to the currently accessed domain name.
In this embodiment, in the embodiment of the present invention, if the surviving condition of the main environment is a non-surviving condition and the surviving condition of the standby environment is a surviving condition, the mapping network cooperative address corresponding to the current access domain name is modified to be the network cooperative address of the standby environment, and the domain name resolution function of the containerized management server is utilized, so that a unified access entry is realized, and the user budget is reduced; and the starting condition of the main environment is modified to be in a non-starting state by the starting switching module 30, and the starting condition of the standby environment is modified to be in a starting state, so that the standby environment can be utilized to provide the environment resource operation service of the current access domain name, the automatic fault switching of the main environment and the standby environment is realized, and the user experience is improved.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a containerized management server, where a containerized management server described below and a master/slave management method of a containerized management server described above may be referred to correspondingly.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a containerized management server according to an embodiment of the present invention. The containerized management server may include:
A memory D1 for storing a computer program;
and the processor D2 is used for implementing the steps of the master-slave management method of the containerized management server provided by the method embodiment when executing the computer program.
Accordingly, referring to fig. 6, fig. 6 is a schematic diagram showing a specific structure of a containerized management server according to an embodiment of the present invention, where the containerized management server 310 may have a relatively large difference due to different configurations or performances, and may include one or more processors (central processing units, CPU) 322 (e.g., one or more processors) and a memory 332, and one or more storage media 330 (e.g., one or more mass storage devices) storing application programs 342 or data 344. Wherein the memory 332 and the storage medium 330 may be transitory or persistent. The program stored on the storage medium 330 may include one or more units (not shown), each of which may include a series of instruction operations on a host. Still further, the central processor 322 may be configured to communicate with the storage medium 330 to execute a series of instruction operations in the storage medium 330 on the containerized management server 310.
The containerization management server 310 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input/output interfaces 358, and/or one or more operating systems 341.
The containerized management server provided in this embodiment may be a server in a k8s cluster.
The steps in the above-described master-slave management method of the containerized management server may be implemented by the structure of the containerized management server.
Corresponding to the above method embodiments, the embodiments of the present invention further provide a computer readable storage medium, where a computer readable storage medium described below and a method for managing a container management server described above may be referred to correspondingly.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a computer readable storage medium according to an embodiment of the invention. The computer-readable storage medium 40 stores a computer program 41, and when the computer program 41 is executed by a processor, the steps of the master/slave management method of the containerized management server provided in the above-described method embodiment are implemented.
The computer readable storage medium 40 may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, etc. which can store various program codes.
In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. The apparatus, the container management server, and the computer-readable storage medium according to the embodiments are described in a relatively simple manner, and the description of the apparatus, the container management server, and the computer-readable storage medium corresponds to the method according to the embodiments.
The above describes in detail the method and apparatus for master/slave management of a containerized management server, the containerized management server, and the computer readable storage medium. The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to facilitate an understanding of the method of the present invention and its core ideas. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the invention can be made without departing from the principles of the invention and these modifications and adaptations are intended to be within the scope of the invention as defined in the following claims.

Claims (20)

1. A master and slave management method of a containerized management server is characterized by comprising the following steps:
After the configuration of the main environment and the standby environment corresponding to the current access domain name is completed, detecting the respective survival conditions of the main environment and the standby environment; the current access domain name is any preset access domain name, the main environment and the standby environment are both containerized environments, and the main label and the standby label of the main environment and the standby environment are respectively a main environment label and a standby environment label;
if the survival condition of the main environment is a non-survival state, and the survival condition of the standby environment is a survival state, determining a current disaster recovery condition corresponding to the current access domain name; the disaster-tolerant situation comprises a main-to-standby synchronous state, a standby starting state and a main-standby asynchronous state;
if the disaster recovery condition is the main-to-standby synchronization state, modifying the mapping network cooperative address corresponding to the current access domain name into the network cooperative address of the standby environment; modifying the starting condition of the main environment into a non-starting state, modifying the starting condition of the standby environment into a starting state, and modifying the disaster-tolerant condition into a standby starting state so as to provide environment resource operation service of the current access domain name by utilizing the standby environment;
and if the disaster recovery condition is the standby starting state or the primary and standby unsynchronized state, executing the step of detecting the respective survival conditions of the primary environment and the standby environment.
2. The method for primary and backup management of a containerized management server according to claim 1, wherein the detecting survival of each of the primary environment and the backup environment comprises:
detecting the survival condition of the disaster recovery environment of the opposite end by the current disaster recovery environment; the current disaster recovery environment is the main environment or the standby environment, and the opposite-end disaster recovery environment is the standby environment or the main environment opposite to the current disaster recovery environment.
3. The method for master/slave management of the containerized management server according to claim 2, wherein the detecting the survival condition of the disaster recovery environment at the opposite end by the current disaster recovery environment includes:
the current disaster recovery environment detects the survival condition of the disaster recovery environment of the opposite end according to a preset detection time interval.
4. The method for primary and backup management of a containerized management server according to claim 1, wherein after detecting survival of each of the primary environment and the backup environment, further comprising:
and if the survival conditions of the main environment and the standby environment are both survival states, the starting condition of the main environment is starting state, and the starting condition of the standby environment is non-starting state, backing up the resource data in the main environment to the standby environment for storage.
5. The method for primary and backup management of a containerized management server according to claim 4, wherein backing up the resource data in the primary environment to the backup environment for storage, comprises:
and backing up the resource data in the main environment to the standby environment for storage according to the disaster-tolerant condition corresponding to the current access domain name.
6. The method for managing primary and backup of a containerized management server according to claim 5, wherein backing up resource data in the primary environment to the backup environment for storage according to a disaster situation corresponding to a current access domain name comprises:
if the disaster-tolerant situation is in a main-standby unsynchronized state, backing up the resource data in the main environment to the standby environment for storage, and modifying the disaster-tolerant situation into a main-standby synchronized state;
and if the disaster recovery condition is the main-to-standby synchronous state, executing the step of detecting the survival condition of each of the main environment and the standby environment.
7. The method for master/slave management of the containerized management server according to claim 6, wherein backing up the resource data in the master environment to the slave environment for storage and modifying the disaster-tolerant situation to a master-to-slave synchronization state comprises:
Importing all resource data in the main environment into the standby environment, and configuring data increment synchronization from the main environment to the standby environment;
configuring a mapping network protocol address corresponding to the current access domain name as the network protocol address of the main environment;
and modifying the disaster-tolerant situation into a main-to-standby synchronous state.
8. The method for primary and backup management of a containerized management server according to claim 7, wherein importing all resource data in the primary environment into the backup environment and configuring data delta synchronization of the primary environment to the backup environment comprises:
using a database logic backup tool to export and import all resource data in the main environment into the backup environment;
and configuring data increment synchronization from the main environment to the standby environment by using a database increment synchronization tool.
9. The master/slave management method of the containerized management server according to claim 1, further comprising:
and if the disaster-tolerant condition is in a primary-standby unsynchronized state, outputting data alarm prompt information.
10. The master/slave management method of the containerized management server according to claim 9, wherein the outputting the data alert prompt information includes:
And sending data alarm prompt information to a preset mailbox through a network.
11. The method for primary and backup management of a containerized management server according to claim 4, wherein backing up the resource data in the primary environment to the backup environment for storage, comprises:
and the main environment backs up the stored resource data to the standby environment for storage.
12. The method for master/slave management of a containerized management server according to any one of claims 1 to 11, wherein after detecting survival of each of the master environment and the slave environment, further comprising:
if the survival conditions of the main environment and the standby environment are both survival states, the starting condition of the main environment is not started, and the starting condition of the standby environment is started, importing all resource data in the standby environment into the main environment, and configuring data increment synchronization from the main environment to the standby environment;
configuring a mapping network protocol address corresponding to the current access domain name as the network protocol address of the main environment;
and modifying the starting condition of the main environment into a starting state, and modifying the starting condition of the standby environment into an unactivated state.
13. The master/slave management method of the containerized management server according to claim 12, further comprising:
obtaining a disaster recovery simulation instruction of a current access domain name;
and modifying the starting condition of the main environment into an unactivated state according to the disaster recovery simulation instruction, and modifying the starting condition of the standby environment into an activated state.
14. The master/slave management method of the containerized management server according to claim 1, further comprising: the configuration process of the main environment and the standby environment corresponding to the current access domain name;
the configuration process of the main environment and the standby environment corresponding to the current access domain name comprises the following steps:
obtaining a disaster recovery configuration instruction corresponding to a current access domain name; the disaster recovery configuration instruction comprises a current access domain name and a network coordination address of the main environment;
determining the containerized environment of the network co-address as the main environment according to the network co-address of the main environment;
configuring a containerized environment as the standby environment in other containerized management servers except for the containerized management server in which the main environment is located;
and configuring the mapping network cooperative address corresponding to the current access domain name as the network cooperative address of the main environment.
15. The method for master/slave management of the containerized management server according to claim 14, wherein the obtaining the disaster recovery configuration command corresponding to the current access domain name includes:
acquiring a disaster recovery configuration instruction triggered by a disaster recovery menu in a cloud platform interface corresponding to a current disaster recovery environment; the current disaster recovery environment is the main environment or the standby environment.
16. The method for managing the primary and secondary resources of the containerized management server according to claim 15, wherein if the current disaster recovery environment is modified to be in an enabled state, a cloud platform interface corresponding to the current disaster recovery environment displays the disaster recovery menu and the resource menu; and if the starting condition of the current disaster recovery environment is modified to be in a non-starting state, displaying the disaster recovery menu on a cloud platform interface corresponding to the current disaster recovery environment.
17. The method for managing primary and secondary resources of a containerized management server of claim 16, wherein the disaster recovery menu is configured to display a disaster recovery condition corresponding to a current access domain name.
18. A master/slave management apparatus of a containerized management server, comprising:
the environment detection module is used for detecting respective survival conditions of the main environment and the standby environment after the configuration of the main environment and the standby environment corresponding to the current access domain name is completed; the current access domain name is any preset access domain name, the main environment and the standby environment are both containerized environments, and the main label and the standby label of the main environment and the standby environment are respectively a main environment label and a standby environment label;
The mapping switching module is used for determining the current disaster recovery condition corresponding to the current access domain name if the survival condition of the main environment is a non-survival condition and the survival condition of the standby environment is a survival condition; the disaster-tolerant situation comprises a main-to-standby synchronous state, a standby starting state and a main-standby asynchronous state; if the disaster recovery condition is the main-to-standby synchronization state, modifying the mapping network cooperative address corresponding to the current access domain name into the network cooperative address of the standby environment; if the disaster recovery condition is the standby starting state or the main and standby unsynchronized state, sending a starting signal to the environment detection module;
and the starting and switching module is used for modifying the starting condition of the main environment into an unactivated state, modifying the starting condition of the standby environment into an activated state and modifying the disaster-tolerant condition into a standby starting state if the disaster-tolerant condition is in the main-to-standby synchronous state so as to provide the environment resource operation service of the current access domain name by utilizing the standby environment.
19. A containerized management server, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the master/slave management method of the containerized management server according to any one of claims 1 to 17 when executing the computer program.
20. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and the computer program when executed by a processor implements the steps of the master/slave management method of the containerization management server according to any one of claims 1 to 17.
CN202311247064.7A 2023-09-26 2023-09-26 Containerized management server, main and standby management method and device thereof, and storage medium Active CN116996369B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311247064.7A CN116996369B (en) 2023-09-26 2023-09-26 Containerized management server, main and standby management method and device thereof, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311247064.7A CN116996369B (en) 2023-09-26 2023-09-26 Containerized management server, main and standby management method and device thereof, and storage medium

Publications (2)

Publication Number Publication Date
CN116996369A CN116996369A (en) 2023-11-03
CN116996369B true CN116996369B (en) 2024-02-09

Family

ID=88532497

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311247064.7A Active CN116996369B (en) 2023-09-26 2023-09-26 Containerized management server, main and standby management method and device thereof, and storage medium

Country Status (1)

Country Link
CN (1) CN116996369B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117201507A (en) * 2023-11-08 2023-12-08 苏州元脑智能科技有限公司 Cloud platform switching method and device, electronic equipment and storage medium
CN117478488B (en) * 2023-12-26 2024-03-19 苏州元脑智能科技有限公司 Cloud management platform switching system, method, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110520843A (en) * 2017-03-23 2019-11-29 Dh2I公司 Highly usable stateful container in cluster environment
CN111711542A (en) * 2020-06-22 2020-09-25 北京思特奇信息技术股份有限公司 Disaster recovery switching method and device based on DNS (Domain name System), electronic equipment and storage medium
CN112929221A (en) * 2021-03-02 2021-06-08 浪潮云信息技术股份公司 Method for realizing disaster tolerance of main and standby cloud service products
CN115309497A (en) * 2021-05-08 2022-11-08 中国移动通信集团浙江有限公司 Request scheduling method, device, equipment and storage medium
CN115640096A (en) * 2021-07-20 2023-01-24 中国电信股份有限公司 Application management method and device based on kubernets and storage medium
CN116302352A (en) * 2023-03-16 2023-06-23 中国建设银行股份有限公司 Cluster disaster recovery processing method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110520843A (en) * 2017-03-23 2019-11-29 Dh2I公司 Highly usable stateful container in cluster environment
CN111711542A (en) * 2020-06-22 2020-09-25 北京思特奇信息技术股份有限公司 Disaster recovery switching method and device based on DNS (Domain name System), electronic equipment and storage medium
CN112929221A (en) * 2021-03-02 2021-06-08 浪潮云信息技术股份公司 Method for realizing disaster tolerance of main and standby cloud service products
CN115309497A (en) * 2021-05-08 2022-11-08 中国移动通信集团浙江有限公司 Request scheduling method, device, equipment and storage medium
CN115640096A (en) * 2021-07-20 2023-01-24 中国电信股份有限公司 Application management method and device based on kubernets and storage medium
CN116302352A (en) * 2023-03-16 2023-06-23 中国建设银行股份有限公司 Cluster disaster recovery processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN116996369A (en) 2023-11-03

Similar Documents

Publication Publication Date Title
CN116996369B (en) Containerized management server, main and standby management method and device thereof, and storage medium
US9791908B2 (en) Systems and methods for protecting virtualized assets
CN111917846A (en) Kafka cluster switching method, device and system, electronic equipment and readable storage medium
CN110162424B (en) Fault processing method, system, device and storage medium
US10936450B2 (en) High availability and disaster recovery system architecture
AU2017282817A1 (en) Data processing method and device
CN107666493B (en) Database configuration method and equipment thereof
CN113407383B (en) Main and standby system switching method and device, server and main and standby system
CN116302352A (en) Cluster disaster recovery processing method and device, electronic equipment and storage medium
CN114625566A (en) Data disaster tolerance method and device, electronic equipment and storage medium
CN117194338A (en) Processing method, device, equipment and storage medium for distributed log data
CN116541461A (en) Data processing method, device, equipment and storage medium applied to database
CN113596197B (en) Address switching method and device, electronic equipment and storage medium
CN116192885A (en) High-availability cluster architecture artificial intelligent experiment cloud platform data processing method and system
CN115827316A (en) Data backup method, device, equipment and storage medium
CN110768855B (en) Method and device for testing linkmzation performance
CN117033084B (en) Virtual machine backup method and device, electronic equipment and storage medium
CN111835857B (en) Method and apparatus for accessing data
CN115550424B (en) Data caching method, device, equipment and storage medium
CN107645415B (en) Method and device for keeping data consistency between OpenStack server and equipment
CN106469155A (en) A kind of basic data processing method, apparatus and system
CN117648077A (en) Code antiseptic method, system, electronic equipment and storage medium
CN117874142A (en) Cloud database cluster management method and system, electronic equipment and storage medium
CN117033489A (en) Resource conversion method, device, equipment and medium
CN117632601A (en) Master-slave machine database switching method, device, equipment and storage medium

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