Node high-availability implementation method, system, computer device and storage medium

By deploying multiple network monitoring and high availability services for cluster nodes, the status of the management network, business network, and storage network is monitored, and corresponding actions are performed in the high availability service. This solves the problem of low monitoring accuracy and reliability in existing technologies and achieves high availability and flexible configuration of nodes and cluster networks.

CN118590422BActive Publication Date: 2025-11-28JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410873967.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-01
Publication Date
2025-11-28
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 on virtual machines on physical hosts when the management network is disconnected, leading to low accuracy of monitoring data. Furthermore, it cannot account for storage network and business network failures, 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 the target high availability action in the high availability service. Support port status detection for Fibre Channel connection to storage network. Image file deployment service for flexible configuration.

Benefits of technology

It improves the accuracy and reliability of monitoring nodes and cluster networks, can respond to network problems, supports high-availability action planning in network reuse scenarios, and enables flexible configuration and dynamic updates of high-availability services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118590422B_ABST
    Figure CN118590422B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of network monitoring, and discloses a node high-availability implementation method and system, computer equipment and a storage medium. The application comprises the following steps: deploying multiple network monitoring services and high-availability services for each node in a cluster respectively; a high-availability configuration file is configured in the high-availability service, and the high-availability configuration file is used to represent the corresponding relationship between the network states of each network in the node and high-availability actions; based on the network monitoring service, the current network states of each network in the node are acquired; based on the high-availability configuration file and the current network states of each network in the node, target high-availability actions corresponding to the node are determined and executed. In this way, the states of different networks in the node are monitored through multiple network monitoring services, and the corresponding target high-availability actions are executed through the high-availability service, so that the network monitoring of the node and the execution of the high-availability actions 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 application relates to the technical field of network monitoring, and particularly relates to a node high-availability implementation method and system, a computer device and a storage medium. BACKGROUND

[0002] Currently, the monitoring of a cluster network is usually based on an OpenStack cloud platform and mainly monitors the heartbeat between a server and a computing node. In general, since the default heartbeat network is only deployed on a management network, if the management network is disconnected, a user cannot implement operations such as starting and stopping a virtual machine on a physical host of the management network, which leads to low accuracy of monitoring data. SUMMARY

[0003] Therefore, the present application provides a node high-availability implementation method and system, a computer device and a storage medium to solve the problem of low accuracy of monitoring of a node.

[0004] In a first aspect, the present application provides a node high-availability implementation method applied to a node high-availability implementation system, and the method comprises the following steps.

[0005] A plurality of network monitoring services and a high-availability service are respectively deployed for each node in a cluster; the plurality of 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 represent the correspondence between the network status of each network in the node and a high-availability action;

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

[0007] 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.

[0008] In this way, the current network status of different networks in the node can be monitored through the plurality of network monitoring services, and the target high-availability action corresponding to the node 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, the various networks of the node can be monitored at the same time, the monitoring accuracy of the node is improved, and since the corresponding high-availability action is executed through the 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.

[0009] In an optional implementation, the networks in the node include a management network, a service network and a storage network, the network monitoring service includes a management network monitoring service, a service network monitoring service and a storage network monitoring service; based on the network monitoring service, the current network state of each network in the node is obtained, including:

[0010] The management network of the node is monitored based on the management network monitoring service to obtain the current management network state of the node;

[0011] The service network of the node is monitored based on the service network monitoring service to obtain the current service network state of the node;

[0012] The storage network of the node is monitored based on the storage network monitoring service to obtain the current storage network state of the node.

[0013] In this way, the network states of the management network, the service network and the storage network of the node can be monitored by the management network monitoring service, the service network monitoring service and the storage network monitoring service respectively, and the network states of different networks in the node can be monitored.

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

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

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

[0017] In this way, when the node has a multiplexed network, the network states of the multiplexed network are combined into one network state, so that corresponding high-availability actions can also be planned and executed for network multiplexing, 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 uses a fiber channel to connect a storage network, based on the network monitoring service, the current network state of each network in the node is obtained, further including:

[0019] The port state of the fiber port of the second node is detected to determine the port state of the fiber port;

[0020] Determine the current storage network state of the second node based on the port state.

