Method and system for realizing high availability of nodes, computer equipment and storage medium

By deploying multiple network monitoring and high availability services on cluster nodes, the network status of the management network, business network, and storage network is monitored, and actions are executed according to the high availability configuration file. This solves the problem of low monitoring accuracy and reliability in existing technologies and enables flexible high availability service configuration and dynamic updates.

CN118590422AActive Publication Date: 2024-09-03JINAN INSPUR DATA TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410873967.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-01
Publication Date
2024-09-03
Estimated Expiration
2044-07-01

AI Technical Summary

Technical Problem

In existing technologies, cluster network monitoring based on the OpenStack cloud platform is limited because the heartbeat network is only deployed on the management network. This results in the inability to operate virtual machines on physical hosts when the management network is disconnected, leading to low accuracy of monitoring data. Furthermore, it cannot monitor failures in the storage network and business network, resulting in low network monitoring reliability. Additionally, the high availability service configuration is fixed and cannot be modified.

Method used

Deploy multiple network monitoring and high availability services for nodes in the cluster. Use high availability configuration files to represent the correspondence between network status and high availability actions. Monitor the network status of the management network, business network and storage network respectively, and execute target high availability actions according to the current network status. Support network reuse status and storage network monitoring of Fibre Channel connections.

Benefits of technology

It improves the accuracy and reliability of monitoring nodes and cluster networks, can respond to network problems, supports flexible high-availability service configuration and dynamic updates, and adapts to complex network environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118590422A
    Figure CN118590422A
Patent Text Reader

Abstract

The invention relates to the technical field of network monitoring, and discloses a node high availability realization method and system, computer equipment and a storage medium, and the method comprises the steps: deploying a plurality of network monitoring services and high availability services for each node in a cluster; a high-availability configuration file is configured in the high-availability service, and the high-availability configuration file is used for representing the corresponding relation between the network state of each network in the node and the high-availability action; acquiring a current network state of each network in the node based on the network monitoring service; and determining and executing a target high-availability action corresponding to the node based on the high-availability configuration file and the current network state of each network in the node. Thus, the states of different networks in the node are monitored through the multiple network monitoring services, the corresponding target high-availability action is executed through the high-availability service, network monitoring of the node and execution of the high-availability action are separated, various networks of the node can be monitored at the same time, and the monitoring accuracy of the node is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network monitoring, and in particular to a method, system, computer equipment and storage medium for realizing high availability of nodes. Background Art

[0002] Currently, cluster network monitoring is usually built on the OpenStack cloud platform, mainly monitoring the heartbeat between servers and computing nodes. Usually, since the default heartbeat network is only deployed on the management network, if the management network is disconnected, users cannot start or shut down the virtual machines on the physical host that is disconnected from the management network, resulting in low accuracy of monitoring data. Summary of the invention

[0003] In view of this, the present invention provides a method, system, computer device and storage medium for realizing high availability of nodes to solve the problem of low monitoring accuracy of nodes.

[0004] In a first aspect, the present invention provides a method for implementing node high availability, which is applied to a system for implementing node high availability, and the method includes:

[0005] Multiple network monitoring services and high availability services are deployed for each node in the cluster; multiple network monitoring services are used to monitor the network status of different networks in the node; high availability services are configured with high availability configuration files, which are used to characterize the correspondence between the network status of each network in the node and the high availability action;

[0006] Based on the network monitoring service, obtain the current network status of each network in the node;

[0007] Based on the high availability configuration file and the current network status of each network in the node, determine and execute the target high availability action corresponding to the node.

[0008] In this way, the current network status of different networks in the node can be monitored through multiple network monitoring services, and the corresponding target high-availability actions can be determined and executed according to the current network status of each network in the node through the high-availability service, thereby separating the network monitoring of the node and the execution of the high-availability action. It is possible to monitor various networks of the node at the same time, improve the monitoring accuracy of the node, and because the corresponding high-availability actions are executed through a separate high-availability service, a response can still be generated when a problem occurs in the node network, thereby improving the reliability of the node and cluster network.

[0009] In an optional implementation, the network in the node includes a management network, a business network and a storage network, and the network monitoring service includes a management network monitoring service, a business network monitoring service and a storage network monitoring service; based on the network monitoring service, obtaining the current network status of each network in the node includes:

[0010] Based on the management network monitoring service, the management network of the node is monitored to obtain the current management network status of the node;

[0011] Based on the business network monitoring service, the business network of the node is monitored to obtain the current business network status of the node;

[0012] Based on the storage network monitoring service, the storage network of the node is monitored to obtain the current storage network status of the node.

[0013] In this way, the network status of the management network, business network and storage network of the node can be monitored respectively through the management network monitoring service, business network monitoring service and storage network monitoring service, thereby realizing the monitoring of the network status of different networks in the node.

