Component configuration parameter management method and device, electronic equipment and storage medium
By using control terminals and agents to compare the expected and actual configuration parameters of components in Kubernetes clusters, the actual configuration parameters are automatically updated, which solves the problem of component configuration inconsistency and improves the stability and operation and maintenance efficiency of the cluster.
Patent Information
- Application Number
- CN202411327533.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2024-12-20
AI Technical Summary
In Kubernetes clusters, component configuration inconsistencies are difficult to detect and manage, which may lead to business stability issues.
The actual configuration parameters are automatically updated for consistency by obtaining and comparing the desired configuration parameters and actual configuration parameters of the component through the agent between the control terminal and the cluster node.
It improves the observability and stability of the cluster, improves operation and maintenance efficiency, and ensures the consistency of component configuration parameters in multiple clusters.
Smart Images

Figure CN119166240A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of component parameter management, and in particular to a component configuration parameter management method, device, electronic device and storage medium. Background Art
[0002] Kubernetes (abbreviated as K8s) is an open source container orchestration and management platform for automating the deployment, scaling, and management of containerized applications.
[0003] In the specific implementation, a service component will also be deployed in multiple K8s clusters. These components may run in unexpected configurations due to various reasons (for example, temporary modifications, negligence), and the configurations of components between clusters may also be inconsistent. These potential problems are difficult to detect and may suddenly erupt at some point, affecting business stability. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a component configuration parameter management method, device, electronic device and storage medium, so as to make the component configurations in multiple clusters consistent with expectations, improve the observability of the cluster, maintain the stability of the cluster and improve the operation and maintenance efficiency. The specific technical solutions are as follows:
[0005] In a first aspect of the implementation of the present application, a component configuration parameter management method is first provided, which is applied to a control terminal, in which a control program is deployed, including:
[0006] Obtaining the target cluster, target component and expected configuration parameters corresponding to the target component added on the control interface of the control program;
[0007] Sending the component identification of the target component to the agent program of each cluster node in the target cluster;
[0008] Acquire actual configuration parameters of the target component in each of the cluster nodes collected by the agent program of each of the cluster nodes based on the component identifier;
[0009] When the expected configuration parameters are inconsistent with the actual configuration parameters, the expected configuration parameters corresponding to the target component are sent to the cluster node, so that the agent program in the cluster node updates the actual configuration parameters of the target component based on the expected configuration parameters.
[0010] In a second aspect of the implementation of the present application, a component configuration parameter management method is provided, which is applied to an agent program in a cluster node, comprising:
[0011] Obtaining a component identifier of a target component added to a control interface of a control program sent by a control terminal;
[0012] Based on the component identifier, collecting actual configuration parameters of the target component in the cluster node;
[0013] Sending the actual configuration parameters to the control terminal so that a control program in the control terminal compares the actual configuration parameters with expected configuration parameters corresponding to the target component, wherein the expected configuration parameters are expected parameters of the target component added in the control interface;
[0014] Acquire the expected configuration parameters of the target component sent by the control terminal when the expected configuration parameters are inconsistent with the actual configuration parameters;
[0015] The actual configuration parameters of the target component are updated based on the desired configuration parameters.
[0016] In a third aspect of the implementation of the present application, a component configuration parameter management device is provided, which is applied to a control terminal, wherein a control program is deployed in the control terminal, including:
[0017] An expected parameter acquisition module, used to acquire the target cluster, target component and expected configuration parameters corresponding to the target component added on the control interface of the control program;
[0018] A component identification sending module, used for sending the component identification of the target component to the agent program of each cluster node in the target cluster;
[0019] An actual parameter acquisition module, used for acquiring actual configuration parameters of the target component in each cluster node collected by the agent program of each cluster node based on the component identifier;
[0020] The expected parameter sending module is used to send the expected configuration parameters corresponding to the target component to the cluster node when the expected configuration parameters are inconsistent with the actual configuration parameters, so that the agent program in the cluster node can update the actual configuration parameters of the target component based on the expected configuration parameters.
[0021] In a fourth aspect of the implementation of the present application, a component configuration parameter management device is provided, which is applied to an agent program in a cluster node, including:
[0022] A component identification acquisition module, used to acquire the component identification of the target component added to the control interface of the control program sent by the control terminal;
[0023] An actual parameter collection module, used for collecting actual configuration parameters of the target component in the cluster node based on the component identifier;
[0024] An actual parameter sending module, used for sending the actual configuration parameters to the control terminal, so that the control program in the control terminal compares the actual configuration parameters with the expected configuration parameters corresponding to the target component, wherein the expected configuration parameters are the expected parameters of the target component added in the control interface;
[0025] An expected parameter acquisition module, used for acquiring the expected configuration parameters of the target component sent by the control terminal when the expected configuration parameters are inconsistent with the actual configuration parameters;
[0026] A configuration parameter updating module is used to update the actual configuration parameters of the target component based on the expected configuration parameters.
[0027] In another aspect of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0028] Memory, used to store computer programs;
[0029] The processor is used to implement any of the above-mentioned component configuration parameter management methods when executing the program stored in the memory.
[0030] In another aspect of the implementation of the present application, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer executes any of the component configuration parameter management methods described above.
[0031] In another aspect of the implementation of the present application, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute any of the above-mentioned component configuration parameter management methods.
[0032] The solution provided by the embodiment of the present application is to obtain the target cluster, target component and expected configuration parameters corresponding to the target component added on the control interface of the control program. The component identifier of the target component is sent to the agent program of each cluster node in the target cluster. The actual configuration parameters of the target component in each cluster node collected by the agent program of each cluster node based on the component identifier are obtained. In the case where the expected configuration parameters are inconsistent with the actual configuration parameters, the expected configuration parameters corresponding to the target component are sent to the cluster node, so that the agent program in the cluster node updates the actual configuration parameters of the target component based on the expected configuration parameters. The embodiment of the present application collects the actual configuration of the components in the cluster through the agent program, and the control program compares the actual configuration with the expected configuration, which can ensure the consistency of the component configuration parameters in multiple clusters, thereby improving the observability of the cluster, maintaining the stability of the cluster, and improving the operation and maintenance efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0034] Figure 1 A flowchart of a method for managing component configuration parameters provided in an embodiment of the present application;
[0035] Figure 2 A schematic diagram of a console adding clusters, components and expected configuration process provided in an embodiment of the present application;
[0036] Figure 3 A schematic diagram of a cluster, component, and component configuration information display process provided in an embodiment of the present application;
[0037] Figure 4 A schematic diagram of a component configuration deletion process provided in an embodiment of the present application;
[0038] Figure 5 A flowchart of another method for managing component configuration parameters provided in an embodiment of the present application;
[0039] Figure 6 A schematic diagram of a prompt information display process provided in an embodiment of the present application;
[0040] Figure 7 A schematic diagram of a configuration parameter validation process provided in an embodiment of the present application;
[0041] Figure 8 A schematic diagram of the structure of a component configuration parameter management device provided in an embodiment of the present application;
[0042] Fig. 9 A schematic diagram of the structure of another component configuration parameter management device provided in an embodiment of the present application;
[0043] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0045] Figure 1 This is a flowchart of a component configuration parameter management method provided in an embodiment of the present application. The component configuration parameter management method can be applied to a control terminal in which a control program is deployed. Figure 1 As shown, the component configuration parameter management method may include: step 101, step 102, step 103 and step 104.
[0046] Step 101: Acquire the target cluster, target component and the expected configuration parameters corresponding to the target component added on the control interface of the control program.
[0047] The embodiment of the present application can be applied to a control terminal, that is, the execution subject is a control terminal, and a control program is deployed in the control terminal. In this example, the control program can be a console, etc. The control program can be used to manage component configuration parameters in cluster nodes in multiple clusters.
[0048] The target cluster refers to the cluster that needs to manage component configuration parameters. In this example, the target cluster can be, but is not limited to, a K8s cluster.
[0049] The target component refers to the component that needs to monitor the consistency of component configuration parameters. In this example, taking the K8s cluster as an example, the target components can be: kube-api server, kube-schedu l er, etc. Among them, kube-api server provides the entrance to the Kubernetes API and is the control center of the cluster. Kube-schedu l er is responsible for selecting appropriate nodes for deployment of new Pods (Pods are the smallest deployable computing units in Kubernetes) based on the resource conditions and scheduling policies of each node.
[0050] The expected configuration parameters refer to the configuration parameters that the target component expects to achieve when input by the user.
[0051] When comparing component configuration parameters for consistency, the user can open the control interface of the control program and add the target cluster, target component, and the desired configuration parameters corresponding to the target component in the control interface. Specifically, the control interface displays input boxes for clusters, components, and desired parameters, and the user enters the cluster ID, component ID, and desired configuration parameters in the corresponding input boxes. The process of adding clusters, components, and desired configurations to the console can be combined with Figure 2 This is described in detail as follows.
[0052] Reference Figure 2 , shows a schematic diagram of a console adding clusters, components and expected configuration process provided by an embodiment of the present application. Figure 2 As shown, the process may include:
[0053] 1. The user clicks the "Add" button on the console page. This event is monitored by the console, and the console will process this event.
[0054] 2. A new interface will pop up on the console, prompting the user to enter the cluster, components, and expected configuration information of the components to be added. After the user completes the addition, click the "Submit" button on the interface.
[0055] 3. After the console detects that the "Submit" button is clicked, it collects the information submitted by the user and stores it in the database.
[0056] After obtaining the target cluster, target component, and the desired configuration parameters corresponding to the target component added on the control interface of the control program, step 102 is executed.
[0057] Step 102: Send the component identifier of the target component to the agent program of each cluster node in the target cluster.
[0058] The proxy program is an application with forwarding function. In this example, the proxy program can serve as an intermediary program for the control program to communicate with the backend cluster nodes.
[0059] After obtaining the target cluster, target component, and the expected configuration parameters corresponding to the target component added on the control interface of the control program, the component identifier of the target component (in this example, the component identifier can be the inherent attribute information of the target component (such as the name, etc.)) can be sent to the agent program of each cluster node in the target cluster. In a specific implementation, the control program can communicate with the agent program through a socket. After the user adds the target cluster, target component, and the expected configuration parameters corresponding to the target component in the control interface, the control program can add the target cluster, target component, and the expected configuration parameters corresponding to the target component added by the user to the database. At the same time, the component identifier of the target component can be sent to the agent program of each cluster node in the target cluster through the socket.
[0060] After the component identifier of the target component is sent to the agent program of each cluster node in the target cluster, step 103 is executed.
[0061] Step 103: Acquire actual configuration parameters of the target component in each cluster node collected by the agent program of each cluster node based on the component identifier.
[0062] After the component identification of the target component is sent to the agent program of each cluster node in the target cluster, the agent program in each cluster node can collect the actual configuration parameters of the target component in each cluster node based on the component identification. Then, the agent program forwards the collected actual configuration parameters of the target component in each cluster node to the control program.
[0063] After the actual configuration parameters of the target components in each cluster node collected by the agent program of each cluster node based on the component identifier are acquired, step 104 is executed.
[0064] Step 104: When the expected configuration parameters are inconsistent with the actual configuration parameters, the expected configuration parameters corresponding to the target component are sent to the cluster node, so that the agent program in the cluster node updates the actual configuration parameters of the target component based on the expected configuration parameters.
[0065] After obtaining the actual configuration parameters of the target components in each cluster node collected by the agent program of each cluster node based on the component identifier, it can be compared whether the expected configuration parameters of the target component are consistent with the actual configuration parameters of the target component.
[0066] If they are consistent, it can be determined that the actual configuration parameters of the target component are consistent with the expected configuration parameters of the target component, and no subsequent operations are required.
[0067] If there is any inconsistency, the actual configuration parameters of the target component need to be updated. At this time, the control program can send the expected configuration parameters corresponding to the target component to the cluster nodes, so that the agent program in the cluster nodes can update the actual configuration parameters of the target component based on the expected configuration parameters of the target component, thereby achieving consistency between the actual configuration parameters of the target component and the expected configuration parameters.
[0068] In this embodiment, when the comparison is inconsistent, a reminder message can be displayed on the control interface to prompt the user whether to make changes. If the user chooses to make changes, the expected configuration parameters can be sent to the agent program in the cluster node. Specifically, when the expected configuration parameters of the target component are inconsistent with the actual configuration parameters, a prompt message of the inconsistency of the component configuration parameters of the target component can be output on the control interface. If the user chooses to modify the parameters, the user can click the "Synchronize" button in the control interface to generate a parameter modification operation. After receiving the parameter modification operation for the target component triggered in the control interface. In response to the parameter modification operation, the expected configuration parameters corresponding to the target component can be sent to the agent program, so that the agent program updates the actual configuration parameters of the target component based on the expected configuration parameters of the target component, and achieves consistency between the actual configuration parameters of the target component and the expected configuration parameters.
[0069] In a specific implementation of the present application, after receiving a parameter modification operation for a target component triggered in a control interface, a parameter update instruction corresponding to the target component can be generated, and then the parameter update instruction and the expected configuration parameters can be sent to the agent program, so that the agent program responds to the parameter update instruction and updates the actual configuration parameters of the target component based on the expected configuration parameters of the target component.
[0070] The embodiment of the present application collects the actual configuration of components in the cluster through an agent program, and the control program compares the actual configuration with the expected configuration, which can ensure the consistency of component configuration parameters in multiple clusters, thereby improving the observability of the cluster, maintaining the stability of the cluster and improving operation and maintenance efficiency.
[0071] In this embodiment, when one or more components in the target component need to be deleted, the user can perform a component deletion operation in the control interface. The implementation process can be described in detail in conjunction with the following specific implementation methods.
[0072] In a specific implementation of the present application, after the above step 104, the following may also be included:
[0073] Step S1: receiving a deletion operation on a first component in the control interface, where the first component is a component in the target component.
[0074] In this embodiment, when the user needs to delete the first component in the target component, the user can perform a deletion operation on the first component in the control interface. The first component may be one or more components in the target component.
[0075] In actual applications, the user can open the control interface and display all target components in the control interface, so that the user can perform a deletion operation on the first component in the target component. Figure 3 This is described in detail as follows.
[0076] Reference Figure 3 , which shows a schematic diagram of a cluster, component, and component configuration information display process provided by an embodiment of the present application. Figure 3 As shown, the process may include:
[0077] 1. The user opens the console interface. Specifically, after the user logs in to the console, a button for the console interface is displayed on the main page of the console, and the user can open the console interface by clicking the button.
[0078] 2. The console queries the database for the cluster, target component, and expected configuration information added by the user. After the user opens the console interface, the console can automatically obtain the target cluster, target component, and expected configuration information previously added by the user.
[0079] 3. The console interface is displayed based on the queried configuration information. After the console automatically obtains the target cluster, target component, and expected configuration information previously added by the user, the cluster, component, and expected configuration information added by the user can be displayed in the console interface.
[0080] A "delete" button may be displayed behind each component in the console interface, and the user may click the "delete" button to generate a deletion operation for the first component.
[0081] Step S2: deleting the first component and the component configuration parameters of the first component from the component database.
[0082] After receiving a deletion operation on the first component in the control interface, the first component and the component configuration parameters of the first component may be deleted from the component database.
[0083] For component deletion process, you can combine Figure 4 This is described in detail as follows.
[0084] Reference Figure 4 , showing a schematic diagram of a component configuration deletion process provided in an embodiment of the present application.
[0085] like Figure 4 As shown, the process may include:
[0086] 1. The user clicks the "Delete" button on the console interface to prepare to delete components and configuration information.
[0087] 2. The console listens to the "Delete" button being clicked, queries the database, and displays all added components for the user to select the components to be deleted.
[0088] 3. After the user selects the components and clicks the "Confirm" button, the console deletes these components and their configuration information from the database.
[0089] The embodiment of the present application enables the user to add and delete components in the control interface, thereby achieving customized management of component configuration parameters, improving user operability and efficiency of component management.
[0090] The component configuration parameter management method provided in the embodiment of the present application is achieved by obtaining the target cluster, target component and expected configuration parameters corresponding to the target component added on the control interface of the control program. The component identifier of the target component is sent to the agent program of each cluster node in the target cluster. The actual configuration parameters of the target component in each cluster node collected by the agent program of each cluster node based on the component identifier are obtained. In the case where the expected configuration parameters are inconsistent with the actual configuration parameters, the expected configuration parameters corresponding to the target component are sent to the cluster node, so that the agent program in the cluster node updates the actual configuration parameters of the target component based on the expected configuration parameters. The embodiment of the present application collects the actual configuration of the components in the cluster through the agent program, and the control program compares the actual configuration with the expected configuration, which can ensure the consistency of the component configuration parameters in multiple clusters, thereby improving the observability of the cluster, maintaining the stability of the cluster, and improving the operation and maintenance efficiency.
[0091] Figure 5 This is a flowchart of another component configuration parameter management method provided in an embodiment of the present application. The component configuration parameter management method can be applied to an agent program in a cluster node. Figure 5 As shown, the component configuration parameter management method may include: step 501, step 502, step 503, step 504 and step 505.
[0092] Step 501: Acquire the component identifier of the target component added to the control interface of the control program sent by the control terminal.
[0093] The embodiments of the present application can be applied to an agent program, that is, the execution subject is the agent program.
[0094] In a specific implementation, the target component is the component for which actual configuration parameters need to be collected. The component identifier is a unique identifier used to represent the identity of the target component. In this example, the component identifier can be inherent attribute information of the target component, such as the component name of the target component.
[0095] In this embodiment, the agent program can obtain the component identification of the target component added on the control interface of the control program sent by the control terminal. In a specific implementation, when comparing the consistency of component configuration parameters, the user can open the control interface of the control program and add the target cluster, target component and the expected configuration parameters corresponding to the target component in the control interface. Specifically, input boxes for clusters, components and expected parameters are displayed in the control interface, and the user enters the cluster identification, component identification and expected configuration parameters in the corresponding input boxes. At this time, the control program can send the component identification of the target component to the agent program.
[0096] After obtaining the component identifier of the target component added to the control interface of the control program sent by the control terminal, step 502 is executed.
[0097] Step 502: Based on the component identifier, actual configuration parameters of the target component in the cluster node are collected.
[0098] After obtaining the component identifier of the target component added to the control interface of the control program sent by the control terminal, the actual configuration parameters of the target component in the cluster node can be collected based on the component identifier. In this embodiment, a preset configuration parameter collection cycle can be obtained, and the actual configuration parameters of the target component corresponding to the component identifier in the cluster node can be collected according to the configuration parameter collection cycle.
[0099] After the actual configuration parameters of the target component in the cluster node are collected based on the component identifier, step 503 is executed.
[0100] Step 503: Send the actual configuration parameters to the control terminal so that the control program in the control terminal compares the actual configuration parameters with the expected configuration parameters corresponding to the target component, where the expected configuration parameters are the expected parameters of the target component added in the control interface.
[0101] After the actual configuration parameters of the target component in the cluster node are collected based on the component identification, the actual configuration parameters can be sent to the control terminal so that the control program in the control terminal can compare the actual configuration parameters of the target component with the expected configuration parameters of the target component, where the expected configuration parameters can be the expected parameters of the target component added in the control interface.
[0102] In this embodiment, the agent program can be connected to the control program through a socket, and after collecting the actual configuration parameters of the target component, the agent program can send the collected actual configuration parameters of the target component to the control program through the socket.
[0103] After the collected actual configuration parameters of the target component are sent to the control program, step 504 is executed.
[0104] Step 504: Obtain the expected configuration parameters of the target component sent by the control terminal when the expected configuration parameters are inconsistent with the actual configuration parameters.
[0105] The expected configuration parameters are configuration parameters that need to be updated for the target components in the cluster nodes.
[0106] After sending the collected actual configuration parameters of the target component to the control program, the control program can compare whether the expected configuration parameters of the target component are consistent with the actual configuration parameters of the target component. When the comparison is inconsistent, a reminder message can be displayed on the control interface to prompt the user whether to make modifications. If the user chooses to make modifications, the expected configuration parameters can be sent to the agent program. Specifically, when the expected configuration parameters of the target component are inconsistent with the actual configuration parameters, a prompt message indicating that the component configuration parameters of the target component are inconsistent can be output on the control interface. If the user chooses to modify the parameters, the user can click the "Synchronize" button in the control interface to generate a parameter modification operation. After receiving the parameter modification operation for the target component triggered in the control interface. In response to the parameter modification operation, the expected configuration parameters corresponding to the target component can be sent to the agent program.
[0107] For the prompt process, you can combine Figure 6 The following is a detailed description. Figure 6 As shown, the process may include:
[0108] 1. The agent communicates with the console through the socket to obtain the components that the user is interested in.
[0109] 2. The agent program obtains the actual configuration information of the component from the machine on which it runs based on the obtained component of interest, and reports the actual configuration information of the component to the console.
[0110] 3. After receiving the actual configuration information of the component reported by the agent, the console compares this information with the expected configuration.
[0111] 4. If it is found that the actual configuration value is inconsistent with the expected value, a reminder will be given after the corresponding configuration, and a "synchronize" button will be set for the user to issue instructions and perform synchronization operations to keep the actual configuration consistent with the expected configuration.
[0112] 5. Step 2, step 3, and step 4 are performed periodically to facilitate timely discovery of differences between actual configuration and expected configuration.
[0113] After obtaining the expected configuration parameters of the target component sent by the control terminal when the expected configuration parameters are inconsistent with the actual configuration parameters, step 505 is executed.
[0114] Step 505: Update the actual configuration parameters of the target component based on the expected configuration parameters.
[0115] After obtaining the expected configuration parameters of the target component sent by the control terminal when the expected configuration parameters are inconsistent with the actual configuration parameters, the actual configuration parameters of the target component in the node can be updated based on the expected configuration parameters of the target component.
[0116] The embodiment of the present application collects the actual configuration of components in the cluster through an agent program, and the control program compares the actual configuration with the expected configuration, which can ensure the consistency of component configuration parameters in multiple clusters, thereby improving the observability of the cluster, maintaining the stability of the cluster and improving operation and maintenance efficiency.
[0117] In this embodiment, after the actual configuration parameters in the node are updated, the expected configuration parameters can be made effective through the parameter effectiveness method. The implementation process can be described in detail in conjunction with the following specific implementation methods.
[0118] In a specific implementation of the present application, after the above step 505, the following may also be included:
[0119] Step N1: Generate a parameter validation mode of a component process corresponding to the target component.
[0120] In this embodiment, after the actual configuration parameters of the target component in the node are updated based on the expected configuration parameters of the target component, a parameter validation mode of the component process corresponding to the target component may be generated. Specifically, the parameter validation mode may include but is not limited to: component process restart and other modes.
[0121] After the parameter validation mode of the component process corresponding to the target component is generated, step N2 is executed.
[0122] Step N2: Send the parameter validation method to the component process, so that the component process processes the parameter validation method to make the expected configuration parameters effective.
[0123] After generating the parameter validation mode of the component process corresponding to the target component, the parameter validation mode can be sent to the component process, so that the component process can process it according to the parameter validation mode to make the expected configuration parameters effective. Figure 7 This is described in detail as follows.
[0124] Reference Figure 7 , showing a schematic diagram of a configuration parameter effectiveness process provided in an embodiment of the present application.
[0125] like Figure 7 As shown, the process may include:
[0126] 1. The user finds that the actual configuration is inconsistent with the expected configuration on the console interface and clicks the "Synchronize" button to synchronize the configuration.
[0127] 2. After the console detects that the "Synchronize" button is clicked, it sends a synchronization instruction to the agent program on the corresponding machine through socket network communication, and sends the expected configuration together.
[0128] 3. After receiving the synchronization instruction and the corresponding expected configuration information, the agent program modifies the component configuration according to the expected configuration.
[0129] 4. After the modification is completed, the agent program sends signals to the corresponding component process and restarts the component process as needed to make the modified configuration effective.
[0130] The component configuration parameter management method provided in the embodiment of the present application is achieved by obtaining the component identification of the target component added on the control interface of the control program sent by the control terminal. Based on the component identification, the actual configuration parameters of the target component in the cluster node are collected. The actual configuration parameters are sent to the control terminal so that the control program in the control terminal compares the actual configuration parameters with the expected configuration parameters corresponding to the target component, where the expected configuration parameters are the expected parameters of the target component added by the user in the control interface. The expected configuration parameters of the target component sent by the control terminal when the expected configuration parameters are inconsistent with the actual configuration parameters are obtained. The actual configuration parameters of the target component are updated based on the expected configuration parameters. The embodiment of the present application collects the actual configuration of the components in the cluster through the agent program, and the control program compares the actual configuration with the expected configuration, which can ensure the consistency of the component configuration parameters in multiple clusters, thereby improving the observability of the cluster, maintaining the stability of the cluster, and improving the operation and maintenance efficiency.
[0131] Reference Figure 8 , shows a schematic diagram of the structure of a component configuration parameter management device provided by an embodiment of the present application, the component configuration parameter management device can be applied to a control terminal, in which a control program is deployed. Figure 8 As shown, the component configuration parameter management device 800 may include the following modules:
[0132] An expected parameter acquisition module 810 is used to acquire the target cluster, target component and expected configuration parameters corresponding to the target component added on the control interface of the control program;
[0133] A component identification sending module 820, configured to send the component identification of the target component to the agent program of each cluster node in the target cluster;
[0134] An actual parameter acquisition module 830, configured to acquire actual configuration parameters of the target component in each cluster node collected by an agent program of each cluster node based on the component identifier;
[0135] The expected parameter sending module 840 is used to send the expected configuration parameters corresponding to the target component to the cluster node when the expected configuration parameters are inconsistent with the actual configuration parameters, so that the agent program in the cluster node can update the actual configuration parameters of the target component based on the expected configuration parameters.
[0136] Optionally, the expected parameter sending module includes:
[0137] a prompt information output unit, configured to output prompt information indicating that the component configuration parameters of the target component are inconsistent on the control interface when the expected configuration parameters are inconsistent with the actual configuration parameters;
[0138] A modification operation receiving unit, configured to receive a parameter modification operation for the target component triggered in the control interface;
[0139] The expected parameter sending unit is used to send the expected configuration parameters corresponding to the target component to the agent program in response to the parameter modification operation.
[0140] Optionally, the expected parameter sending module includes:
[0141] A parameter update instruction generating unit, used to generate a parameter update instruction corresponding to the target component;
[0142] The expected configuration parameter sending unit is used to send the parameter update instruction and the expected configuration parameter to the cluster node, so that the agent program in the cluster node responds to the parameter update instruction and updates the actual configuration parameter of the target component based on the expected configuration parameter.
[0143] Optionally, the device further comprises:
[0144] A deletion operation receiving module, used for receiving a deletion operation on a first component in the control interface, where the first component is a component in the target component;
[0145] A configuration parameter deleting module is used to delete the first component and the component configuration parameters of the first component from a component database.
[0146] The component configuration parameter device provided in the embodiment of the present application obtains the target cluster, target component and expected configuration parameters corresponding to the target component added on the control interface of the control program. The component identification of the target component is sent to the agent program of each cluster node in the target cluster. The actual configuration parameters of the target component in each cluster node collected by the agent program of each cluster node based on the component identification are obtained. In the case where the expected configuration parameters are inconsistent with the actual configuration parameters, the expected configuration parameters corresponding to the target component are sent to the cluster node, so that the agent program in the cluster node updates the actual configuration parameters of the target component based on the expected configuration parameters. The embodiment of the present application collects the actual configuration of the components in the cluster through the agent program, and the control program compares the actual configuration with the expected configuration, which can ensure the consistency of the component configuration parameters in multiple clusters, thereby improving the observability of the cluster, maintaining the stability of the cluster, and improving the operation and maintenance efficiency.
[0147] Reference Fig. 9 , shows a schematic diagram of the structure of a component configuration parameter management device provided by an embodiment of the present application, and the component configuration parameter management device can be applied to an agent program in a cluster node. Fig. 9 As shown, the component configuration parameter management device 900 may include the following modules:
[0148] A component identification acquisition module 910 is used to acquire a component identification of a target component added to a control interface of a control program sent by the control program;
[0149] An actual parameter collection module 920, configured to collect actual configuration parameters of the target component in the cluster node based on the component identifier;
[0150] An actual parameter sending module 930 is used to send the actual configuration parameters to the control terminal, so that the control program in the control terminal compares the actual configuration parameters with the expected configuration parameters corresponding to the target component, where the expected configuration parameters are the expected parameters of the target component added in the control interface;
[0151] An expected parameter acquisition module 940 is used to acquire the expected configuration parameters of the target component sent by the control terminal when the expected configuration parameters are inconsistent with the actual configuration parameters;
[0152] The configuration parameter updating module 950 is used to update the actual configuration parameters of the target component based on the expected configuration parameters.
[0153] Optionally, the actual parameter acquisition module includes:
[0154] A collection period acquisition unit, used to acquire a preset configuration parameter collection period;
[0155] The actual parameter collection unit is used to collect the actual configuration parameters of the target component corresponding to the component identifier in the cluster node according to the configuration parameter collection period.
[0156] Optionally, the device further comprises:
[0157] A parameter validation mode generation module, used to generate a parameter validation mode of a component process corresponding to the target component;
[0158] The parameter validation mode sending module is used to send the parameter validation mode to the component process, so that the component process processes the parameter validation mode to make the expected configuration parameters effective.
[0159] The component configuration parameter management device provided in the embodiment of the present application obtains the component identification of the target component added on the control interface of the control program sent by the control terminal. Based on the component identification, the actual configuration parameters of the target component in the cluster node are collected. The actual configuration parameters are sent to the control program so that the control program compares the actual configuration parameters with the expected configuration parameters corresponding to the target component, and the expected configuration parameters are the expected parameters of the target component added by the user in the control interface. The expected configuration parameters of the target component sent by the control terminal when the expected configuration parameters are inconsistent with the actual configuration parameters are obtained. The actual configuration parameters of the target component are updated based on the expected configuration parameters. The embodiment of the present application collects the actual configuration of the components in the cluster through the agent program, and the control program compares the actual configuration with the expected configuration, which can ensure the consistency of the component configuration parameters in multiple clusters, thereby improving the observability of the cluster, maintaining the stability of the cluster, and improving the operation and maintenance efficiency.
[0160] The present application also provides an electronic device, such as Fig.10 As shown, it includes a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002, and the memory 1003 communicate with each other through the communication bus 1004.
[0161] Memory 1003, used for storing computer programs;
[0162] The processor 1001 is used to execute the program stored in the memory 1003, and implements the following steps:
[0163] Obtaining the target cluster, target component and expected configuration parameters corresponding to the target component added on the control interface of the control program;
[0164] Sending the component identification of the target component to the agent program of each cluster node in the target cluster;
[0165] Acquire actual configuration parameters of the target component in each of the cluster nodes collected by the agent program of each of the cluster nodes based on the component identifier;
[0166] When the expected configuration parameters are inconsistent with the actual configuration parameters, the expected configuration parameters corresponding to the target component are sent to the cluster node, so that the agent program in the cluster node updates the actual configuration parameters of the target component based on the expected configuration parameters.
[0167] Optionally, sending the expected configuration parameters corresponding to the target component to the agent program includes:
[0168] When the expected configuration parameters are inconsistent with the actual configuration parameters, outputting prompt information indicating that the component configuration parameters of the target component are inconsistent on the control interface;
[0169] Receiving a parameter modification operation for the target component triggered in the control interface;
[0170] In response to the parameter modification operation, the desired configuration parameters corresponding to the target component are sent to the agent program.
[0171] Optionally, sending the expected configuration parameters corresponding to the target component to the cluster node so that the agent program in the cluster node updates the actual configuration parameters of the target component based on the expected configuration parameters includes:
[0172] Generate a parameter update instruction corresponding to the target component;
[0173] The parameter update instruction and the expected configuration parameters are sent to the cluster node, so that the agent program in the cluster node responds to the parameter update instruction and updates the actual configuration parameters of the target component based on the expected configuration parameters.
[0174] Optionally, after sending the expected configuration parameters corresponding to the target component to the cluster node so that the agent program in the cluster node updates the actual configuration parameters of the target component based on the expected configuration parameters, the method further includes:
[0175] receiving a deletion operation on a first component in the control interface, where the first component is a component in the target component;
[0176] The first component and component configuration parameters of the first component are deleted from a component database.
[0177] The processor 1001 is also used to implement the following steps when executing the program stored in the memory 1003:
[0178] Acquire a component identifier of a target component added to a control interface of the control program sent by a control terminal;
[0179] Based on the component identifier, collecting actual configuration parameters of the target component in the cluster node;
[0180] Sending the actual configuration parameters to the control terminal so that a control program in the control terminal compares the actual configuration parameters with expected configuration parameters corresponding to the target component, wherein the expected configuration parameters are expected parameters of the target component added in the control interface;
[0181] Acquire the expected configuration parameters of the target component sent by the control terminal when the expected configuration parameters are inconsistent with the actual configuration parameters;
[0182] The actual configuration parameters of the target component are updated based on the desired configuration parameters.
[0183] Optionally, the collecting actual configuration parameters of the target component in the cluster node based on the component identifier includes:
[0184] Obtain the preset configuration parameter collection cycle;
[0185] According to the configuration parameter collection period, actual configuration parameters of the target component corresponding to the component identifier in the cluster node are collected.
[0186] Optionally, after the actual configuration parameters of the target component are updated based on the expected configuration parameters, the method further includes:
[0187] Generate a parameter validation mode of a component process corresponding to the target component;
[0188] The parameter validation mode is sent to the component process, so that the component process processes the parameter according to the parameter validation mode to make the expected configuration parameters effective.
[0189] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0190] The communication interface is used for communication between the above terminal and other devices.
[0191] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0192] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0193] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is executed on a computer, the computer executes the component configuration parameter management method described in any of the above embodiments.
[0194] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the component configuration parameter management method described in any one of the above embodiments.
[0195] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0196] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0197] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0198] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A component configuration parameter management method, characterized in that: Applied to a control terminal, wherein a control program is deployed in the control terminal, including: Obtaining the target cluster, target component and expected configuration parameters corresponding to the target component added on the control interface of the control program; Sending the component identification of the target component to the agent program of each cluster node in the target cluster; Acquire actual configuration parameters of the target component in each of the cluster nodes collected by the agent program of each of the cluster nodes based on the component identifier; When the expected configuration parameters are inconsistent with the actual configuration parameters, the expected configuration parameters corresponding to the target component are sent to the cluster node, so that the agent program in the cluster node updates the actual configuration parameters of the target component based on the expected configuration parameters.
2. The method according to claim 1, characterized in that The sending the expected configuration parameters corresponding to the target component to the agent program includes: When the expected configuration parameters are inconsistent with the actual configuration parameters, outputting prompt information indicating that the component configuration parameters of the target component are inconsistent on the control interface; Receiving a parameter modification operation for the target component triggered in the control interface; In response to the parameter modification operation, the desired configuration parameters corresponding to the target component are sent to the agent program.
3. The method according to claim 1, characterized in that: The sending of the expected configuration parameters corresponding to the target component to the cluster node so that the agent program in the cluster node updates the actual configuration parameters of the target component based on the expected configuration parameters includes: Generate a parameter update instruction corresponding to the target component; The parameter update instruction and the expected configuration parameters are sent to the cluster node, so that the agent program in the cluster node responds to the parameter update instruction and updates the actual configuration parameters of the target component based on the expected configuration parameters.
4. The method according to claim 1, characterized in that: After sending the expected configuration parameters corresponding to the target component to the cluster node so that the agent program in the cluster node updates the actual configuration parameters of the target component based on the expected configuration parameters, the method further includes: receiving a deletion operation on a first component in the control interface, where the first component is a component in the target component; The first component and component configuration parameters of the first component are deleted from a component database.
5. A component configuration parameter management method, characterized in that: Agents applied to cluster nodes include: Obtaining a component identifier of a target component added to a control interface of a control program sent by a control terminal; Based on the component identifier, collecting actual configuration parameters of the target component in the cluster node; Sending the actual configuration parameters to the control terminal so that a control program in the control terminal compares the actual configuration parameters with expected configuration parameters corresponding to the target component, wherein the expected configuration parameters are expected parameters of the target component added in the control interface; Acquire the expected configuration parameters of the target component sent by the control terminal when the expected configuration parameters are inconsistent with the actual configuration parameters; The actual configuration parameters of the target component are updated based on the desired configuration parameters.
6. The method according to claim 5, characterized in that The collecting actual configuration parameters of the target component in the cluster node based on the component identifier includes: Obtain a preset configuration parameter collection cycle; According to the configuration parameter collection period, actual configuration parameters of the target component corresponding to the component identifier in the cluster node are collected.
7. The method according to claim 5, characterized in that After the actual configuration parameters of the target component are updated based on the expected configuration parameters, the method further includes: Generate a parameter validation mode of a component process corresponding to the target component; The parameter validation mode is sent to the component process, so that the component process processes the parameter according to the parameter validation mode to make the expected configuration parameters effective.
8. A component configuration parameter management device, characterized in that: Applied to a control terminal, wherein a control program is deployed in the control terminal, including: An expected parameter acquisition module, used to acquire the target cluster, target component and expected configuration parameters corresponding to the target component added on the control interface of the control program; A component identification sending module, used for sending the component identification of the target component to the agent program of each cluster node in the target cluster; An actual parameter acquisition module, used for acquiring actual configuration parameters of the target component in each cluster node collected by the agent program of each cluster node based on the component identifier; The expected parameter sending module is used to send the expected configuration parameters corresponding to the target component to the cluster node when the expected configuration parameters are inconsistent with the actual configuration parameters, so that the agent program in the cluster node can update the actual configuration parameters of the target component based on the expected configuration parameters.
9. A component configuration parameter management device, characterized in that: Agents applied to cluster nodes include: A component identification acquisition module, used to acquire the component identification of the target component added to the control interface of the control program sent by the control terminal; An actual parameter collection module, used for collecting actual configuration parameters of the target component in the cluster node based on the component identifier; An actual parameter sending module, used for sending the actual configuration parameters to the control terminal, so that the control program in the control terminal compares the actual configuration parameters with the expected configuration parameters corresponding to the target component, wherein the expected configuration parameters are the expected parameters of the target component added in the control interface; An expected parameter acquisition module, used for acquiring the expected configuration parameters of the target component sent by the control terminal when the expected configuration parameters are inconsistent with the actual configuration parameters; A configuration parameter updating module is used to update the actual configuration parameters of the target component based on the expected configuration parameters.
10. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-7 when executing a program stored in a memory.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
12. A computer program product comprising instructions, characterized in that When the method is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 7.
