CN117519822A - Node management method, device, system, computer equipment and storage medium - Google Patents

Node management method, device, system, computer equipment and storage medium Download PDF

Info

Publication number
CN117519822A
CN117519822A CN202311461272.7A CN202311461272A CN117519822A CN 117519822 A CN117519822 A CN 117519822A CN 202311461272 A CN202311461272 A CN 202311461272A CN 117519822 A CN117519822 A CN 117519822A
Authority
CN
China
Prior art keywords
node
configuration file
operation information
spam
cluster
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311461272.7A
Other languages
Chinese (zh)
Inventor
闫明阳
周晓庆
杨诚
张杭俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202311461272.7A priority Critical patent/CN117519822A/en
Publication of CN117519822A publication Critical patent/CN117519822A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a node management method, a node management device, a node management system, computer equipment, a storage medium and a computer program product, and relates to the technical field of cloud computing. The method comprises the following steps: when a target event is triggered, acquiring node operation information reported by a cluster node; searching a spam configuration file corresponding to the node operation information in the configuration file storage component according to the node operation information; when the spam configuration file corresponding to the node operation information exists, verifying the dependency relationship among the nodes corresponding to the node operation information according to the node association relationship and the expected state description metadata contained in the spam configuration file to obtain a verification result; returning a management result aiming at the node operation information according to the verification result; the management result is used for representing whether the target event is executed. The method can improve the safety and usability of the cluster service.

Description