[0014] In an optional implementation, if there is a first node in the cluster, and at least two of the multiple networks of the first node are implemented based on the same physical network device, then based on the network monitoring service, obtaining the current network status of each network in the node includes:

[0015] The non-multiplexed network is monitored based on a network monitoring service corresponding to the non-multiplexed network to obtain a current non-multiplexed network state of the first node; the non-multiplexed network is a network corresponding to a physical network device that implements a network in the first node;

[0016] The multiplexing network is monitored based on a network monitoring service corresponding to any network in the multiplexing network to obtain the current multiplexing network state of the first node; the multiplexing network is a network corresponding to a physical network device that implements at least two networks in the first node.

[0017] In this way, when a node has a reused network, the network states of the reused networks are merged into one network state, so that corresponding high-availability actions can be planned and executed according to the network reuse situation, thereby improving the network reliability of the node and the cluster.

[0018] In an optional implementation, if there is a second node in the cluster, and the second node is connected to the storage network using a fiber channel, then based on the network monitoring service, obtaining the current network status of each network in the node also includes:

[0019] Detecting the port state of the optical fiber port of the second node to determine the port state of the optical fiber port;

[0020] Based on the port status, a current storage network status of the second node is determined.

[0021] In this way, when the storage network uses Fibre Channel to access the node, the network status of the storage network is determined by detecting the port status of the optical port, thereby improving the comprehensiveness and applicability of node network monitoring.

[0022] In an optional implementation, multiple network monitoring services and high availability services are deployed for each node in the cluster, including:

[0023] Build the image files of the network monitoring service and the fault handling service, and push them to the image repository corresponding to the operating environment of the cluster;

[0024] Check the network configuration information of each network in the node; the network in the node includes the management network, business network and storage network;

[0025] If network configuration information is detected, node configuration information of each node is obtained, and node configuration files corresponding to each node are generated based on the node configuration information;

[0026] Mount the node configuration file and start the management network monitoring service, business network monitoring service and storage network monitoring service in the network monitoring service; the management network monitoring service is used to monitor the network status of the node's management network; the business network monitoring service is used to monitor the network status of the node's business network; the storage network monitoring service is used to monitor the network status of the node's storage network;

[0027] Obtain high availability configuration information, and generate a high availability configuration file based on the high availability configuration information;

[0028] Mount the high availability configuration file in the fault handling service to start the high availability service.

[0029] In this way, the network monitoring service and fault handling service are deployed in the node in the form of an image file. When the network monitoring service or fault handling service needs to be deployed in the node, the deployment can be completed directly by configuring the image file, thereby achieving flexible configuration and deployment of the network monitoring service and fault handling service; at the same time, the high availability service is started by mounting the high availability configuration file in the fault handling service, making the configuration and implementation of the high availability service more flexible.

[0030] In an optional implementation, based on the high availability configuration file and the current network status of each network in the node, determining and executing a target high availability action corresponding to the node includes:

[0031] Based on the matching of the current network status of each network in the node with the high availability configuration file, the high availability action corresponding to the current network status of each network is determined;

[0032] The high availability action corresponding to the current network status of each network is determined as the target high availability action, and the target high availability action is executed.

[0033] In this way, the high availability action corresponding to the current network status is determined according to the configuration of the high availability action in the high availability configuration file.

[0034] In an optional embodiment, the method further includes:

[0035] In response to the high availability modification information of the target node, obtaining high availability configuration information;

[0036] Based on the high availability configuration information, update the high availability configuration file;

[0037] Mount the updated high availability configuration file in the fault handling service of the target node to update the high availability service of the target node.

[0038] In this way, the high availability configuration file can be updated to update the high availability service, thereby improving the flexibility of the high availability service.

[0039] In a second aspect, the present invention provides a system for implementing high availability of nodes, the system comprising:

[0040] A node, a plurality of network monitoring modules and a high availability module; the node is connected to the plurality of network monitoring modules respectively, and the plurality of network monitoring modules are connected to the high availability module respectively;

[0041] Network monitoring services are deployed in multiple network monitoring modules respectively, and the network status of the node is obtained through the network monitoring service, and the network status is reported to the high availability module;

[0042] A high availability service is deployed in the high availability module, and a high availability configuration file is configured in the high availability service. The high availability configuration file is used to characterize the correspondence between the network status of the node and the high availability action; the high availability module obtains the network status reported by multiple network monitoring modules, and determines and executes the high availability action corresponding to the node based on the high availability configuration file and the network status.

[0043] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the node high availability implementation method of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0044] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for implementing node high availability of the above-mentioned first aspect or any corresponding embodiment thereof.

[0045] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the method for implementing node high availability of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0047] Figure 1 is a flow chart of a method for implementing high availability of nodes according to an embodiment of the present invention;

[0048] Figure 2 is a flow chart of another method for implementing high availability of a node according to an embodiment of the present invention;

