A cluster node IP modification method and device
The method and device for cluster node IP modification using a virtual IP service simplify and expedite the process by enabling centralized management of IP changes across multiple nodes, addressing inefficiencies in existing manual methods.
Patent Information
- Application Number
- CN202211015283.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-23
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2042-08-23
AI Technical Summary
The existing method for modifying cluster node IP addresses is cumbersome and inefficient, particularly when multiple nodes are involved, requiring manual login and configuration on each node.
A method and device that deploy an IP address modification service on each cluster node, utilizing a virtual IP that can be bound to any node, allowing centralized management of IP address changes through a first node that receives and executes modification requests, logs in to other nodes, writes new addresses, and optionally migrates the virtual IP to complete the process.
Simplifies the IP modification process and significantly enhances efficiency by allowing centralized management of IP changes across multiple nodes without manual intervention on each node, ensuring seamless communication during the process.
Smart Images

Figure CN115499314B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cluster technology, and in particular to a cluster node IP modification method and device. Background Art
[0002] A server cluster refers to a group of servers that are brought together to provide the same service. Each server in the server cluster is called a cluster node.
[0003] From the client's point of view, the cluster is like a single server. The cluster can use multiple computers for parallel computing to achieve high computing speed, and can also use multiple computers for backup, so that if any machine fails, the entire system can still operate normally, ensuring high availability of the service.
[0004] When the production environment is facing relocation or network re-planning, the IP of the cluster node needs to be modified to meet the new network requirements. Then, to modify the server IP, you need to modify the configuration file of the IP address of the server's corresponding network card and restart the network configuration to make the new IP permanent.
[0005] Taking a three-machine cluster as an example, when a network change is required, the user needs to manually log in to each node of the cluster and execute the IP modification command to complete the IP modification and achieve the purpose of network change.
[0006] However, when there are many cluster nodes, the modification process of cluster node IP using the above method is cumbersome and the modification efficiency is low. Therefore, there is an urgent need for an efficient and unified method for modifying cluster node IP to solve the above technical problems. Summary of the invention
[0007] The present application provides a method and device for modifying the IP address of a cluster node, so as to solve the problems of complicated modification process and low modification efficiency in the prior art.
[0008] In a first aspect, the present application provides a cluster node IP modification method, which is applied to a cluster node, wherein the cluster includes a plurality of cluster nodes, an IP address modification service is deployed on each cluster node, and a virtual IP is provided for the IP address modification service of the cluster, and the virtual IP can be bound to any cluster node of the cluster, and the method includes:
[0009] The first cluster node receives an IP address modification request sent by the client, wherein the first cluster node is a cluster node bound to the virtual IP, and the IP address modification request includes a node identifier of each second cluster node to be modified and modified IP address information;
[0010] The first cluster node starts the IP address modification service, and performs the following operations on each second cluster node based on the IP address modification service:
[0011] Determining the modified IP address information of the second cluster node based on the node identifier of the second cluster node and the IP address modification request;
[0012] Log in to the second cluster node, and write the modified IP address of the second cluster node into the network card of the second cluster node.
[0013] Optionally, if the second cluster nodes include the first cluster node, after determining that the other second cluster nodes except the first cluster node have completed the IP address modification, the method further includes:
[0014] Migrate the virtual IP to a target cluster node, which is any second cluster node except the first cluster node, so that the target cluster node starts an IP address modification service, logs in to the first cluster node, and writes the modified IP address of the first cluster node into the network card of the first cluster node.
[0015] Optionally, the cluster further includes a shared storage accessible to each cluster node, and the method further includes:
[0016] The node identification of each second cluster node that needs to be modified and the modified IP address information are stored in the shared storage, and after it is determined that the modification of the IP address of a second cluster node is completed, the modification result is recorded in the shared storage.
[0017] Optionally, after writing the modified IP address of the second cluster node into the network card of the second cluster node, the method further includes:
[0018] The first cluster node sends a network card service restart instruction to the second cluster node based on the IP address modification service.
[0019] Optionally, the step of logging into the second cluster node includes:
[0020] The IP address modification service of the first cluster node logs in to the second cluster node through the secure shell protocol SSH.
[0021] In a second aspect, the present application provides a cluster node IP modification device, which is applied to a first cluster node, the cluster includes a plurality of cluster nodes, an IP address modification service is deployed on each cluster node, a virtual IP is set for the IP address modification service of the cluster, and the virtual IP can be bound to the first cluster node, the device includes:
[0022] A receiving unit, configured to receive an IP address modification request sent by a client, wherein the first cluster node is a cluster node bound to the virtual IP, and the IP address modification request includes a node identifier of each second cluster node to be modified and modified IP address information;
[0023] The startup unit is used to start the IP address modification service and perform the following operations on each second cluster node based on the IP address modification service:
[0024] Determining the modified IP address information of the second cluster node based on the node identifier of the second cluster node and the IP address modification request;
[0025] Log in to the second cluster node, and write the modified IP address of the second cluster node into the network card of the second cluster node.
[0026] Optionally, if the second cluster nodes include the first cluster node, after determining that the other second cluster nodes except the first cluster node have completed the IP address modification, the device further includes:
[0027] A migration unit is used to migrate the virtual IP to a target cluster node, where the target cluster node is any second cluster node other than the first cluster node, so that the target cluster node starts an IP address modification service, logs in to the first cluster node, and writes the modified IP address of the first cluster node into the network card of the first cluster node.
[0028] Optionally, the cluster further includes a shared storage accessible to each cluster node, and the device further includes:
[0029] The storage unit is used to store the node identification of each second cluster node that needs to be modified and the modified IP address information in the shared storage, and after determining that the IP address modification of a second cluster node is completed, record the modification result in the shared storage.
[0030] Optionally, after writing the modified IP address of the second cluster node into the network card of the second cluster node, the device further includes:
[0031] The sending unit is used to send a network card service restart instruction to the second cluster node based on the IP address modification service.
[0032] Optionally, when logging into the second cluster node, the startup unit is specifically used to:
[0033] Log in to the second cluster node through the secure shell protocol SSH.
[0034] In a third aspect, an embodiment of the present application provides a device for modifying an IP address of a cluster node, the device comprising:
[0035] A memory for storing program instructions;
[0036] The processor is used to call the program instructions stored in the memory, and execute the steps of the method as described in any one of the first aspects above according to the obtained program instructions.
[0037] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the steps of the method described in any one of the first aspects above.
[0038] In summary, the method for modifying the IP of a cluster node provided in an embodiment of the present application is applied to a cluster node, the cluster includes several cluster nodes, an IP address modification service is deployed on each cluster node, a virtual IP is set for the IP address modification service of the cluster, and the virtual IP can be bound to any cluster node of the cluster, the method includes: a first cluster node receives an IP address modification request sent by a client, wherein the first cluster node is a cluster node bound to the virtual IP, and the IP address modification request includes the node identifier of each second cluster node to be modified and the modified IP address information; the first cluster node starts the IP address modification service, and based on the IP address modification service, performs the following operations for each second cluster node: based on the node identifier of a second cluster node and the IP address modification request, determines the modified IP address information of the second cluster node; logs in to the second cluster node, and writes the modified IP address of the second cluster node into the network card of the second cluster node.
[0039] The method for modifying the IP address of a cluster node provided in an embodiment of the present application is adopted. By deploying an IP address modification service on each node in the cluster, a virtual IP is set for the cluster and bound to the target node. The target node is controlled to complete the IP address modification operation of other nodes by accessing the virtual IP. There is no need to log in to the background of each node one by one to modify the IP address, which simplifies the cluster IP modification process and greatly improves the efficiency of modifying the cluster node IP address. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] 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 of the present application or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings of the embodiments of the present application.
[0041] Figure 1 A detailed flow chart of a method for modifying the IP address of a cluster node provided in an embodiment of the present application;
[0042] Figure 2 A schematic diagram of a process for modifying the IP of a virtual IP non-bound node provided in an embodiment of the present application;
[0043] Figure 3 A schematic diagram of a process for modifying the IP of a virtual IP binding node provided in an embodiment of the present application;
[0044] Figure 4 A schematic diagram of the structure of a device for modifying the IP address of a cluster node provided in an embodiment of the present application;
[0045] Figure 5 A schematic diagram of the hardware architecture of a device for modifying the IP address of a cluster node provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, rather than limiting the present application. The singular forms of "a", "said" and "the" used in the present application and claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to any or all possible combinations of one or more associated listed items.
[0047] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, in addition, the word "if" used may be interpreted as "at..." or "when..." or "in response to determination".
[0048] For example, see Figure 1 As shown, it is a detailed flow chart of a method for modifying the IP of a cluster node provided in an embodiment of the present application. The method is applied to a cluster node. The cluster includes a plurality of cluster nodes. An IP address modification service is deployed on each cluster node. A virtual IP is set for the IP address modification service of the cluster. The virtual IP can be bound to any cluster node of the cluster. The method includes the following steps:
[0049] Step 100: The first cluster node receives an IP address modification request sent by the client, wherein the first cluster node is the cluster node bound to the virtual IP, and the IP address modification request includes the node identifier of each second cluster node to be modified and the modified IP address information.
[0050] In an embodiment of the present application, an IP address modification service is deployed on each cluster node included in the cluster, and a virtual IP is set for the cluster. In actual applications, the virtual IP can be bound to any node included in the cluster. It can be understood that the virtual IP is bound to the IP address modification service deployed on any node included in the cluster. When the client (the client corresponding to the IP address modification service) accesses the cluster based on the virtual IP, it can access the cluster node bound to the virtual IP (the IP address modification service deployed on the cluster node).
[0051] Then, when the user determines that the IP addresses of some / all cluster nodes (second cluster nodes) in the cluster need to be modified, the user can input the modified IP address information of each second cluster node through the UI / Web interface on the client. For example, an input box for the modified IP address of each cluster node is provided on the UI / Web interface. After the user enters the new IP address in the modified IP address input box corresponding to each second cluster node, the user can click a specified button provided in the interface to send an IP address modification request to the cluster, and the IP address modification request includes the node identifier of each second cluster node that needs to be modified and the modified IP address information.
[0052] Specifically, the IP address modification request is sent based on the virtual IP, so the IP address modification request will be sent to the cluster node (the first cluster node) bound to the virtual IP.
[0053] In actual applications, a node identifier of a cluster node is used to uniquely identify the cluster node in the cluster. The identifier may be the name of the cluster node and / or the current IP address information of the cluster node.
[0054] Step 110: The first cluster node starts the IP address modification service, and performs the following operations for each second cluster node based on the IP address modification service: based on the node identifier of a second cluster node and the IP address modification request, determines the modified IP address information of the second cluster node; logs in to the second cluster node, and writes the modified IP address of the second cluster node into the network card of the second cluster node.
[0055] In the embodiment of the present application, after receiving the IP address modification request sent by the client, the first cluster node parses the IP address modification request and determines the second cluster nodes that need to be modified this time, and then performs the IP address modification operation on each second cluster node respectively.
[0056] Specifically, when logging into the second cluster node, a preferred time mode is that the IP address modification service of the first cluster node logs into the second cluster node through the secure shell protocol SSH.
[0057] That is to say, after receiving the IP address modification request sent by the client, the first cluster node currently bound to the required IP starts the IP address modification service, and modifies the IP addresses of each second cluster node that needs to be modified based on the IP address modification service. For example, the IP address modification service logs in to each second cluster node using SSH based on the login information (account and password information) of each second cluster node, and after successful login, writes the modified IP address information to the network card of each second cluster node.
[0058] Furthermore, in an embodiment of the present application, after writing the modified IP address of the second cluster node into the network card of the second cluster node, the method further includes the following steps: the first cluster node sends a network card service restart instruction to the second cluster node based on the IP address modification service.
[0059] In actual applications, after modifying the network card IP address of a cluster node, you need to restart the network card service for the modification to take effect.
[0060] In the embodiment of the present application, if the second cluster nodes include the first cluster node, after determining that the other second cluster nodes except the first cluster node have completed the IP address modification, the above method may further include the following steps:
[0061] Migrate the virtual IP to a target cluster node, which is any second cluster node except the first cluster node, so that the target cluster node starts an IP address modification service, logs in to the first cluster node, and writes the modified IP address of the first cluster node into the network card of the first cluster node.
[0062] For example, a cluster includes cluster node 1, cluster node 2, and cluster node 3, and the IP needs to be bound to cluster node 1. When cluster node 1 receives a request to modify the IP address of all cluster nodes in the cluster, it starts the IP address modification service, and logs in to cluster node 1 and cluster node 2 respectively to modify the network card IP address. If the modification is determined to be completed, the virtual IP is drifted to cluster node 2 or cluster node 3, and the modified IP address of cluster node 1 is sent to cluster node 2 or cluster node 3. The following only takes drifting to cluster node 2 as an example for explanation. The virtual IP drifting to cluster node 2 means that the virtual IP is bound to cluster node 2, cluster node 2 obtains the modified IP address of cluster node 1, and starts the IP address modification service, logs in to cluster node 1, and performs the modification operation of the network card IP address of cluster node 1. At this point, the modification operation of the IP addresses of all cluster nodes in the cluster is completed.
[0063] Furthermore, in an embodiment of the present application, the cluster also includes a shared storage accessible to each cluster node. Then, the above method also includes the following steps: storing the node identifier and modified IP address information of each second cluster node that needs to be modified in the shared storage, and after determining that the IP address modification of a second cluster node is completed, recording the modification result in the shared storage.
[0064] That is to say, each node in the cluster can obtain the IP modification instruction from the shared storage, that is, obtain the modified IP address information of each node in the cluster that needs to be modified. At the same time, the modification result can be stored in the shared storage, so that the client can obtain the modification result from the shared storage and display it on the UI / Web interface for users to view.
[0065] In actual applications, the user issues a command to modify the IP through the client. Whether the command modifies the IP of a single node, some nodes, or all nodes, it can be classified as modifying the IP of the node bound to the virtual IP and the IP of the node not bound to the virtual IP. The following describes in detail the IP address modification process provided by the embodiment of the present application in combination with specific application scenarios. For example, see Figure 2 As shown, a schematic diagram of a process of modifying the IP of a non-bound node of a virtual IP provided by an embodiment of the present application, the cluster includes node 1, node 2 and node 3, and also includes shared storage, the node currently bound to the virtual IP is node 1, and an IP address modification service is deployed on each node. The client sends all node IP modification commands to the cluster through the virtual IP, then, after receiving the IP modification command, node 1 starts the IP address modification service, and logs in to node 2 and node 3 respectively, writes the modified IP address of node 2 into the network card of node 2, and issues an instruction to restart the network card service, completes the modification of node 2, writes the modified IP address of node 3 into the network card of node 3, and issues an instruction to restart the network card service, completes the modification of node 3. At the same time, node 1 can store the IP modification command in the shared storage.
[0066] Next, after determining that the modification of nodes 2 and 3 is completed, the virtual IP is migrated to other nodes (eg, node 2 or node 3) to complete the IP address modification of node 1. For example, see Figure 3 As shown, it is a schematic diagram of the process of binding a virtual IP to a node's IP provided by an embodiment of the present application, and the migration of the virtual IP to node 2 is used as an example for explanation. After the virtual IP is migrated to node 2, node 2 starts the IP address modification service. At this time, the IP modification command (obtaining the modified IP address of node 1) can be obtained from the shared storage, and the modified IP address of node 1 is written into the network card of node 1, and an instruction to restart the network card service is issued to complete the modification of node 1. At this point, the IP modification of all nodes in the cluster is completed.
[0067] In the embodiment of the present application, after modifying the network card IP of a node, the network card service needs to be restarted. In order to prevent the client from interrupting the communication with the cluster, virtual IP migration is adopted, and the IP modification of the original bound node is performed through the node bound by the migrated virtual IP, thereby avoiding the problem of client interface data not being displayed / displayed inaccurately due to communication interruption. For example, the IP address modification service on node 1 performs the operation of modifying the IP address of the network card of node 1. After writing the new IP address, the network card service needs to be restarted. Since the virtual IP is also bound to the network card, then, during the restart of the network card service, it will cause the communication terminal between the client and the cluster.
[0068] For example, see Figure 4 As shown, it is a structural schematic diagram of a device for modifying the IP of a cluster node provided in an embodiment of the present application. The device is applied to a first cluster node. The cluster includes a plurality of cluster nodes. An IP address modification service is deployed on each cluster node. A virtual IP is set for the IP address modification service of the cluster. The virtual IP can be bound to the first cluster node. The device includes:
[0069] The receiving unit 40 is used to receive an IP address modification request sent by the client, wherein the first cluster node is a cluster node bound to the virtual IP, and the IP address modification request includes a node identifier of each second cluster node to be modified and the modified IP address information;
[0070] The starting unit 41 is used to start the IP address modification service, and perform the following operations for each second cluster node based on the IP address modification service:
[0071] Determining the modified IP address information of the second cluster node based on the node identifier of the second cluster node and the IP address modification request;
[0072] Log in to the second cluster node, and write the modified IP address of the second cluster node into the network card of the second cluster node.
[0073] Optionally, if the second cluster nodes include the first cluster node, after determining that the other second cluster nodes except the first cluster node have completed the IP address modification, the device further includes:
[0074] A migration unit is used to migrate the virtual IP to a target cluster node, where the target cluster node is any second cluster node other than the first cluster node, so that the target cluster node starts an IP address modification service, logs in to the first cluster node, and writes the modified IP address of the first cluster node into the network card of the first cluster node.
[0075] Optionally, the cluster further includes a shared storage accessible to each cluster node, and the device further includes:
[0076] The storage unit is used to store the node identification of each second cluster node that needs to be modified and the modified IP address information in the shared storage, and after determining that the IP address modification of a second cluster node is completed, record the modification result in the shared storage.
[0077] Optionally, after writing the modified IP address of the second cluster node into the network card of the second cluster node, the device further includes:
[0078] The sending unit is used to send a network card service restart instruction to the second cluster node based on the IP address modification service.
[0079] Optionally, when logging into the second cluster node, the starting unit 41 is specifically used to:
[0080] Log in to the second cluster node through the secure shell protocol SSH.
[0081] The above units may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a certain unit above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program codes. For another example, these units may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0082] Further, the device for modifying the cluster node IP provided in the embodiment of the present application, from the hardware level, the hardware architecture diagram of the device for modifying the cluster node IP can be seen in Figure 5 As shown, the device for modifying the cluster node IP may include: a memory 50 and a processor 51,
[0083] The memory 50 is used to store program instructions; the processor 51 calls the program instructions stored in the memory 50 and executes the above method embodiment according to the obtained program instructions. The specific implementation method and technical effect are similar and will not be repeated here.
[0084] Optionally, the present application also provides a cluster node, comprising at least one processing element (or chip) for executing the above method embodiment.
[0085] Optionally, the present application also provides a program product, such as a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the above method embodiments.
[0086] Here, the machine-readable storage medium may be any electronic, magnetic, optical or other physical storage device that may contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium may be: RAM (RadomAccess Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.
[0087] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.
[0088] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0089] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0090] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0091] Moreover, these computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0092] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0093] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A cluster node IP modification method, It is characterized in that Applied to a cluster node, the cluster includes several cluster nodes, each cluster node is deployed with an IP address modification service, a virtual IP is set for the IP address modification service of the cluster, and the virtual IP can be bound to any cluster node of the cluster, the method includes: The first cluster node receives an IP address modification request sent by the client based on the virtual IP, wherein the first cluster node is a cluster node bound to the virtual IP, and the IP address modification request includes a node identifier of each second cluster node to be modified and modified IP address information; The first cluster node starts the IP address modification service, and performs the following operations on each second cluster node based on the IP address modification service: Determining the modified IP address information of the second cluster node based on the node identifier of the second cluster node and the IP address modification request; Log in to the second cluster node, and write the modified IP address of the second cluster node into the network card of the second cluster node.
2. The method according to claim 1, It is characterized in that If the second cluster nodes include the first cluster node, then after determining that the other second cluster nodes except the first cluster node have completed the IP address modification, the method further includes: Migrate the virtual IP to a target cluster node, which is any second cluster node except the first cluster node, so that the target cluster node starts an IP address modification service, logs in to the first cluster node, and writes the modified IP address of the first cluster node into the network card of the first cluster node.
3. The method according to claim 2, It is characterized in that The cluster further includes a shared storage accessible to each cluster node, and the method further includes: The node identification of each second cluster node that needs to be modified and the modified IP address information are stored in the shared storage, and after it is determined that the modification of the IP address of a second cluster node is completed, the modification result is recorded in the shared storage.
4. The method according to claim 1, It is characterized in that After writing the modified IP address of the second cluster node into the network card of the second cluster node, the method further includes: The first cluster node sends a network card service restart instruction to the second cluster node based on the IP address modification service.
5. The method according to claim 1, It is characterized in that The steps of logging into the second cluster node include: The IP address modification service of the first cluster node logs in to the second cluster node through the secure shell protocol SSH.
6. A cluster node IP modification device, It is characterized in that Applied to a first cluster node, the cluster includes a plurality of cluster nodes, an IP address modification service is deployed on each cluster node, a virtual IP is set for the IP address modification service of the cluster, and the virtual IP can be bound to the first cluster node, the device includes: A receiving unit, configured to receive an IP address modification request sent by a client based on a virtual IP, wherein the first cluster node is a cluster node bound to the virtual IP, and the IP address modification request includes a node identifier of each second cluster node to be modified and modified IP address information; The startup unit is used to start the IP address modification service and perform the following operations on each second cluster node based on the IP address modification service: Determining the modified IP address information of the second cluster node based on the node identifier of the second cluster node and the IP address modification request; Log in to the second cluster node, and write the modified IP address of the second cluster node into the network card of the second cluster node.
7. The device according to claim 6, It is characterized in that If the second cluster nodes include the first cluster node, after determining that the other second cluster nodes except the first cluster node have completed the IP address modification, the device further includes: A migration unit is used to migrate the virtual IP to a target cluster node, where the target cluster node is any second cluster node other than the first cluster node, so that the target cluster node starts an IP address modification service, logs in to the first cluster node, and writes the modified IP address of the first cluster node into the network card of the first cluster node.
8. The device according to claim 7, It is characterized in that The cluster further includes a shared storage accessible to each cluster node, and the apparatus further includes: The storage unit is used to store the node identification of each second cluster node that needs to be modified and the modified IP address information in the shared storage, and after determining that the IP address modification of a second cluster node is completed, record the modification result in the shared storage.
9. The device according to claim 6, It is characterized in that After writing the modified IP address of the second cluster node into the network card of the second cluster node, the device further includes: The sending unit is used to send a network card service restart instruction to the second cluster node based on the IP address modification service.
10. The device according to claim 6, It is characterized in that When logging into the second cluster node, the startup unit is specifically used to: Log in to the second cluster node through the secure shell protocol SSH.