Node management method, device, system, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of cloud computing technologies, and in particular, to a node management method, apparatus, system, computer device, storage medium, and computer program product.
Background
With the development of cloud computing technology, a highly available multi-cluster deployment scheme is used in more and more application scenarios. In the multi-cluster deployment scheme, due to difficulty in multi-cluster management and high complexity of the multi-clusters, abnormal conditions occur in the multi-cluster deployment scheme.
In the conventional technology, when a node in a cluster needs to be subjected to operations such as rolling upgrade, the node needs to be stopped, then the node is subjected to rolling upgrade, and the node is restarted after the rolling upgrade.
However, in the conventional method, because there may be a correlation or a related dependency relationship between nodes in the cluster, after a certain node is stopped, other nodes having a dependency relationship with the certain node are also stopped accidentally at the same time, so that services in the cluster are not available.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a node management method, apparatus, system, computer device, computer readable storage medium, and computer program product.
In a first aspect, the present application provides a node management method, including:
when a target event is triggered, acquiring node operation information reported by a cluster node;
According to the node operation information, searching a spam configuration file corresponding to the node operation information in a configuration file storage component;
when the spam configuration file corresponding to the node operation information exists, verifying the dependency relationship among the nodes corresponding to the node operation information according to the node association relationship and expected state description metadata contained in the spam configuration file to obtain a verification result;
returning a management result aiming at the node operation information according to the verification result; the management result is used for representing whether the target event is executed.
In one embodiment, the configuration file storage component includes node metadata, where the node metadata includes a node name, a node version, and a cluster where a node is located, where the node name, the node version, and the node name correspond to the spam configuration file;
according to the node operation information, retrieving, in a configuration file storage component, a spam configuration file corresponding to the node operation information, including:
and searching the node name, the node version and the cluster where the node is located corresponding to the node operation information in the node metadata of the spam configuration file, and determining the spam configuration file corresponding to the node operation information.
In one embodiment, the expected state description metadata includes node copy number, node running state, and node deployment area constraints;
when the spam configuration file corresponding to the node operation information exists, verifying the dependency relationship between the nodes corresponding to the node operation information according to the node association relationship and the expected state description metadata contained in the spam configuration file to obtain a verification result, wherein the verification result comprises the following steps:
when the spam configuration file corresponding to the node operation information exists in the configuration file storage component, determining a target spam configuration file corresponding to the operated node according to the node operation information;
determining a target cluster node according to the node association relation;
performing state verification on state information corresponding to the target cluster node based on node copy number, node running state and node deployment area constraint corresponding to the target cluster node in the target spam configuration file;
and under the condition that the state information of the target cluster node meets the node copy number, the node running state and the node deployment area constraint, determining the verification result as verification passing.
In one embodiment, the returning, according to the verification result, a management result for the node operation information includes:
And under the condition that the verification result is verification passing, determining the management result aiming at the node operation information as an allowed operation, and returning the management result to the cluster node.
In one embodiment, before the node operation information reported by the cluster node is obtained when the target event is triggered, the method further includes:
and constructing a spam configuration file aiming at the node metadata and the expected state description metadata according to the configuration file management component, and storing the spam configuration file into the configuration file storage component.
In one embodiment, the method further comprises:
determining an update node in response to an update operation of the spam configuration file;
determining a target spam configuration file corresponding to the updated node and a target spam configuration file corresponding to an associated node associated with the updated node according to the node metadata corresponding to the updated node;
based on the configuration file management component, updating each target spam configuration file according to the node association relation and expected state description metadata corresponding to the updating node and the association node to obtain a new spam configuration file;
And storing the new spam configuration file to the configuration file storage component.
In a second aspect, the present application further provides a node management apparatus, including:
the acquisition module is used for acquiring node operation information reported by the cluster nodes when the target event is triggered;
the searching module is used for searching the spam configuration file corresponding to the node operation information in the configuration file storage component according to the node operation information;
the verification module is used for verifying the dependency relationship between the nodes corresponding to the node operation information according to the node association relationship and the expected state description metadata contained in the spam configuration file when the spam configuration file corresponding to the node operation information exists, so as to obtain a verification result;
the feedback module is used for returning a management result aiming at the node operation information according to the verification result; the management result is used for representing whether the target event is executed.
In one embodiment, the configuration file storage component includes node metadata, where the node metadata includes a node name, a node version, and a cluster where a node is located, where the node name, the node version, and the node name correspond to the spam configuration file;
the retrieval module is specifically used for:
And searching the node name, the node version and the cluster where the node is located corresponding to the node operation information in the node metadata of the spam configuration file, and determining the spam configuration file corresponding to the node operation information.
In one embodiment, the expected state description metadata includes node copy number, node running state, and node deployment area constraints;
the verification module is specifically configured to:
when the spam configuration file corresponding to the node operation information exists in the configuration file storage component, determining a target spam configuration file corresponding to the operated node according to the node operation information;
determining a target cluster node according to the node association relation;
performing state verification on state information corresponding to the target cluster node based on node copy number, node running state and node deployment area constraint corresponding to the target cluster node in the target spam configuration file;
and under the condition that the state information of the target cluster node meets the node copy number, the node running state and the node deployment area constraint, determining the verification result as verification passing.
In one embodiment, the feedback module is specifically configured to:
And under the condition that the verification result is verification passing, determining the management result aiming at the node operation information as an allowed operation, and returning the management result to the cluster node.
In one embodiment, the apparatus further comprises:
the construction module is used for constructing a spam configuration file aiming at the node metadata and the expected state description metadata according to the configuration file management component and storing the spam configuration file into the configuration file storage component.
In one embodiment, the apparatus further comprises:
the first determining module is used for determining an update node in response to the update operation of the spam configuration file;
the second determining module is used for determining a target spam configuration file corresponding to the updated node and a target spam configuration file corresponding to an associated node associated with the updated node according to the node metadata corresponding to the updated node;
the updating module is used for updating each target spam configuration file according to the node association relation and expected state description metadata corresponding to the updating nodes and the association nodes based on the configuration file management component to obtain a new spam configuration file;
And the storage module is used for storing the new spam configuration file to the configuration file storage component.
In a third aspect, the present application further provides a node management system, including:
the server is used for acquiring node operation information reported by the cluster nodes when the target event is triggered; according to the node operation information, searching a spam configuration file corresponding to the node operation information in a configuration file storage component; when the spam configuration file corresponding to the node operation information exists, verifying the dependency relationship among the nodes corresponding to the node operation information according to the node association relationship and expected state description metadata contained in the spam configuration file to obtain a verification result; returning a management result aiming at the node operation information according to the verification result; the management result is used for representing whether the target event is executed or not;
the cluster node is used for reporting node operation information to a server.
In one embodiment, the cluster node is further configured to receive the management result for the node operation information, and determine to control the node operation of the cluster node based on the management result.
In a fourth aspect, the present application also provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
when a target event is triggered, acquiring node operation information reported by a cluster node;
according to the node operation information, searching a spam configuration file corresponding to the node operation information in a configuration file storage component;
when the spam configuration file corresponding to the node operation information exists, verifying the dependency relationship among the nodes corresponding to the node operation information according to the node association relationship and expected state description metadata contained in the spam configuration file to obtain a verification result;
returning a management result aiming at the node operation information according to the verification result; the management result is used for representing whether the target event is executed.
In a fifth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
when a target event is triggered, acquiring node operation information reported by a cluster node;
According to the node operation information, searching a spam configuration file corresponding to the node operation information in a configuration file storage component;
when the spam configuration file corresponding to the node operation information exists, verifying the dependency relationship among the nodes corresponding to the node operation information according to the node association relationship and expected state description metadata contained in the spam configuration file to obtain a verification result;
returning a management result aiming at the node operation information according to the verification result; the management result is used for representing whether the target event is executed.
In a sixth aspect, the present application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of:
when a target event is triggered, acquiring node operation information reported by a cluster node;
according to the node operation information, searching a spam configuration file corresponding to the node operation information in a configuration file storage component;
when the spam configuration file corresponding to the node operation information exists, verifying the dependency relationship among the nodes corresponding to the node operation information according to the node association relationship and expected state description metadata contained in the spam configuration file to obtain a verification result;
Returning a management result aiming at the node operation information according to the verification result; the management result is used for representing whether the target event is executed.
According to the node management method, the device, the computer equipment, the storage medium and the computer program product, when the target event is triggered, the dependency relationship between related nodes in the node operation information can be verified through the node operation information reported by the cluster nodes and the expected state description metadata in the spam configuration file, so that the management result aiming at the node operation information is obtained, the limitation of the node operation corresponding to the node operation information is realized, the service in the cluster is prevented from being unavailable due to the simultaneous stopping of multiple nodes, and the availability and the safety of the cluster service are further improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for a person having ordinary skill in the art.
FIG. 1 is an application environment diagram of a node management method in one embodiment;
FIG. 2 is a flow diagram of a method of node management in one embodiment;
FIG. 3 is a flow diagram of verifying node operation information in one embodiment;
FIG. 4 is a flow chart illustrating a method for updating spam in one embodiment;
FIG. 5 is a flow diagram of an example node management method in one embodiment;
FIG. 6 is a block diagram of a node management system in one embodiment;
FIG. 7 is a block diagram of a node management apparatus in one embodiment;
fig. 8 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The node management method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein cluster node 102 communicates with server 104 over a network. The profile storage component may store data that the server 104 needs to process. The profile storage component may be integrated on the server 104 or may be placed on a cloud or other network server. When the cluster node 102 triggers a target event, the server 104 acquires node operation information reported by the cluster node; the server 104 searches the spam configuration file corresponding to the node operation information in the configuration file storage component according to the node operation information; when a spam configuration file corresponding to the node operation information exists, the server 104 verifies the node dependency relationship corresponding to the node operation information according to the node association relationship and the expected state description metadata contained in the spam configuration file to obtain a verification result; the server 104 returns a management result aiming at the node operation information according to the verification result; the management result is used to characterize whether the target event is executed. The cluster node 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and internet of things devices, which may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, etc. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In an exemplary embodiment, as shown in fig. 2, a cluster management method is provided, and an example of application of the method to the server in fig. 1 is described, including the following steps 202 to 206. Wherein:
step 202, when a target event is triggered, node operation information reported by a cluster node is obtained.
The target event may be an operation that the cluster node stops or scrolls up;
each cluster node is deployed with a cluster webhook (a callback interface based on the HTTP protocol) component, and a spam operation control component is deployed in a server.
In this embodiment, when a certain cluster node in the multi-cluster application triggers a target event, the cluster node reports the target event to a server through a cluster webhook component, and the server receives node operation content corresponding to the target event reported by the cluster webhook component in the cluster node through a spam operation control component. For example, during a rolling upgrade operation for a cluster node, the cluster node may need to stop and restart services on the cluster node, at which point the cluster webhook component actively reports node operation information occurring in the cluster node to a preset URL (Uniform Resource Locator ), i.e., a server.
Step 204, according to the node operation information, searching the spam configuration file corresponding to the node operation information in the configuration file storage component.
In the embodiment of the application, the server searches in the configuration file storage component of the server according to the node information contained in the received node operation information through the spam operation control component deployed by the server, and determines whether the configuration file storage component contains a spam configuration file corresponding to the node information. When the configuration file storage component does not contain the spam configuration file corresponding to the node information, the server releases the node operation, namely, the server returns a message of allowing the node operation to the cluster webhook component in the cluster node, and indicates the cluster node to allow the node to stop or roll upgrading operation.
Step 206, when the spam configuration file corresponding to the node operation information exists, verifying the dependency relationship between the nodes corresponding to the node operation information according to the node association relationship and the expected state description metadata contained in the spam configuration file, and obtaining a verification result.
In the embodiment of the application, when a spam configuration file corresponding to node operation information exists in a configuration file storage component of the server, a spam operation control component in the server reads node association relations and expected state description metadata stored in the spam configuration file. And verifying the dependency relationship between the nodes according to the read node association relationship and expected state description metadata and aiming at the association relationship between the cluster node reporting the node operation information and other cluster nodes, and obtaining a verification result corresponding to the node operation information, wherein the verification result reflects the management basis of the server for the node operation corresponding to the node operation information.
And step 208, returning a management result aiming at the node operation information according to the verification result.
Wherein the management result is used for representing whether the target event is executed.
In the embodiment of the application, the spam operation control component in the server determines whether the cluster node can execute the target event according to the verification result corresponding to the node operation information, obtains the management result corresponding to the node operation information, and returns the management result to the cluster webhook component of the cluster node to realize a spam management mechanism of the node for executing the target event for the cluster node.
In an alternative embodiment, if the server matches a plurality of spam configuration files related to the cluster node in the configuration file management component, the server determines that the management result is forbidden to operate when the spam configuration file with the verification result being verification failure exists; when the verification results of the plurality of spam configuration files are all verification passing, the server determines the management result as an allowed operation.
In an optional embodiment, a monitoring component may be further disposed in the server, and after the server completes the management of the target event through the spam operation control component, the management result is returned to the cluster node, and meanwhile, the management result may also be returned to the monitoring component through the spam operation control component, so as to monitor the spam operation control component, thereby facilitating maintenance.
In the node management method, when the target event is triggered, the dependency relationship between related nodes in the node operation information can be verified through the node operation information reported by the cluster nodes and the expected state description metadata in the spam configuration file, so that the management result aiming at the node operation information is obtained, the limitation of the node operation corresponding to the node operation information is realized, the service in the cluster is prevented from being unavailable due to the simultaneous stopping of multiple nodes, and the availability and the safety of the cluster service are further improved.
In an exemplary embodiment, the profile storage component includes node metadata, where the node metadata includes a node name, a node version, and a cluster in which the node is located corresponding to the spam profile, and step 204 includes step 2041. Wherein:
step 2041, in the node metadata of the spam configuration file, retrieving the node name, the node version and the cluster where the node is located corresponding to the node operation information, and determining the spam configuration file corresponding to the node operation information.
In this embodiment of the present invention, the spam configuration file in the configuration file storage component includes node metadata, which is used to uniquely identify the node involved in each spam configuration file, including the node name, the node version, and the cluster where the node is located, so when the server receives the node operation information reported by the cluster node, it can search according to the node name, the node version, and the cluster where the node is located in the node operation information, and the node metadata matches the same node name, the node version, and the cluster where the node is located in the node operation information, and further determines the search result of the node operation information in the configuration file storage component.
And when the search result is that the spam configuration file corresponding to the node operation information exists in the configuration file storage component, the current operation information is characterized as having corresponding constraint conditions. In contrast, when the search result is that the spam configuration file corresponding to the node operation information does not exist in the configuration file storage component, the fact that the association relation between the current operation information and other nodes does not exist is characterized, the cluster node is stopped, availability of cluster service in other cluster nodes is not affected, and therefore the server carries out 'release' processing on the target event corresponding to the node operation information.
In this embodiment, the node metadata is used to determine a spam configuration file corresponding to the node operation information, so that the node operation information can be retrieved, whether the spam configuration file corresponding to the node operation information exists in the configuration file storage component is determined, and further whether the node operation information affects other cluster nodes is determined, so that management of a target event corresponding to the node operation information is realized.
In one exemplary embodiment, the expected state description metadata contains node copy number, node operational state, and node deployment area constraints, as shown in FIG. 3, step 206 includes steps 302 through 308.
Wherein:
step 302, when a spam configuration file corresponding to the node operation information exists in the configuration file storage component, determining a target spam configuration file corresponding to the operated node according to the node operation information.
In the embodiment of the application, the spam configuration file in the configuration file storage component contains configuration metadata, which is used for uniquely identifying the spam configuration file and comprises a unique identification serial number and configuration expression information of the spam configuration file. When at least one spam configuration file corresponding to the node operation information exists in the configuration file storage component, a spam operation control component in the server reads the node name, the node version and the cluster where the node is located in the node operation information, and matches the node name, the node version and the cluster where the node is located in the spam configuration file of the configuration file management component to obtain a target spam configuration file corresponding to the operated node, wherein the target spam configuration file is used for verifying a target event, and the target event is a message reported to the server by the cluster node corresponding to the node operation information.
And step 304, determining the target cluster node according to the node association relation.
In this embodiment of the present application, the configuration file storage component includes a node association relationship corresponding to the spam configuration file, and the server may determine the target cluster node according to the node association relationship and the node operation information in the spam configuration file. The node association relationship is a single-phase dependency relationship, that is, the node A depends on the node B to be in a desired state, and the reverse direction is not established. For example, when the node a depends on the node B, and when the node a receives a request for stopping the node, the node a transmits node operation information to the server, and the server determines that the node B, which is the dependent node of the node a, can be determined according to the node operation information transmitted by the node a, and then the server determines the node B as the target cluster node.
Step 306, performing state verification on the state information corresponding to the target cluster node based on the node copy number, the node running state and the node deployment area constraint corresponding to the target cluster node in the target spam configuration file.
In the embodiment of the present invention, after the server determines the target cluster node, the server may obtain the expected state description metadata corresponding to the target cluster node according to the spam configuration file corresponding to the target cluster node, that is, the server may obtain the node copy number, the node running state and the node deployment area constraint of the target cluster node, where the expected state description metadata of the target cluster node reflects the state where the target cluster node is to be used as the dependent node of the operated node, and further, the server may perform the state verification of the target cluster node through the state information corresponding to the target cluster node and the expected state description metadata.
Optionally, the spam configuration file may include node association relationships and expected state description metadata corresponding to a plurality of cluster nodes, and the server may allocate the cluster nodes related to the spam configuration file according to the clusters.
And 308, determining the verification result as verification passing under the condition that the state information of the target cluster node meets the node copy number, the node running state and the node deployment area constraint.
In the embodiment of the present application, under the condition that the state information of the target cluster node satisfies the node copy book, the node running state (for example, whether the node is ready) and the node deployment area constraint, the server determines the verification result of the target cluster node as verification passing through the spam operation control component, and characterizes that the target event corresponding to the node operation information allows operation under the constraint condition of the current spam configuration file.
In this embodiment, a target cluster node is determined according to a node association relationship corresponding to node operation information, state verification is performed on the target cluster node according to a spam configuration file of the target cluster node, and a verification result of the node operation information is determined to pass verification under the condition that the state information meets the node copy number, the node operation state and the node deployment area constraint, so that management on a target event can be realized, and further safety and availability of cluster service are improved.
In an exemplary embodiment, step 208 includes step 2081. Wherein:
in step 2081, if the verification result is that the verification is passed, the management result for the node operation information is determined to be an allowed operation, and the management result is returned to the cluster node.
In the embodiment of the present application, when the verification result is that the verification passes, it is indicated that the number of node copies, the node running state and the node deployment area constraint of the dependent node of the operated node are satisfied, and the cluster service is not affected even if the operated node triggers the target event, so that the server determines the management result of the node operation information as an allowed operation, and returns the management result to the cluster node through the node operation control component.
And when the verification result is that the node fails, representing that the dependent node of the current operated node does not meet the node copy number, the node running state and the node deployment area constraint, if the current operated node triggers a target event, the current cluster service is not available, and at the moment, the server determines the management result as interception operation and returns the management result to the cluster node.
In this embodiment, the management result for the target event is determined according to the verification result corresponding to the node operation information, so that verification can be performed on the constraint of the node operation information on the availability of the cluster service, a spam management mechanism of the target event is realized, and the availability and security of the cluster service are improved.
In an exemplary embodiment, prior to step 202, the method further comprises:
and constructing a spam configuration file according to the configuration file management component aiming at the node metadata and the expected state description metadata, and storing the spam configuration file into the configuration file storage component.
In the embodiment of the application, a user may operate the spam configuration file in the configuration file storage component through the configuration file management component of the server, for example, the user may perform operations of checking, updating, deleting and adding the spam configuration file corresponding to the cluster node through the configuration file management component.
In addition, the server may construct a spam configuration file according to the node metadata and the expected state description metadata as file parameters in the spam configuration file corresponding to each cluster node, and store the configured spam configuration file to the configuration file storage component.
In this embodiment, the spam configuration file is constructed through the node metadata and the expected state description metadata, so that when the target event occurs in the cluster node, the target event can be verified by pulling the spam configuration file, and further a spam management mechanism for the target event is realized.
In an exemplary embodiment, as shown in FIG. 4, the method further includes steps 402 through 408.
Wherein:
in step 402, an update node is determined in response to an update operation of the spam configuration file.
In this embodiment, in a daily application of the multi-machine cluster service, when the cluster service updates or adds or deletes a cluster node, an update of a spam configuration file is required, and at this time, a user performs an update operation on the spam configuration file through a configuration file management component, and the server responds to the update operation of the spam configuration file, for example, the server first locates the update node, and determines that the added node or the deleted node is determined as the node name, the node version and the cluster where the node is located of the update node.
Step 404, determining a target spam configuration file corresponding to the updated node and a target spam configuration file corresponding to an associated node associated with the updated node according to the node metadata corresponding to the updated node.
In this embodiment of the present application, the server matches node metadata in the spam configuration file according to the node name, the node version, and the cluster where the node is located corresponding to the updated node, to obtain a target spam configuration file corresponding to the updated node, and at this time, the server reads the node association relationship recorded in the current spam configuration file, and if there is an associated node related to the updated node, determines the spam configuration file corresponding to the associated node as the target spam configuration file.
Step 406, updating each target spam configuration file to obtain a new spam configuration file according to the node association relation and the expected state description metadata corresponding to the updated nodes and the association nodes based on the configuration file management component.
In the embodiment of the application, the server updates the target spam configuration file by using the configuration file management component through updating the node association relation between the updated nodes and the association nodes and the expected state description metadata of the association nodes to obtain the updated new spam configuration file. For example, when a plurality of cluster nodes exist in the cluster for updating, the number of the cluster nodes is larger, and the number of the updated nodes is also larger, at this time, the server can determine the node association relationship and the expected state description metadata corresponding to the updated nodes and the associated nodes according to the description file corresponding to the updated nodes, so as to automatically update the target spam configuration file and obtain a new spam configuration file.
Step 408, store the new spam profile to the profile store component.
In the embodiment of the application, after the server completes updating the target spam configuration file, the new spam configuration file is stored in the configuration file storage component.
In this embodiment, the server automatically updates the target spam configuration file according to the node association relationship and the expected state description metadata of the update node and the association node, so that the update efficiency of the spam configuration file corresponding to the update node can be improved when the cluster node is updated.
In an exemplary embodiment, as shown in fig. 5, an example of a node management method is provided, including steps 501 to 506. Wherein:
step 501, a server constructs a spam configuration file according to a configuration file management component and stores the spam configuration file into a configuration file storage component;
step 502, when a target event is triggered, a server acquires node operation information and searches a spam configuration file corresponding to the node operation information in a configuration file storage component according to the node operation information;
step 503, when triggering a target event, the cluster node reports node operation information corresponding to the target event to a server, and the server determines a management result of the target event corresponding to the node operation information according to the spam configuration file;
step 504, the server exposes the spam configuration items of the spam configuration file for the cluster API through the spam operation control component;
Step 505, the cluster node receives the management result, and realizes the management of the cluster node according to the management result;
in step 506, the server reports the management result to the monitoring component through the spam operation control component.
In one exemplary embodiment, as shown in FIG. 6, a node management system 600 is provided, comprising:
the server 601 is configured to obtain node operation information reported by the cluster node 602 when a target event is triggered; searching a spam configuration file corresponding to the node operation information in the configuration file storage component according to the node operation information; when the spam configuration file corresponding to the node operation information exists, verifying the dependency relationship among the nodes corresponding to the node operation information according to the node association relationship and the expected state description metadata contained in the spam configuration file to obtain a verification result; returning a management result aiming at the node operation information according to the verification result; the management result is used for representing whether the target event is executed or not;
and the cluster node 602 is configured to report node operation information to the server.
In an exemplary embodiment, the cluster node is further configured to receive a management result for the node operation information, and determine to control the node operation of the cluster node based on the management result.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a node management device for realizing the above related node management method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of one or more node management devices provided below may refer to the limitation of the node management method hereinabove, and will not be repeated herein.
In an exemplary embodiment, as shown in fig. 7, there is provided a node management apparatus 700 including: an acquisition module 701, a retrieval module 702, a verification module 703 and a feedback module 704, wherein:
the acquiring module 701 is configured to acquire node operation information reported by a cluster node when a target event is triggered;
the retrieving module 702 is configured to retrieve, in the configuration file storage component, a spam configuration file corresponding to the node operation information according to the node operation information;
the verification module 703 is configured to, when there is a spam configuration file corresponding to the node operation information, verify the dependency relationship between nodes corresponding to the node operation information according to the node association relationship and the expected state description metadata included in the spam configuration file, and obtain a verification result;
a feedback module 704, configured to return a management result for the node operation information according to the verification result; the management result is used for representing whether the target event is executed.
In one embodiment, the configuration file storage component includes node metadata, where the node metadata includes a node name, a node version, and a cluster in which the node is located, where the node name, the node version, and the node are corresponding to the spam configuration file;
the retrieval module 702 is specifically configured to:
And searching the node name, the node version and the cluster where the node is located corresponding to the node operation information in the node metadata of the spam configuration file, and determining the spam configuration file corresponding to the node operation information.
In one embodiment, the expected state description metadata includes node copy number, node running state, and node deployment area constraints;
the verification module 703 is specifically configured to:
when the spamming configuration file corresponding to the node operation information exists in the configuration file storage component, determining a target spamming configuration file corresponding to the operated node according to the node operation information;
determining a target cluster node according to the node association relation;
performing state verification on state information corresponding to the target cluster nodes based on node copy numbers, node running states and node deployment area constraints corresponding to the target cluster nodes in the target spam configuration file;
and under the condition that the state information of the target cluster node meets the node copy number, the node running state and the node deployment area constraint, determining the verification result as verification passing.
In one embodiment, the feedback module 704 is specifically configured to:
and when the verification result is that the verification is passed, determining the management result aiming at the node operation information as the permission operation, and returning the management result to the cluster node.
In one embodiment, the apparatus 700 further comprises:
the construction module is used for constructing a spam configuration file aiming at the node metadata and the expected state description metadata according to the configuration file management component and storing the spam configuration file into the configuration file storage component.
In one embodiment, the apparatus 700 further comprises:
the first determining module is used for determining an update node in response to the update operation of the spam configuration file;
the second determining module is used for determining a target spam configuration file corresponding to the updated node and a target spam configuration file corresponding to an associated node associated with the updated node according to the node metadata corresponding to the updated node;
the updating module is used for updating each target spam configuration file according to the node association relation and expected state description metadata corresponding to the updating nodes and the association nodes based on the configuration file management component to obtain a new spam configuration file;
and the storage module is used for storing the new spam configuration file to the configuration file storage component. Each of the modules in the node management apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one exemplary embodiment, a computer device is provided, which may be a server, and the internal structure thereof may be as shown in fig. 8. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing spam profiles. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a node management method.
It will be appreciated by those skilled in the art that the structure shown in fig. 8 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In an exemplary embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor performing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use, and processing of the related data are required to meet the related regulations.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (11)