[0049] Figure 3 is a flow chart of another method for implementing high availability of a node according to an embodiment of the present invention;

[0050] Figure 4 is a schematic diagram of deploying an image file in a method for implementing high availability of a node according to an embodiment of the present invention;

[0051] Figure 5 is a schematic diagram of starting a network monitoring service and a high availability service in a method for implementing node high availability according to an embodiment of the present invention;

[0052] Figure 6 is a flowchart of another method for implementing high availability of a node according to an embodiment of the present invention;

[0053] Figure 7 is a schematic diagram of a high availability configuration file in a method for implementing high availability of a node according to an embodiment of the present invention;

[0054] Figure 8 is a structural block diagram of a system for implementing high availability of nodes according to an embodiment of the present invention;

[0055] Fig. 9 It is a schematic diagram of a system for implementing high availability of nodes according to an embodiment of the present invention;

[0056] Fig.10 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0058] Currently, the monitoring of cluster networks is usually built based on the OpenStack cloud platform, mainly monitoring the heartbeat between servers and computing nodes. Usually, since the default heartbeat network is only deployed on the management network, if the management network is disconnected, users cannot perform operations such as opening and closing virtual machines on the physical host that is disconnected from the management network, resulting in low accuracy of monitoring data. In addition, since the heartbeat network is only deployed on the management network, it is impossible to take into account the situation when the storage network and business network fail, resulting in low reliability of network monitoring of nodes. In addition, since the on-site network environment is usually complex and the network reuse is relatively complex, the matrix of high-availability services configured in related technologies is usually fixed and cannot be modified, and it is impossible to set high-availability actions according to specific network planning, resulting in high-availability services being unable to make accurate host evacuation actions.

[0059] Based on this, an embodiment of the present invention provides a method for realizing high availability of nodes, which is applied to a system for realizing high availability of nodes, and the method includes: deploying multiple network monitoring services and high availability services for each node in a cluster respectively; multiple network monitoring services are used to monitor the network status of different networks in the node; a high availability configuration file is configured in the high availability service, and the high availability configuration file is used to characterize the corresponding relationship between the network status of each network in the node and the high availability action; based on the network monitoring service, the current network status of each network in the node is obtained; based on the high availability configuration file and the current network status of each network in the node, the target high availability action corresponding to the node is determined and executed. In this way, the current network status of different networks in the node can be monitored through multiple network monitoring services, and the corresponding target high availability action can be determined and executed according to the current network status of each network in the node through the high availability service, so that the network monitoring of the node and the execution of the high availability action are separated, and various networks of the node can be monitored at the same time, so as to improve the monitoring accuracy of the node, and because the corresponding high availability action is executed by a separate high availability service, a response can still be generated when a problem occurs in the network of the node, thereby improving the reliability of the node and the cluster network.

[0060] According to an embodiment of the present invention, an embodiment of a method for realizing high availability of a node is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0061] In this embodiment, a method for implementing high availability of a node is provided, which can be used in a system for implementing high availability of a node. Figure 1 is a flowchart of a method for implementing high availability of nodes according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0062] Step S101 , deploy multiple network monitoring services and high availability services for each node in the cluster.

[0063] In the embodiment of the present invention, multiple network monitoring services are used to monitor the network status of different networks in the node. A high availability configuration file is configured in the high availability service, and the high availability configuration file is used to characterize the correspondence between the network status of each network in the node and the high availability action. The high availability action that needs to be executed for the current network status of the node can be determined through the high availability configuration file.

[0064] In an optional implementation, the network detection service can be implemented through the consul service. The consul service is a service discovery and configuration management center service. The consul service has a built-in service registration and discovery framework, distributed consistency protocol implementation, health check, Key / Value storage, multi-data center solution, etc. It can provide any number of health checks, which can be associated with a given service or a local node.

[0065] In an optional implementation, corresponding network monitoring services are deployed corresponding to different networks in the node to monitor the network status of the corresponding network respectively, and report the network status to the high availability service to determine the high availability action that needs to be performed currently through the high availability service.

[0066] In an optional implementation, the high availability service can be implemented based on the fault handling service masakari, by mounting the high availability configuration file in the fault handling service masakari, starting the high availability service, and realizing automatic failover and recovery by monitoring the computing nodes and virtual machine instances, so as to improve the stability and reliability of the cloud infrastructure. Masakari can continuously monitor the status of computing nodes and virtual machine instances. When a fault or abnormality is found, it will trigger the automatic fault handling process, automatically migrate the affected virtual machine instances to other healthy computing nodes, thereby reducing the service interruption time, and can also send notifications and alarm information to the administrator, so that the administrator can take timely countermeasures to ensure the normal operation of the cloud environment.