[0021] In this way, when the storage network accesses the node in the form of fiber channel, the network state of the storage network is determined by detecting the port state of the optical port, thereby improving the comprehensiveness and applicability of the node network monitoring.

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

[0023] Build an image file of the network monitoring service and the fault handling service, and push the image file of the network monitoring service and the fault handling service to the image repository corresponding to the running environment of the cluster;

[0024] Detect the network configuration information of each network in the node; the networks in the node include a management network, a service network, and a storage network;

[0025] If the network configuration information is detected, obtain the node configuration information of each node, and respectively generate a node configuration file corresponding to each node based on the node configuration information;

[0026] Mount the node configuration file, and start the management network monitoring service, the service 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 state of the management network of the node; the service network monitoring service is used to monitor the network state of the service network of the node; and the storage network monitoring service is used to monitor the network state of the storage network of the node;

[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 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 by configuring the image file, thereby realizing flexible configuration and deployment of the network monitoring service and the fault handling service; meanwhile, 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.

[0030] In an optional implementation, based on the high-availability configuration file and the current network state of each network in the node, a target high-availability action corresponding to the node is determined and executed, including:

[0031] determine the high availability action corresponding to the current network state of each network based on matching the current network state of each network in the node with the high availability configuration file;

[0032] determine the high availability action corresponding to the current network state of each network as a target high availability action, and execute the target high availability action.

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

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

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

[0036] updating the high availability configuration file based on the high availability configuration information;

[0037] mounting 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, thereby updating the high availability service and improving the flexibility of the high availability service.

[0039] In a second aspect, the present application provides an implementation system of node high availability, which includes:

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

[0041] a network monitoring service is deployed in each of the plurality of network monitoring modules, the network state of the node is obtained through the network monitoring service, and the network state is reported to the high availability module;

[0042] a high availability service is deployed in the high availability module, the high availability configuration file is configured in the high availability service, the high availability configuration file is used to represent the corresponding relationship between the network state of the node and the high availability action, the high availability module obtains the network state reported by the plurality of 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 state.

[0043] In a third aspect, the present application provides a computer device, which includes a memory and a processor, the memory and the processor are communicatively connected with each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the implementation method of node high availability of the first aspect or any of the corresponding embodiments thereof.

[0044] In a fourth aspect, the present application provides a computer readable storage medium, having stored thereon computer instructions for causing a computer to execute the node high-availability implementation method of the first aspect or any of the corresponding embodiments thereof.

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

[0046] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings needed to be used in the specific embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.

[0047] Figure 1 is a flowchart of a node high-availability implementation method according to an embodiment of the present application;

[0048] Figure 2 is a flowchart of another node high-availability implementation method according to an embodiment of the present application;

[0049] Figure 3 is a flowchart of still another node high-availability implementation method according to an embodiment of the present application;

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

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

[0052] Figure 6 is a flowchart of still another node high-availability implementation method according to an embodiment of the present application;

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

[0054] Figure 8 is a structural block diagram of a node high-availability implementation system according to an embodiment of the present application;

[0055] Figure 9 is a schematic diagram of a node high-availability implementation system according to an embodiment of the present application;

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

[0057] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.

[0058] Currently, the monitoring of the cluster network is usually based on the OpenStack cloud platform and mainly monitors the heartbeat between the server and the computing node. In general, since the default heartbeat network is only deployed on the management network, if the management network is disconnected, the user cannot implement the operations such as starting and closing the virtual machine on the physical host with the disconnected management network, resulting in low accuracy of the monitoring data. Moreover, since the heartbeat network is only deployed on the management network, the situation when the storage network and the service network fail cannot be considered, resulting in low reliability of the network monitoring of the node. In addition, since the on-site network environment is usually complex and the network reuse situation is relatively high, the matrix of the high-availability service configured in the related technology is usually fixed and cannot be modified, which cannot achieve setting the high-availability action according to the specific network planning, resulting in that the high-availability service cannot make accurate host evacuation actions.

[0059] Based on this, the embodiments of the present application provide an implementation method of node high availability, applied to an implementation system of node high availability, and the method comprises the following steps: deploying a plurality of network monitoring services and a high-availability service for each node in the cluster respectively; the plurality of network monitoring services are used for monitoring the network states 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 represent the corresponding relationship between the network states of each network in the node and the high-availability action; based on the network monitoring service, the current network states of each network in the node are obtained; based on the high-availability configuration file and the current network states 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 states of different networks in the node can be monitored through the plurality of network monitoring services, and the corresponding target high-availability action can be determined and executed according to the current network states of each network in the node through the high-availability service, so as to separate the network monitoring of the node and the execution of the high-availability action, which can monitor various networks of the node at the same time, improve the monitoring accuracy of the node, and since the corresponding high-availability action is executed through the separate high-availability service, the response can still be generated when the network of the node has a problem, thereby improving the reliability of the node and the cluster network.

[0060] According to the embodiment of the present application, a node high-availability implementation method 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 the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.

[0061] In the embodiment, a node high-availability implementation method is provided, which can be used in a node high-availability implementation system. Figure 1 The flowchart of the node high-availability implementation method according to the embodiment of the present application is shown in FIG. 1, which includes the following steps: Figure 1

[0062] In step S101, a plurality of network monitoring services and high-availability services are respectively deployed for each node in the cluster.

[0063] In the embodiment of the present application, the plurality of network monitoring services are used to monitor the network states of different networks in the node. The high-availability service is configured with a high-availability configuration file, which is used to represent the correspondence between the network states of each network in the node and the high-availability actions. Through the high-availability configuration file, the high-availability action to be performed by the current network state of the node can be determined.

[0064] In an optional implementation, the network detection service can be implemented by a consul service. The consul service is a service discovery and configuration management center service. The consul service is built-in with a service registration and discovery framework, a distributed consistency protocol implementation, a health check, a Key / Value storage, a 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 to different networks in the node, a corresponding network monitoring service is respectively deployed to monitor the network state of the corresponding network, and the network state is reported to the high-availability service to determine the high-availability action to be performed at present through the high-availability service.

[0066] ​In an optional embodiment, the high-availability service can be implemented based on a fault handling service masakari, the high-availability service is started by mounting a high-availability configuration file in the fault handling service masakari, automatic failover and recovery are realized by monitoring the compute nodes and virtual machine instances, so as to improve the stability and reliability of the cloud infrastructure. The masakari can continuously monitor the states of the compute nodes and virtual machine instances, when a fault or abnormal condition is found, an automatic fault handling process is triggered, the affected virtual machine instances are automatically migrated to other healthy compute nodes, so as to reduce the service interruption time, and the administrator can also be sent a notification and alarm information, so that the administrator can take timely measures to ensure the normal operation of the cloud environment.

[0067] In an optional embodiment, the deployment of the network monitoring service and the high-availability service is based on an OpenStack cloud platform. The OpenStack cloud platform is an open source cloud computing platform, which can provide various cloud computing services to build a cloud infrastructure. In the related art, the high-availability service is usually implemented by deploying a host high-availability solution of masakari on the OpenStack cloud platform, using masakari to build a high-availability service, monitoring the network states of the nodes in the cluster and performing high-availability actions, and the high-availability actions configured in the high-availability service are fixed and cannot be modified. In the embodiment of the present application, 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, so that the high-availability service can be flexibly configured.

[0068] In step S102, based on the network monitoring service, the current network states of the networks in the node are obtained.

[0069] In the embodiment of the present application, the health of each network in the node is detected in real time based on the network monitoring service corresponding to each network configured in the node, so that the current network states of the networks in the node are obtained, and the network monitoring service reports the monitored current network states to the high-availability service, and the high-availability service determines the high-availability actions to be performed at present.

[0070] In step S103, based on the high-availability configuration file and the current network states of the networks in the node, the target high-availability actions corresponding to the node are determined and performed.

[0071] In the embodiment of the present application, the high-availability service obtains the current network states of the corresponding networks reported by the network monitoring services, and compares and matches the network states with the high-availability actions configured in the high-availability configuration file, determines the target high-availability actions corresponding to the node under the current network states, and performs the target high-availability actions, so as to realize the high-availability function and ensure the reliability of the node and the cluster.

[0072] In an optional implementation, the high-availability actions configured in the high-availability configuration file can be configured based on a highly available policy. The highly available policy is a policy for ensuring that a computing system or service remains available and continues to provide services in the face of hardware failures, software problems, or other unexpected situations, which can include the following policies: taking over work with redundant components to ensure service continuity, which requires setting up redundant components to achieve redundant deployment; migrating workloads from a failed node to a healthy backup node to achieve seamless failover; load balancing by distributing traffic to multiple servers or nodes to avoid single-node overload and improve overall system availability and performance; regularly backing up critical data and replicating data across multiple locations or storage media to prevent data loss and support rapid data recovery; resuming business and continuing operation based on a pre-set failure recovery plan when a failure occurs; setting up an alarm mechanism to alert failure 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 that the deployment of high-availability services for different nodes can be customized, improving the flexibility of high-availability deployment. At the same time, when initially deploying the network monitoring service and the high-availability service on the nodes in the cluster, a general high-availability configuration file can be used to deploy the high-availability service of the nodes in the cluster, so as to quickly complete the deployment of the network monitoring service and the high-availability service.

[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 after 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 high-availability modification information of a target node, high-availability configuration information is obtained; based on the high-availability configuration information, the high-availability configuration file is updated; and the updated high-availability configuration file is mounted in the failure handling service of the target node to update the high-availability service of the target node. 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 updating the high-availability configuration file. At the same time, the updated high-availability configuration file is mounted in the failure handling service of the target node, and the update of the high-availability service of the target node is completed, thereby improving the flexibility of the high-availability service.

[0075] The method for implementing node high availability provided in the embodiments of the present application comprises the following steps of: respectively deploying multiple network monitoring services and a high availability service for each node in a cluster; the multiple network monitoring services are used for monitoring network states 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 for representing a corresponding relationship between network states of each network in the node and high availability actions; based on the network monitoring services, current network states of each network in the node are obtained; based on the high availability configuration file and the current network states of each network in the node, a target high availability action corresponding to the node is determined and executed. In this way, the current network states of different networks in the node can be monitored through the multiple network monitoring services, and the corresponding target high availability action can be determined and executed according to the current network states 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, the various networks of the node can be monitored at the same time, the monitoring accuracy of the node is improved, and since the corresponding high availability action is executed through the separate high availability service, a response can still be generated when a network problem of the node occurs, so that the reliability of the node and the cluster network is improved.

[0076] In the embodiments of the present application, a method for implementing node high availability is provided, which can be used for a system for implementing node high availability, Figure 2 is a flowchart of another method for implementing node high availability according to the embodiments of the present application, as shown in the figure, the flowchart comprises the following steps: Figure 2

[0077] Step S201, respectively deploying multiple network monitoring services and a high availability service for each node in a cluster. For details, please refer to step S101 of the embodiment shown in Figure 1 The embodiment will not be described here again.

[0078] Step S202, based on the network monitoring services, obtaining current network states of each network in the node.

[0079] In the embodiments of the present application, the networks in the node can include a management network, a service network and a storage network, and correspondingly, the network monitoring services include a management network monitoring service, a service network monitoring service and a storage network monitoring service.

[0080] Then, the above step S202 can comprise the following steps:

[0081] Step S2021, based on the management network monitoring service, performing network monitoring on the management network of the node to obtain a current management network state of the node.

[0082] In the embodiments of the present application, the management network monitoring service performs network monitoring on the management network of the node to obtain a current management network state of the node, and reports the current management network state to the high availability service.

[0083] ​In step S2022, the service network monitoring service performs network monitoring on the service network of the node to obtain a current service network state of the node.

[0084] In the embodiment, the service network monitoring service performs network monitoring on the service network of the node to obtain a current service network state of the node, and reports the current service network state to the high-availability service.

[0085] In step S2023, the storage network monitoring service performs network monitoring on the storage network of the node to obtain a current storage network state of the node.

[0086] In the embodiment, the storage network monitoring service performs network monitoring on the service network of the node to obtain a current service network state of the node, and reports the current service network state to the high-availability service.

[0087] Thus, by the above method, the management network monitoring service, the service network monitoring service, and the storage network monitoring service respectively monitor the network states of the management network, the service network, and the storage network of the node, and the network states of different networks in the node are monitored.

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

[0089] In the first case, for a non-multiplexed network, that is, a network corresponding to a physical network device implementing one 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 a current non-multiplexed network state of the first node.

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

[0091] Thus, by the above method, when the node has a multiplexed network, the network states of the multiplexed network are combined into one network state, and thus the high-availability actions can also be planned and executed according to the network multiplexing, thereby improving the network reliability of the node and the cluster.

[0092] In an optional embodiment, if the node has a multiplexed network, the high-availability configuration file can be modified accordingly to adapt to the high-availability service related to the multiplexed network.

[0093] In an optional embodiment, if there is a second node in the cluster and the second node adopts a fiber channel connection storage network, then the network state of the storage network is no longer monitored by the service monitoring the storage network in the second node, but is monitored by the port state of the fiber port. Specifically, the port state of the fiber port of the second node is detected to determine the port state of the fiber port, and based on the port state, the current storage network state of the second node is determined. Thus, when the storage network adopts a fiber channel to access the node, the network state of the storage network is determined by detecting the port state of the fiber port, thereby improving the comprehensiveness and applicability of the network monitoring of the node.

[0094] In step S203, based on the high-availability configuration file and the current network state of each network in the node, a target high-availability action corresponding to the node is determined and executed. For details, please refer to Figure 1 The step S103 of the embodiment shown will not be described here.

[0095] In this embodiment, a node high-availability implementation method is provided, which can be used in a node high-availability implementation system, Figure 3 is a flowchart of another node high-availability implementation method according to an embodiment of the application, as shown in the figure, the flow includes the following steps: Figure 3

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

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

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

[0099] In the embodiment of the application, an image file of the network monitoring service consul service and the fault handling service masakari service is constructed, and the image file of the network monitoring service consul service and the fault handling service masakari service is pushed to the image repository corresponding to the running environment of the cluster, that is, the image repository corresponding to the OpenStack environment. By doing image processing, the image file is pushed to the image repository, and when the network monitoring service and the fault handling service are deployed in each node in the cluster, the image file in the image repository can be directly called to complete the deployment of the network monitoring service and the fault handling service.

[0100] ​In an optional embodiment, when deploying the network monitoring service and the fault handling service to each node in the cluster, the nodes to which the network monitoring service and the fault handling service need to be deployed can be listed through a node inventory, and the deployment of the network monitoring service and the fault handling service can be completed based on the node inventory. In an optional embodiment, an inventory file can be used as the node inventory, the nodes to which the related services need to be deployed can be configured by listing the names, IPs, addresses or configurations of the nodes in the inventory file, and then the image file in the image repository can be pushed to the nodes included in the inventory file according to the related information in the inventory file, so as to complete the deployment of the network monitoring service and the fault handling service on the nodes.

[0101] Figure 4 is a schematic diagram of deploying an image file in the implementation method of node high availability according to an embodiment of the present application, and the following will be further described in combination with Figure 4 The deployment of the image file in the embodiment of the present application to deploy the network monitoring service and the fault handling service in the node will be further described. As shown in Figure 4 , centos8.2 is selected as a container base image, the consul executable file of the network monitoring service is integrated and installed in the base image, and the consul image is constructed; the masakari related code and the analysis algorithm of the high availability action matrix are integrated in the base image, and the masakari image is constructed; the consul image and the masakari image are pushed to the image repository corresponding to the OpenStack environment. Then the nodes to which the services need to be deployed are specified in the inventory file, so that the consul image and the masakari image in the image repository are pushed to the corresponding nodes, so as to deploy the network monitoring service and the fault handling service in the nodes. Optionally, when the network monitoring service and the fault handling service are deployed in the nodes, a switch for starting the high availability service can be added in the global control file, so that the high availability service can be started or stopped through the switch.

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

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

[0104] In the embodiment of the present application, the network in the node includes a management network, a service network and a storage network. The network configuration information of the management network, the service network and the storage network is detected respectively to determine whether the configuration of the management network, the service network and the storage network in each node has been completed. If the network configuration information of each network is detected, it indicates that the configuration of each network in the node has been completed and the node 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 networks is detected, it indicates that the configuration of each network in the node has not been completed and the network is not completely connected. At this time, a prompt is fed back to prompt the user that the management network, the service network and the storage network have not been configured.

[0105] In step S3013, if the network configuration information is detected, the node configuration information of each node is acquired, and the node configuration file corresponding to each node is generated based on the node configuration information.

[0106] In the embodiment of the present application, if the 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 acquired, and the node configuration file corresponding to each node is generated based on the node configuration information, thereby facilitating the subsequent start of the network monitoring service and the high-availability service. The node configuration information includes the configuration information of the network card, the network and the host of the node, and the node configuration file can be a configmap file.

[0107] In step S3014, the node configuration file is mounted, and the management network monitoring service, the service network monitoring service and the storage network monitoring service in the network monitoring service are started.

[0108] In the embodiment of the present application, the management network monitoring service is used to monitor the network state of the management network of the node, the service network monitoring service is used to monitor the network state of the service network of the node, and the storage network monitoring service is used to monitor the network state of the storage network of the node. The node configuration file is mounted, and then the consul-manager pod service is started respectively to start the management network monitoring service to monitor the network state of the management network, the consul-storage pod service is started to start the storage network monitoring service to monitor the network state of the storage network, and the consul-tenant pod service is started to start the service network monitoring service to monitor the network state of the service network.

[0109] In step S3015, the high-availability configuration information is acquired, and the high-availability configuration file is generated based on the high-availability configuration information.

[0110] In this embodiment of the 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 can be a configmap file. Optionally, the high availability configuration information can 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 this embodiment of the invention, a high availability configuration file is mounted in the fault handling service masakari to start the high availability service. Therefore, by using the above method, network monitoring and fault handling services are deployed on nodes in the form of image files. When it is necessary to deploy network monitoring or fault handling services on a node, deployment can be completed directly by configuring the image file, thus enabling flexible configuration and deployment of network monitoring and fault handling services. Simultaneously, by starting the high availability service by mounting a high availability configuration file in the fault handling service, the configuration and implementation of the high availability service become more flexible.

[0113] Step S302: Based on the network monitoring service, obtain the current network status of each network in the node. For details, please refer to [link to relevant documentation]. Figure 1 Step S102 of the illustrated embodiment will not be described again 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. For details, please refer to [link to relevant documentation]. Figure 1 Step S103 of the illustrated embodiment will not be described again here.

[0115] This embodiment provides a method for implementing node high availability, which can be used in systems that implement node high availability. Figure 6 This is a flowchart of a method for implementing high availability of another node according to an embodiment of the present invention, such as... Figure 6 As shown, the process includes the following steps:

[0116] Step S601 involves deploying multiple network monitoring and high availability services on each node in the cluster. For details, please refer to [link to relevant documentation]. Figure 1 Step S101 of the illustrated embodiment will not be described again here.

[0117] Step S602: Based on the network monitoring service, obtain the current network status of each network in the node. For details, please refer to [link to relevant documentation]. Figure 1 Step S102 of the illustrated embodiment will not be described again here.

[0118] Step S603, 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.

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

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

[0121] In the embodiments of the present application, 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 application, as shown in Figure 7 The high-availability configuration file can include the network status of each network, and the network status of each network constitutes a set of network status, and a set of network status corresponds to a high-availability action. As shown in Figure 7 The management interface corresponds to the network status of the management network, the tenant interface corresponds to the network status of the service network, the storage interface corresponds to the network status of the storage network, and the actions correspond to the high-availability action; up and down in the high-availability configuration file represent different network status, wherein up represents normal network status, and down represents abnormal network status; recovery and report represent different high-availability actions, Figure 7 which is only an example, and in actual applications, the configuration can be performed according to the needs of the cluster or the node.

[0122] In an optional embodiment, the high-availability configuration file can only configure the situation that needs to generate a response, that is, for some situations that do not need to perform a high-availability action, the corresponding network status can 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 the high-availability action. Optionally, as shown in Figure 7 , for some situations that do not need to perform a high-availability action, the action configuration is consistent with the action configuration when the management network, the service network and the storage network are in the normal state (up) in Figure 7 , that is, the network status is listed in the high-availability configuration file, but the corresponding action is not performed, 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, determining the high-availability action corresponding to the current network status of each network as a target high-availability action, and executing the target high-availability action.

[0124] In the embodiment, the high-availability action corresponding to the current network state of each network in the high-availability configuration file is determined as a target high-availability action, and the target high-availability action is executed. In this way, 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 the embodiment, a node high-availability implementation system is also provided, which is used to implement the above-described embodiments and preferred embodiments, and will not be described again. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, implementation of hardware, or a combination of software and hardware, is also possible and contemplated.

[0126] The embodiment provides a node high-availability implementation system, as shown in Figure 8 The node high-availability implementation system comprises:

[0127] a node 801, a plurality of network monitoring modules 802, and a high-availability module 803. The node 801 is connected with the plurality of network monitoring modules 802 respectively, and the plurality of network monitoring modules 802 are connected with the high-availability module 803 respectively. In the plurality of network monitoring modules 802, a network monitoring service is deployed respectively, the network state of the node is obtained through the network monitoring service, and the network state is reported to the high-availability module 803. In the high-availability module 803, a high-availability service is deployed, a high-availability configuration file is configured in the high-availability service, and the high-availability configuration file is used to represent the correspondence between the network state of the node and the high-availability action. The high-availability module 803 obtains the network state reported by the plurality of 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 state.

[0128] In an optional embodiment, Figure 9 is a schematic diagram of a node high-availability implementation system of the embodiment, as shown in Figure 9 Each node comprises a manage network, a tenant network, and a storage network. Each network is connected with a host (nova-computer) respectively, and the host is configured with a client (consul client) of the network monitoring service to connect to the cluster to participate in service discovery, health check, and configuration management. Each network is also connected with a network monitoring service (consul server), the network monitoring service monitors the state of the network corresponding thereto, and a monitoring software (hostmonitor) periodically polls the network state monitored in the network monitoring service and reports to a high-availability service (masakari), and the high-availability service executes the corresponding high-availability action according to the high-availability configuration file configured therein.

[0129] In one alternative implementation, without network reuse, each node's network has its own dedicated network monitoring service, while the monitoring software and high availability service can be shared. Alternatively, a cluster can share monitoring software and / or high availability service, but each network of each node in the cluster uses a separate network monitoring service.

[0130] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

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

[0132] This invention also provides a computer device having the above-described features. Figure 8 or Figure 9 The system shown demonstrates a highly available node implementation.

[0133] Please see Figure 10 , Figure 10 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 10 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 10 Take a processor 10 as an example.

[0134] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0135] The memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform the methods illustrated by the above embodiments.

[0136] The memory 20 can include a program storage area and a data storage area. The program storage area can store an operating system, application programs required by at least one function, and the like. The data storage area can store data created according to the use of the computer device, and the like. In addition, the memory 20 can include a high-speed random access memory, and can further include a non-transitory memory such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some alternative embodiments, the memory 20 can optionally include a memory disposed remotely from the processor 10, which can be connected to the computer device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0137] The memory 20 can include a volatile memory such as a random access memory, and can further include a non-volatile memory such as a flash memory, a hard disk, or a solid state disk, and a combination of the above-mentioned types of memories.