1. A method of node management, the method comprising:
when a target event is triggered, acquiring node operation information reported by a cluster node;
according to the node operation information, searching a spam configuration file corresponding to the node operation information in a configuration file storage component;
when the spam configuration file corresponding to the node operation information exists, verifying the dependency relationship among the nodes corresponding to the node operation information according to the node association relationship and expected state description metadata contained in the spam configuration file to obtain a verification result;
Returning a management result aiming at the node operation information according to the verification result; the management result is used for representing whether the target event is executed.
2. The method of claim 1, wherein the profile storage component comprises node metadata, the node metadata comprising a node name, a node version, and a cluster in which the node is located corresponding to the spam profile;
according to the node operation information, retrieving, in a configuration file storage component, a spam configuration file corresponding to the node operation information, including:
and searching the node name, the node version and the cluster where the node is located corresponding to the node operation information in the node metadata of the spam configuration file, and determining the spam configuration file corresponding to the node operation information.
3. The method of claim 1, wherein the expected state description metadata includes node copy number, node operational state, and node deployment area constraints;
when the spam configuration file corresponding to the node operation information exists, verifying the dependency relationship between the nodes corresponding to the node operation information according to the node association relationship and the expected state description metadata contained in the spam configuration file to obtain a verification result, wherein the verification result comprises the following steps:
When the spam configuration file corresponding to the node operation information exists in the configuration file storage component, determining a target spam configuration file corresponding to the operated node according to the node operation information;
determining a target cluster node according to the node association relation;
performing state verification on state information corresponding to the target cluster node based on node copy number, node running state and node deployment area constraint corresponding to the target cluster node in the target spam configuration file;
and under the condition that the state information of the target cluster node meets the node copy number, the node running state and the node deployment area constraint, determining the verification result as verification passing.
4. The method according to claim 1, wherein the returning of the management result for the node operation information according to the verification result includes:
and under the condition that the verification result is verification passing, determining the management result aiming at the node operation information as an allowed operation, and returning the management result to the cluster node.
5. The method according to claim 1, wherein before acquiring the node operation information reported by the cluster node when the target event is triggered, the method further comprises:
And constructing a spam configuration file aiming at the node metadata and the expected state description metadata according to the configuration file management component, and storing the spam configuration file into the configuration file storage component.
6. The method according to claim 1, wherein the method further comprises:
determining an update node in response to an update operation of the spam configuration file;
determining a target spam configuration file corresponding to the updated node and a target spam configuration file corresponding to an associated node associated with the updated node according to the node metadata corresponding to the updated node;
based on the configuration file management component, updating each target spam configuration file according to the node association relation and expected state description metadata corresponding to the updating node and the association node to obtain a new spam configuration file;
and storing the new spam configuration file to the configuration file storage component.
7. A node management apparatus, the apparatus comprising:
the acquisition module is used for acquiring node operation information reported by the cluster nodes when the target event is triggered;
the searching module is used for searching the spam configuration file corresponding to the node operation information in the configuration file storage component according to the node operation information;
The verification module is used for verifying the dependency relationship between the nodes corresponding to the node operation information according to the node association relationship and the expected state description metadata contained in the spam configuration file when the spam configuration file corresponding to the node operation information exists, so as to obtain a verification result;
the feedback module is used for returning a management result aiming at the node operation information according to the verification result; the management result is used for representing whether the target event is executed.
8. A node management system, the system comprising:
the cluster node is used for reporting node operation information to the server;
the server is used for acquiring node operation information reported by the cluster nodes when the target event is triggered; according to the node operation information, searching a spam configuration file corresponding to the node operation information in a configuration file storage component; when the spam configuration file corresponding to the node operation information exists, verifying the dependency relationship among the nodes corresponding to the node operation information according to the node association relationship and expected state description metadata contained in the spam configuration file to obtain a verification result; returning a management result aiming at the node operation information according to the verification result; the management result is used for representing whether the target event is executed.
9. The system of claim 8, wherein the cluster node is further configured to receive the management result for the node operation information, and determine to control node operation of the cluster node based on the management result.
10. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
11. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202311461272.7A 2023-11-06 2023-11-06 Node management method, device, system, computer equipment and storage medium Pending CN117519822A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311461272.7A CN117519822A (en) 2023-11-06 2023-11-06 Node management method, device, system, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311461272.7A CN117519822A (en) 2023-11-06 2023-11-06 Node management method, device, system, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117519822A true CN117519822A (en) 2024-02-06