[0067] In an optional implementation, the deployment of network monitoring services and high-availability services is based on the OpenStack cloud platform. The OpenStack cloud platform is an open source cloud computing platform that can provide a variety of cloud computing services and build cloud infrastructure. The method of implementing high-availability services in related technologies is usually to deploy masakari's host high-availability solution on the OpenStack cloud platform, use masakari to build high-availability services, and monitor the network status of nodes in the cluster and perform high-availability actions. The high-availability actions configured in the high-availability service are fixed and cannot be modified. In the embodiment of the present invention, a high-availability configuration file is configured in the high-availability service built by masakari, and the high-availability configuration file itself can be modified, thereby achieving flexible configuration of high-availability services.

[0068] Step S102: Based on the network monitoring service, the current network status of each network in the node is obtained.

[0069] In an embodiment of the present invention, a real-time health check is performed on each network based on the network monitoring service corresponding to each network configured in the node, so as to obtain the current network status of each network in the node. At the same time, the network monitoring service will report the monitored current network status to the high availability service, and the high availability service will determine the high availability action that needs to be performed currently.

[0070] Step S103: Based on the high availability configuration file and the current network status of each network in the node, determine and execute the target high availability action corresponding to the node.

[0071] In an embodiment of the present invention, the high availability service obtains the current network status of the corresponding network reported by each network monitoring service, and compares and matches it with the network status and high availability action configured in the high availability configuration file, determines the target high availability action corresponding to the node under the current network status, and executes the target high availability action to realize high availability function and ensure the reliability of nodes and clusters.

[0072] In an optional implementation, the high availability actions configured in the high availability configuration file can be configured based on the HA (Highly Available) policy. The high availability policy is used to ensure that the computing system or service remains available and continues to provide services in the face of hardware failures, software problems or other unexpected situations. It may include the following strategies: using redundant components to take over work to ensure the continuity of services. This strategy requires setting up redundant components to achieve redundant deployment; migrating workloads from failed nodes to healthy standby nodes to achieve seamless failover; distributing traffic to multiple servers or nodes to achieve load balancing, avoid overloading a single node, and improve the overall availability and performance of the system; regularly backing up critical data and replicating data at multiple locations or storage media to prevent data loss and support rapid data recovery; based on a preset fault recovery plan, restore business and continue operation when a fault occurs; set up an alarm mechanism to alarm for fault conditions.

[0073] In an optional implementation, the high availability actions in the high availability configuration file can be set according to the specific configuration of the node, that is, the high availability configuration files of different node configurations can be different, so the customized deployment of high availability services for different nodes can be realized, and the flexibility of high availability deployment can be improved. At the same time, when initially deploying network monitoring services and high availability services for nodes in the cluster, a common high availability configuration file can be used to deploy high availability services for nodes in the cluster, so as to quickly complete the deployment of network monitoring services and high availability services.

[0074] In an optional implementation, after the high-availability service is deployed on the node, the high-availability configuration file configured in the high-availability service can also be updated, that is, even if the high-availability service is deployed on the node, it can be updated after deployment, thereby achieving high flexibility and dynamic configurability of the high-availability service. Specifically, in response to the high-availability modification information of the target node, the high-availability configuration information is obtained; based on the high-availability configuration information, the high-availability configuration file is updated; the updated high-availability configuration file is mounted in the fault handling service of the target node to update the high-availability service of the target node. Among them, the target node is a node that needs to update the high-availability service. After responding to the high-availability modification information, the updated high-availability configuration information of the target node is obtained, and the high-availability configuration file is regenerated according to the updated high-availability configuration information, thereby completing the update of the high-availability configuration file, and at the same time, the updated high-availability configuration file is mounted in the fault handling service of the target node to complete the update of the high-availability service of the target node, thereby improving the flexibility of the high-availability service.

[0075] The implementation method of node high availability provided by the embodiment of the present invention is to deploy multiple network monitoring services and high availability services for each node in the cluster respectively; the multiple network monitoring services are used to monitor the network status of different networks in the node; the high availability service is configured with a high availability configuration file, and the high availability configuration file is used to characterize the correspondence between the network status of each network in the node and the high availability action; based on the network monitoring service, the current network status of each network in the node is obtained; based on the high availability configuration file and the current network status of each network in the node, the target high availability action corresponding to the node is determined and executed. In this way, the current network status of different networks in the node can be monitored through multiple network monitoring services, and the corresponding target high availability action is determined and executed according to the current network status of each network in the node through the high availability service, thereby separating the network monitoring of the node and the execution of the high availability action, and being able to monitor various networks of the node at the same time, improving the monitoring accuracy of the node, and because the corresponding high availability action is executed through a separate high availability service, a response can still be generated when a problem occurs in the node network, thereby improving the reliability of the node and the cluster network.

[0076] In this embodiment, a method for implementing high availability of a node is provided, which can be used in a system for implementing high availability of a node. Figure 2 FIG. 4 is a flowchart of another method for implementing high availability of a node according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0077] Step S201, deploy multiple network monitoring services and high availability services for each node in the cluster. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.