[0138] The computer device further includes a communication interface 30 for communication of the computer device with other devices or communication networks.

[0139] The embodiments of the present application also provide a computer readable storage medium. The above-mentioned methods according to the embodiments of the present application can be implemented in hardware, firmware, or recorded in a storage medium, or stored in a remote storage medium or a non-transitory machine readable storage medium by downloading through a network and stored in a local storage medium, so that the methods described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid state disk, and the like. Further, the storage medium can also include a combination of the above-mentioned types of memories. It can be understood that the computer, the processor, the microprocessor controller, or the 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 the computer, the processor, or the hardware, the methods illustrated by the above embodiments are implemented.

[0140] Part of the present application can be applied as a computer program product, for example, computer program instructions, when executed by a computer, through the operation of the computer, can invoke or provide the method and / or technical solutions according to the present application. Those skilled in the art should understand that the form of computer program instructions in computer readable medium includes but is not limited to source files, executable files, installation package files and the like, and accordingly, the way of computer program instructions executed by computer includes but is not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer.

[0141] Although the embodiments of the present application are described in conjunction with the drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope defined by the appended claims.

Claims

1. A method for implementing node high availability, characterized in that, The method is applied to a high-availability implementation system of a node, and comprises the following steps: deploying multiple network monitoring services and high-availability services for each node in a cluster respectively; the multiple network monitoring services are used to monitor network states of different networks in the node; the high-availability services are configured with high-availability configuration files, which are used to represent the correspondence between the network states of each network in the node and high-availability actions; obtaining current network states of each network in the node based on the network monitoring services; determining and executing target high-availability actions corresponding to the node based on the high-availability configuration files and the current network states of each network in the node; wherein, if there is a first node in the cluster, and at least two networks of the multiple networks of the first node are implemented based on a same physical network device, the step of obtaining the current network states of each network in the node based on the network monitoring services comprises the following steps: monitoring a non-multiplexing network based on a network monitoring service corresponding to the non-multiplexing network to obtain a current non-multiplexing network state of the first node; the non-multiplexing network is a network corresponding to a physical network device implementing one network in the first node; monitoring a multiplexing network 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 implementing at least two networks in the first node; the step of deploying the multiple network monitoring services and the high-availability services for each node in the cluster respectively comprises the following steps: constructing image files of the network monitoring services and a fault processing service, and pushing the image files of the network monitoring services and the fault processing service to an image warehouse corresponding to a running environment of the cluster; detecting network configuration information of each network in the node; the networks in the node include a management network, a business network and a storage network; if the network configuration information is detected, obtaining node configuration information of each node, and generating node configuration files corresponding to each node based on the node configuration information; mounting the node configuration files, and starting a management network monitoring service, a business network monitoring service and a storage network monitoring service in the network monitoring services; the management network monitoring service is used to monitor the network state of the management network of the node; the business network monitoring service is used to monitor the network state of the business network of the node; the storage network monitoring service is used to monitor the network state of the storage network of the node; obtaining high-availability configuration information, and generating the high-availability configuration files based on the high-availability configuration information; mounting the high-availability configuration files in the fault processing service to start the high-availability services; The method further comprises: in response to the high-availability modification information of the target node, obtaining high-availability configuration information; updating the high-availability configuration file based on the high-availability configuration information; and mounting the updated high-availability configuration file in a fault processing service of the target node to update the high-availability service of the target node.