Family

ID=89759879

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311461272.7A Pending CN117519822A (en) 2023-11-06 2023-11-06 Node management method, device, system, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117519822A (en)

Similar Documents

Publication Publication Date Title
US9965364B2 (en) Fault tolerant listener registration in the presence of node crashes in a data grid
US9292387B2 (en) Medium, control method, and information processing apparatus
CN105610987A (en) Method, application and system for managing server cluster
WO2018233630A1 (en) Fault discovery
CN112506870B (en) Data warehouse increment updating method and device and computer equipment
CN111291063B (en) Master and backup copy election method, system, computer equipment and storage medium
CN115801541B (en) Method and device for alarming slow access in full-link tracking platform and computer equipment
US9971543B2 (en) Methods and apparatus for storing electronic documents
CN117519822A (en) Node management method, device, system, computer equipment and storage medium
CN115914404A (en) Cluster flow management method and device, computer equipment and storage medium
CN115203260A (en) Abnormal data determination method and device, electronic equipment and storage medium
CN112597166A (en) Data stream task management method, system, computer device and readable storage medium
US11204890B2 (en) System and method for archiving data in a decentralized data protection system
US9912727B1 (en) Multiple concurrent in-flight replies in a distributed state system
CN114268540B (en) Rule engine optimization method, device and equipment
US8086567B2 (en) Apparatus and method for storing data
CN117539962B (en) Data processing method, device, computer equipment and storage medium
US12007969B2 (en) Automatic computer data deduplication process for application whitelisting system
US10853188B2 (en) System and method for data retention in a decentralized system
US20240054113A1 (en) Automatic computer data deduplication process for application whitelisting system
CN115454683A (en) Message processing method, system, electronic device and computer readable storage medium
CN115967678A (en) Flow limiting method and device, computer equipment and storage medium
CN117593125A (en) Service data processing method, device, computer equipment and storage medium
CN114461659A (en) Searching and killing method and device, computer equipment and storage medium
CN117453454A (en) Data backup method, device, computer equipment, medium and product

Legal Events

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