[0078] Step S202: Based on the network monitoring service, the current network status of each network in the node is obtained.

[0079] In the embodiment of the present invention, the network in the node may include a management network, a business network and a storage network. Accordingly, the network monitoring service includes a management network monitoring service, a business network monitoring service and a storage network monitoring service.

[0080] Then, the above step S202 may include the following steps:

[0081] Step S2021: Perform network monitoring on the management network of the node based on the management network monitoring service to obtain the current management network status of the node.

[0082] In the embodiment of the present invention, the management network monitoring service performs network monitoring on the management network of the node, obtains the current management network status of the node, and reports it to the high availability service.

[0083] Step S2022: Perform network monitoring on the service network of the node based on the service network monitoring service to obtain the current service network status of the node.

[0084] In the embodiment of the present invention, the service network monitoring service performs network monitoring on the service network of the node, obtains the current service network status of the node, and reports it to the high availability service.

[0085] Step S2023: Perform network monitoring on the storage network of the node based on the storage network monitoring service to obtain the current storage network status of the node.

[0086] In the embodiment of the present invention, the storage network monitoring service performs network monitoring on the management network of the node, obtains the current storage network status of the node, and reports it to the high availability service.

[0087] Therefore, through the above method, the network status of the management network, business network and storage network of the node are monitored respectively through the management network monitoring service, the business network monitoring service and the storage network monitoring service, thereby realizing the monitoring of the network status of different networks in the node.

[0088] In an optional implementation, if there is a first node in the cluster, and at least two of the multiple networks of the first node are implemented based on the same physical network device, that is, there is network reuse in the first node, then the above step S202 has the following two situations:

[0089] In the first case, for a non-multiplexed network, that is, a network corresponding to a physical network device implementing a network in the first node, the non-multiplexed network is monitored based on a network monitoring service corresponding to the non-multiplexed network to obtain the current non-multiplexed network status of the first node.

[0090] In the second case, for the multiplexed network, that is, the network corresponding to the physical network device that implements at least two networks in the first node, the multiplexed network is monitored based on the network monitoring service corresponding to any network in the multiplexed network to obtain the current multiplexed network status of the first node.

[0091] Therefore, through the above method, when a node has a reused network, the network states of the reused networks are merged into one network state, so that corresponding high-availability actions can be planned and executed according to the network reuse situation, thereby improving the network reliability of the node and the cluster.

[0092] In an optional implementation, if a multiplexed network exists on the node, the high-availability configuration file may be modified accordingly to perform high-availability service-related adaptation on the multiplexed network.

[0093] In an optional implementation, if there is a second node in the cluster, and the second node uses a fiber channel to connect to the storage network, the second node no longer monitors the network status of the storage network through the storage network monitoring service, but monitors through the port status of the fiber port. Specifically, the port status of the fiber port of the second node is detected to determine the port status of the fiber port; based on the port status, the current storage network status of the second node is determined. Therefore, when the storage network uses a fiber channel to access the node, the network status of the storage network is determined by detecting the port status of the optical port, thereby improving the comprehensiveness and applicability of node network monitoring.

[0094] Step S203: Based on the high availability configuration file and the current network status of each network in the node, determine and execute the target high availability action corresponding to the node. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.

[0095] In this embodiment, a method for implementing high availability of a node is provided, which can be used in a system for implementing high availability of a node. Figure 3 FIG. 4 is a flowchart of another method for implementing high availability of a node according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0096] Step S301 , deploy multiple network monitoring services and high availability services for each node in the cluster.

[0097] Specifically, step S301 may include the following steps:

[0098] Step S3011, constructing image files of the network monitoring service and the fault handling service, and pushing the image files of the network monitoring service and the fault handling service to the image repository corresponding to the operating environment of the cluster.

[0099] In the embodiment of the present invention, the image files of the network monitoring service consul service and the fault handling service masakari service are respectively constructed, and the image files of the network monitoring service consul service and the fault handling service masakari service are pushed to the image warehouse corresponding to the operating environment of the cluster, that is, the image warehouse corresponding to the OpenStack environment. By mirroring them and pushing them to the image warehouse, when the network monitoring service and the fault handling service are deployed on each node in the cluster, the image files in the image warehouse can be directly called to complete the deployment of the network monitoring service and the fault handling service.

[0100] In an optional implementation, when deploying network monitoring services and fault handling services to each node in the cluster, the nodes on which the network monitoring services and fault handling services need to be deployed can be listed through a node list, and the deployment of the network monitoring services and fault handling services can be completed based on the node list. In an optional implementation, an inventory file can be used as a node list, and the configuration of the nodes on which the relevant services need to be deployed can be completed by listing the name, IP, address or configuration information of the nodes in the inventory file, and then according to the relevant information in the inventory file, the image files in the image repository are pushed to the nodes contained in the inventory file, thereby completing the deployment of the network detection service and fault handling service on the nodes.