2. The method of claim 1, wherein, The networks in the node include a management network, a service network, and a storage network, and the network monitoring service includes a management network monitoring service, a service network monitoring service, and a storage network monitoring service; The obtaining of the current network states of the networks in the node based on the network monitoring service comprises: network monitoring of the management network of the node based on the management network monitoring service to obtain a current management network state of the node; network monitoring of the service network of the node based on the service network monitoring service to obtain a current service network state of the node; network monitoring of the storage network of the node based on the storage network monitoring service to obtain a current storage network state of the node.

3. The method of claim 1, wherein, If there is a second node in the cluster and the second node uses a fiber channel to connect a storage network, the obtaining of the current network states of the networks in the node based on the network monitoring service further comprises: detection of a port state of a fiber port of the second node to determine the port state of the fiber port; determination of a current storage network state of the second node based on the port state.

4. The method of claim 1, wherein, The determination and execution of the target high-availability action corresponding to the node based on the high-availability configuration file and the current network states of the networks in the node comprises: matching of the current network states of the networks in the node with the high-availability configuration file to determine high-availability actions corresponding to the current network states of the networks; determination of the high-availability actions corresponding to the current network states of the networks as the target high-availability action and execution of the target high-availability action.

5. A system for implementing node high availability, characterized in that, The system comprises: a node, a plurality of network monitoring modules, and a high-availability module; the node is connected with the plurality of network monitoring modules respectively, and the plurality of network monitoring modules are connected with the high-availability module respectively; the plurality of network monitoring modules are respectively deployed with network monitoring services, the network states of the node are obtained through the network monitoring services, and the network states are reported to the high-availability module; the high-availability module is deployed with a high-availability service, the high-availability service is configured with a high-availability configuration file, the high-availability configuration file is used to represent the correspondence between the network states of the node and high-availability actions, the high-availability module obtains the network states reported by the plurality of network monitoring modules, and determines and executes the high-availability actions corresponding to the node based on the high-availability configuration file and the network states.

6. A computer device, comprising: comprise: a memory and a processor, which are communicatively connected with each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the implementation method of the high availability of the node in any one of claims 1 to 4.

7. A computer readable storage medium characterized in that, The computer readable storage medium stores computer instructions for causing a computer to perform the implementation method of node high availability according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • 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