[0101] Figure 4 Schematic diagram of deploying image files in a method for implementing high availability of nodes according to an embodiment of the present invention. Figure 4 The deployment of the image file in the embodiment of the present invention to deploy the network monitoring service and the fault handling service in the node is further described. Figure 4 As shown, centos8.2 is selected as the container base image, and the consul executable file of the network monitoring service is integrated and installed in the base image to build a consul image; the masakari-related code and the parsing algorithm of the high-availability action matrix are integrated in the base image to build a masakari image; the consul image and the masakari image are pushed to the image repository corresponding to the OpenStack environment. Then, by specifying the node where the service needs to be deployed in the inventory file, the consul image and the masakari image in the image repository are pushed to the corresponding node, so that the network monitoring service and the fault handling service are deployed in the node. Optionally, when deploying the network monitoring service and the fault handling service in the node, you can also add a switch in the global control file to determine whether to enable high availability, so that the high-availability service can be turned on and off by the switch.

[0102] Figure 5 is a schematic diagram of starting a network monitoring service and a high availability service in a method for implementing node high availability according to an embodiment of the present invention, such as Figure 5 As shown, after the image files of the network monitoring service and the fault handling service are deployed to the node, the network monitoring service and the high availability service need to be started in the node, as shown in the following steps S3012 to S3016.

[0103] Step S3012, detecting the network configuration information of each network in the node.

[0104] In an embodiment of the present invention, the network in the node includes a management network, a business network, and a storage network. The network configuration information of the management network, the business network, and the storage network is detected respectively to determine whether the configuration of the management network, the business network, and the storage network has been completed in each node. If the network configuration information of each network is detected, it means that the node has completed the configuration of each network and has been connected to each network; if the network configuration information of each network is not detected or only the network configuration information of some of the networks is detected, it means that the node has not completed the configuration of each network and the network is not fully connected. At this time, a feedback reminder is given to remind the user that the management network, the business network, and the storage network have not been configured.

[0105] Step S3013: If network configuration information is detected, node configuration information of each node is obtained, and node configuration files corresponding to each node are generated based on the node configuration information.

[0106] In an embodiment of the present invention, if network configuration information is detected, the node can be further configured to start the network monitoring service and the high availability service. First, the node configuration information of each node is obtained, and the node configuration files corresponding to each node are generated based on the node configuration information, so as to facilitate the subsequent startup of the network monitoring service and the high availability service. Among them, the node configuration information includes the configuration information of the node's network card, network, and host, and the node configuration file can be a configmap file.

[0107] Step S3014, mount the node configuration file, and start the management network monitoring service, business network monitoring service and storage network monitoring service in the network monitoring service.

[0108] In the embodiment of the present invention, the management network monitoring service is used to monitor the network status of the management network of the node, the business network monitoring service is used to monitor the network status of the business network of the node, and the storage network monitoring service is used to monitor the network status of the storage network of the node. Mount the node configuration file, and then start the consul-manager pod service respectively, thereby starting the management network monitoring service to monitor the network status of the management network; start the consul-storage pod service, thereby starting the storage network monitoring service to monitor the network status of the storage network; start the consul-tenant pod service, thereby starting the business network monitoring status and monitoring the business network monitoring status.

[0109] Step S3015: obtain high availability configuration information, and generate a high availability configuration file based on the high availability configuration information.

[0110] In the embodiment of the present invention, high availability configuration information is obtained, and a high availability configuration file is generated based on the high availability configuration information. The high availability configuration file may be a configmap file. Optionally, the high availability configuration information may be obtained by parsing the obtained high availability action matrix configuration file.

[0111] Step S3016: mount the high availability configuration file in the fault handling service to start the high availability service.

[0112] In the embodiment of the present invention, a high-availability configuration file is mounted in the fault handling service masakari, thereby starting the high-availability service. Thus, through the above method, the network monitoring service and the fault handling service are deployed in the node in the form of an image file, and when it is necessary to deploy the network monitoring service or the fault handling service in the node, the deployment can be completed directly in the form of configuring the image file, thereby realizing flexible configuration and deployment of the network monitoring service and the fault handling service; at the same time, the high-availability service is started by mounting the high-availability configuration file in the fault handling service, thereby making the configuration and implementation of the high-availability service more flexible.

[0113] Step S302: Based on the network monitoring service, obtain the current network status of each network in the node. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.

[0114] Step S303: Based on the high availability configuration file and the current network status of each network in the node, determine and execute the target high availability action corresponding to the node. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.

[0115] In this embodiment, a method for implementing high availability of nodes is provided, which can be used in a system for implementing high availability of nodes. Figure 6 FIG. 4 is a flowchart of another method for implementing high availability of a node according to an embodiment of the present invention. Figure 6 As shown, the process includes the following steps:

[0116] Step S601: deploy multiple network monitoring services and high availability services to each node in the cluster. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.

[0117] Step S602: Based on the network monitoring service, obtain the current network status of each network in the node. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.

[0118] Step S603: Based on the high availability configuration file and the current network status of each network in the node, determine and execute the target high availability action corresponding to the node.

[0119] Specifically, step S603 may include the following steps:

[0120] Step S6031, based on matching the current network status of each network in the node with the high availability configuration file, determine the high availability action corresponding to the current network status of each network.

[0121] In the embodiment of the present invention, Figure 7 is a schematic diagram of a high availability configuration file in a method for implementing high availability of a node according to an embodiment of the present invention, such as Figure 7 As shown, the high availability configuration file can include the network status of each network, and the network status of each network constitutes a group of network status, and a group of network status corresponds to a high availability action. Figure 7 As shown in the figure, management interface corresponds to the network status of the management network, tenant interface corresponds to the network status of the business network, storage interface corresponds to the network status of the storage network, and actions correspond to high availability actions. In the high availability configuration file, up and down represent different network states, where up represents a normal network state and down represents an abnormal network state. Recovery and report represent different high availability actions, respectively. Figure 7 The above is only an example. In actual applications, you can configure it according to the needs of the cluster or node.

[0122] In an optional implementation, the high availability configuration file may only configure situations where a response is required, that is, for some situations where high availability actions are not required, the corresponding network status may not be configured in the high availability configuration file, so as to reduce the amount of data contained in the high availability configuration file and improve the efficiency of determining high availability actions. Figure 7 As shown in , corresponding to some situations where high availability actions are not required, the action configuration is the same as Figure 7 The action configurations when the management network, business network, and storage network are all in normal status (up) are consistent, that is, the network status is listed in the high availability configuration file, but the corresponding actions are not executed, so as to ensure the integrity of the configuration of the network status in the high availability configuration file and improve the reliability of the high availability configuration file.

[0123] Step S6032: determine the high availability action corresponding to the current network status of each network as the target high availability action, and execute the target high availability action.

[0124] In the embodiment of the present invention, the high availability action corresponding to the current network state of each network in the high availability configuration file is determined as the target high availability action, and the target high availability action is executed. Thus, according to the configuration of the high availability action in the high availability configuration file, the high availability action corresponding to the current network state is determined and executed.

[0125] In this embodiment, a system for realizing high availability of nodes is also provided, and the system is used to realize the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are not repeated here. As used below, the term "module" can realize a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably realized in software, the realization of hardware, or a combination of software and hardware is also possible and conceived.

[0126] This embodiment provides a system for implementing high availability of nodes, such as Figure 8 As shown, including:

[0127] Node 801, multiple network monitoring modules 802 and high availability module 803; Node 801 is connected to multiple network monitoring modules 802 respectively, and multiple network monitoring modules 802 are connected to high availability module 803 respectively. In which, multiple network monitoring modules 802 are respectively deployed with network monitoring services, obtain the network status of the node through the network monitoring service, and report the network status to high availability module 803; high availability service is deployed in high availability module 803, and high availability configuration file is configured in the high availability service, and the high availability configuration file is used to characterize the correspondence between the network status of the node and the high availability action; high availability module 803 obtains the network status reported by multiple network monitoring modules, and determines and executes the high availability action corresponding to the node based on the high availability configuration file and the network status.

[0128] In an optional embodiment, Fig. 9 Schematic diagram of a system for implementing high availability of nodes according to an embodiment of the present invention. Fig. 9 As shown in the figure, each node includes a management network, a tenant business network, and a storage network. Each network is connected to a host (nova-computer), which is configured with a client (consul client) of the network monitoring service to connect to the cluster to participate in service discovery, health checks, and configuration management. Each network is also connected to a network monitoring service (consul server). The network monitoring service monitors the status of its corresponding network. The monitoring software (hostmonitor) regularly polls the network monitoring service to monitor the network status and reports it to the high availability service (masakari). The high availability service performs the corresponding high availability action according to the high availability configuration file configured therein.

[0129] In an optional implementation, in the absence of network reuse, each node and each network has its own corresponding network monitoring service, and the monitoring software and high availability service corresponding to the network monitoring service can be shared. Optionally, for a cluster, it can also share monitoring software and / or high availability services, but each network of each node in the cluster uses a separate network monitoring service.

[0130] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0131] The node high availability implementation system in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0132] The embodiment of the present invention also provides a computer device having the above Figure 8 or Fig. 9 The node high availability implementation system shown.

[0133] See also Fig.10 , Fig.10 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig.10 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.10 A processor 10 is taken as an example.

[0134] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0135] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0136] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0137] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0138] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0139] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0140] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0141] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for implementing high availability of a node, characterized in that: Applied to a system for implementing high availability of nodes, the method includes: Deploy multiple network monitoring services and high availability services for each node in the cluster respectively; the multiple network monitoring services are used to monitor the network status of different networks in the node; the high availability service is configured with a high availability configuration file, and the high availability configuration file is used to characterize the correspondence between the network status of each network in the node and the high availability action; Based on the network monitoring service, obtaining the current network status of each network in the node; Based on the high availability configuration file and the current network status of each network in the node, a target high availability action corresponding to the node is determined and executed.

2. The method according to claim 1, characterized in that The network in the node includes a management network, a business network and a storage network, and the network monitoring service includes a management network monitoring service, a business network monitoring service and a storage network monitoring service; The obtaining, based on the network monitoring service, the current network status of each network in the node includes: Performing network monitoring on the management network of the node based on the management network monitoring service to obtain the current management network status of the node; Performing network monitoring on the service network of the node based on the service network monitoring service to obtain a current service network status of the node; Based on the storage network monitoring service, network monitoring is performed on the storage network of the node to obtain the current storage network status of the node.

3. The method according to claim 1, characterized in that: If there is a first node in the cluster, and at least two of the multiple networks of the first node are implemented based on the same physical network device, then obtaining the current network status of each network in the node based on the network monitoring service includes: Monitoring the non-multiplexed network based on a network monitoring service corresponding to the non-multiplexed network to obtain a current non-multiplexed network state of the first node; the non-multiplexed network is a network corresponding to a physical network device that implements a network in the first node; The multiplexing network is monitored based on a network monitoring service corresponding to any network in the multiplexing network to obtain a current multiplexing network state of the first node; the multiplexing network is a network corresponding to a physical network device that implements at least two networks in the first node.

4. The method according to claim 1, characterized in that If there is a second node in the cluster, and the second node is connected to a storage network using a fiber channel, then obtaining the current network status of each network in the node based on the network monitoring service also includes: Detecting the port status of the optical fiber port of the second node to determine the port status of the optical fiber port; Based on the port status, a current storage network status of the second node is determined.

5. The method according to claim 1, characterized in that The multiple network monitoring services and high availability services are deployed for each node in the cluster, including: Constructing the image files of the network monitoring service and the fault handling service, and pushing the image files of the network monitoring service and the fault handling service to the image warehouse corresponding to the operating environment of the cluster; Detecting network configuration information of each network in the node; the network in the node includes a management network, a service network and a storage network; If the network configuration information is detected, node configuration information of each of the nodes is obtained, and based on the node configuration information, node configuration files corresponding to each of the nodes are generated respectively; Mount the node configuration file, and start the management network monitoring service, the business network monitoring service and the storage network monitoring service in the network monitoring service; the management network monitoring service is used to monitor the network status of the management network of the node; the business network monitoring service is used to monitor the network status of the business network of the node; the storage network monitoring service is used to monitor the network status of the storage network of the node; Acquire high availability configuration information, and generate the high availability configuration file based on the high availability configuration information; The high availability configuration file is mounted in the fault handling service to start the high availability service.

6. The method according to claim 1, characterized in that The determining and executing a target high availability action corresponding to the node based on the high availability configuration file and the current network status of each network in the node includes: Based on matching the current network status of each network in the node with the high availability configuration file, determine the high availability action corresponding to the current network status of each network; The high availability action corresponding to the current network status of each network is determined as the target high availability action, and the target high availability action is executed.

7. The method according to claim 1, characterized in that The method further comprises: In response to the high availability modification information of the target node, obtaining high availability configuration information; Based on the high availability configuration information, updating the high availability configuration file; The updated high availability configuration file is mounted in the fault handling service of the target node to update the high availability service of the target node.

8. A system for implementing high node availability, characterized in that: The system comprises: A node, a plurality of network monitoring modules and a high availability module; the node is connected to the plurality of network monitoring modules respectively, and the plurality of network monitoring modules are connected to the high availability module respectively; A network monitoring service is deployed in each of the plurality of network monitoring modules, the network status of the node is obtained through the network monitoring service, and the network status is reported to the high availability module; A high availability service is deployed in the high availability module, and a high availability configuration file is configured in the high availability service. The high availability configuration file is used to characterize the correspondence between the network status of the node and the high availability action; the high availability module obtains the network status reported by multiple network monitoring modules, and determines and executes the high availability action corresponding to the node based on the high availability configuration file and the network status.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the node high availability implementation method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for implementing node high availability according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • OpenStack virtual machine high-availability system capable of preventing brain split

    CN109614201A

  • Server state detection method, device and equipment and readable storage medium

    CN114020557A

  • Management method and device of cloud native all-in-one machine, electronic equipment and storage medium

    CN116248484A

  • Operating method of distributed multi-layer system for weapon based on service-scale

    KR101441435B1

  • Device and method for implementing high availability of cluster system

    KR1020030051930A