Method and device for upgrading nodes in cluster in unstable state and electronic equipment
By detecting and upgrading unstable nodes in the cluster storage system, the upgrade stuck problem caused by instability of nodes to state is solved, and the availability and reliability of the system are improved.
Patent Information
- Application Number
- CN202411290268.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-31
AI Technical Summary
In a cluster storage system, when the nodes are unstable in their state, the next batch of upgrade nodes cannot be selected, resulting in the upgrade function being stuck, affecting the availability and reliability of the system.
During the parallel upgrade process, check whether the status of the nodes in each input and output group is stable. If it is unstable, wait for the upgrade of other normal input and output group nodes to be completed, upgrade all unupgraded nodes in the target input and output group to skip volume dependencies Check with node pairs and continue to upgrade.
Avoid the upgrade process being stuck in a non-stable state, enhance the availability and reliability of the cluster storage system, and ensure that the system can continue to be upgraded.
Smart Images

Figure CN119225783A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cluster storage technology, and in particular to a method, device and electronic device for upgrading nodes in a cluster under an unstable state. Background Art
[0002] Cluster storage aggregates the storage space in multiple storage devices into a storage pool that can provide a unified access interface and management interface to the application server. Applications can transparently access and utilize the disks on all storage devices through this access interface, which can give full play to the performance and disk utilization of storage devices. Data will be stored and read from multiple storage devices according to certain rules to obtain higher concurrent access performance. All nodes in the cluster storage system run the same software version. When the first software version is officially released, a new version will be released based on factors such as meeting user needs and solving faults (bugs) generated during system operation. In order to facilitate user use and improve user experience, the cluster storage system can support upgrading from the old version to the new version.
[0003] At present, the cluster storage system has implemented the parallel upgrade function, which can support different input and output (IO) groups to upgrade at the same time without affecting each other. When the IO group selects the upgrade node, it depends on the node pair reorganization to complete and become stable. However, in some abnormal situations, such as the node pair state is unstable, the next batch of upgrade nodes cannot be selected. In this case, the node upgrade will be "stopped": from the user's perspective, the upgrade status is normal (the status is to continue upgrading), but from the functional process point of view, the system has been unable to select the next batch of upgrade nodes due to the unstable node pair state, and ultimately cannot continue upgrading. In addition, since there is no fault during the upgrade process, the upgrade function cannot be canceled. Therefore, once the node pair reorganization is abnormal and the node pair state is unstable, the upgrade function will be stuck, the cluster storage system will not be able to continue upgrading, and the user does not manually intervene to cancel the upgrade, and the cluster storage system will remain in the current state. Since the upgrade process of the cluster storage system will be stuck in an unstable state, the availability and reliability of the cluster storage system will be affected. Summary of the invention
[0004] The present invention provides a method, device and electronic device for upgrading nodes in a cluster in an unstable state, so as to achieve upgrading nodes in a cluster in an unstable state without causing the upgrading process of a cluster storage system to be stuck in the unstable state, thereby enhancing the availability and reliability of the cluster storage system.
[0005] The present invention provides a method for upgrading nodes in a cluster in an unstable state, comprising: During the parallel upgrade of each input-output group in the cluster, detecting whether the state of the node pair of each input-output group is stable; When the state of the node pair of the target input-output group is unstable, all the non-upgraded nodes in the target input-output group are upgraded.
[0006] According to a method for upgrading nodes in a cluster in an unstable state provided by the present invention, the method of upgrading all non-upgraded nodes in the target input and output group includes: After waiting for the upgrade of other normal nodes in the input-output group to be completed, all non-upgraded nodes in the target input-output group are upgraded.
[0007] According to a method for upgrading nodes in a cluster in an unstable state provided by the present invention, after waiting for the upgrade of other normal nodes in the input-output group to be completed, all non-upgraded nodes in the target input-output group are upgraded, including: After waiting for the upgrade of other normal input and output group nodes to be completed, receiving a first upgrade command including a first parameter and a second parameter; In response to the first parameter, activating the target input-output group to continue the node upgrade; In response to the second parameter, the volume dependency check and the node pair check are skipped, and all non-upgraded nodes in the target input and output group are upgraded.
[0008] According to a method for upgrading nodes in a cluster under an unstable state provided by the present invention, the detecting whether the state of the node pairs of each input-output group is stable, waiting for the upgrade of other normal nodes of the input-output group to be completed, and then upgrading all non-upgraded nodes in the target input-output group, comprises: Perform the following steps by upgrading the node selection function: Detecting whether the state of the node pairs of each input and output group is stable; In the case where the state of the node pair of the target input-output group is unstable, detecting whether the first upgrade command is received; Upon receiving the first upgrade command, detecting whether the upgraded nodes in the target input and output group have established a connection with the host; The following steps are performed by the volume dependency check function: When the upgraded nodes in the target input-output group are connected to the host, detecting whether the status of the node pairs in each input-output group is stable; When the state of the node pair of the target input-output group is unstable, activating the target input-output group to continue the node upgrade in response to the first parameter; Detecting whether the first upgrade command includes the second parameter; When the first upgrade command includes the second parameter, the volume dependency check and the node pair check are skipped, and all non-upgraded nodes in the target input and output group are upgraded.
[0009] According to a method for upgrading nodes in a cluster in an unstable state provided by the present invention, after waiting for the upgrade of other normal nodes in the input-output group to be completed, all non-upgraded nodes in the target input-output group are upgraded, including: After waiting for the upgrade of other normal input and output group nodes to be completed, receiving a second upgrade command including the first parameter, the second parameter and the third parameter; In response to the first parameter, activating the target input-output group to continue the node upgrade; In response to the second parameter, skipping the volume dependency check; In response to the third parameter, the check of the node pairs is ignored, and all the non-upgraded nodes in the target input-output group are upgraded.
[0010] According to a method for upgrading nodes in a cluster in an unstable state provided by the present invention, the detecting whether the state of the node pairs of each input and output group is stable comprises: In response to the status query command, it is queried whether the status of the node pairs of each input and output group is stable, and the query result is displayed on the user interface.
[0011] The present invention also provides a device for upgrading nodes in a cluster in an unstable state, comprising: A detection module, used to detect whether the status of the node pairs of each input-output group is stable during the parallel upgrade of each input-output group in the cluster; The upgrade module is used to upgrade the remaining non-upgraded nodes in the target input-output group when the state of the node pair of the target input-output group is unstable.
[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for upgrading nodes in a cluster in an unstable state as described in any one of the above is implemented.
[0013] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for upgrading nodes in a cluster under an unstable state as described in any one of the above is implemented.
[0014] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for upgrading nodes in a cluster in an unstable state as described in any one of the above is implemented.
[0015] The method, device and electronic device for upgrading nodes in a cluster under an unstable state provided by the present invention firstly detect whether the state of the node pairs of each input-output group is stable during the parallel upgrading of each input-output group in the cluster; then, when the state of the node pairs of the target input-output group is unstable, all the non-upgraded nodes in the target input-output group are upgraded. The present invention can upgrade the nodes in the cluster under an unstable state, and will not cause the upgrading process of the cluster storage system to get stuck under the unstable state, thereby enhancing the availability and reliability of the cluster storage system. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 This is one of the flow charts of the method for upgrading nodes in a cluster in an unstable state provided by an embodiment of the present invention.
[0018] Figure 2 This is the second flow chart of the method for upgrading nodes in a cluster in an unstable state provided by an embodiment of the present invention.
[0019] Figure 3 It is a schematic diagram of the structure of an apparatus for upgrading nodes in a cluster in an unstable state provided by an embodiment of the present invention.
[0020] Figure 4 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] Cluster storage aggregates the storage space in multiple storage devices into a storage pool that can provide a unified access interface and management interface to the application server. Applications can transparently access and utilize the disks on all storage devices through this access interface, which can give full play to the performance and disk utilization of storage devices. Data will be stored and read from multiple storage devices according to certain rules to obtain higher concurrent access performance. All nodes in the cluster storage system run the same software version. When the first software version is officially released, a new version will be released based on factors such as meeting user needs and solving bugs generated during system operation. In order to facilitate user use and improve user experience, the cluster storage system can support upgrading from the old version to the new version.
[0023] Currently, cluster storage systems have implemented a parallel upgrade function, which can support simultaneous upgrades of different IO groups without affecting each other.
[0024] First, the status of the IO group is described below.
[0025] The IO group mainly includes three states, namely, stable state, reorganization state and shelved state.
[0026] (1) Stable state: A fixed teaming method can be determined based on the information of the nodes in the IO group (such as the number of nodes, the position of the nodes in the IO group, etc.). For example, the nodes in an IO group are divided into four groups of node pairs according to this teaming method. Assuming that there are four nodes in the IO group and they are all online, the teaming method of the stable state of the IO group is: node 1 & node 2, node 2 & node 3, node 3 & node 4, node 4 & node 1. When the actual teaming method is consistent with the stable state, the state of the IO group is stable.
[0027] (2) Reorganization state: The nodes in each IO group will be reorganized towards a stable IO group state. During this process, the state of the IO group is the reorganization state.
[0028] (3) Shelved state: When all valid nodes in a node pair of an IO group are offline, the state of the IO group enters the shelved state. The state of the IO group will change from the shelved state to the reorganization state and finally to the stable state after one valid node in all node pairs of the IO group is online.
[0029] When selecting nodes to upgrade, each IO group will select nodes from different node pairs. This can avoid IO group abnormalities caused by offline node upgrades, and the IO group status will become shelved. In this shelved state, the business will be interrupted, affecting user use.
[0030] Next, the node upgrade process of the existing IO group is described below.
[0031] Step 1: Each IO group in the cluster is upgraded in parallel. That is, the upgrade of each IO group is independent and does not affect each other.
[0032] Step 2: For each IO group, the IO group selects nodes to be upgraded based on the stable IO group state. Specifically, at most two nodes of different node pairs are selected from the node pairs in the stable state to be upgraded. For example, when there are 4 nodes in the IO group, node 1 and node 3 or node 2 and node 4 can be selected as nodes to be upgraded in the same batch.
[0033] Step 3: For each IO group, after selecting the node to be upgraded, the IO group will first perform a volume dependency check. Because some volumes that can only be accessed by the node to be upgraded will enter an offline state after the node is upgraded offline, thus affecting user services, it is necessary to perform a volume dependency check before each upgrade. When this scenario occurs, the cluster storage system will report a volume dependency alarm to the user interface, and the upgrade will stop, waiting for user operation.
[0034] Step 4: For volume dependency alarms detected during the upgrade process, users can choose to repair the alarms and continue the upgrade, or they can force the upgrade by entering the -f parameter. It should be noted that when forcing the upgrade by entering the -f parameter, the cluster storage system will inform the user that the operation may affect the business.
[0035] Step 5: For each IO group, when the nodes selected to be upgraded in the IO group are to be upgraded, it must be ensured that there are nodes in the IO group that have established a connection with the host. If not, the upgrade will not start until there are nodes in the IO group that have established a connection with the host. This waiting process can be considered as the waiting period. After the first batch of nodes are upgraded, they will rejoin the IO group. After the upgrade, each node will be considered disconnected from the host after it goes offline. Only after joining the IO group for 30 minutes will the node be considered to have established a connection with the host.
[0036] It can be seen that in step 2 of the node upgrade process of the above-mentioned existing IO group, when selecting the upgrade node, it depends on the node pair reorganization to be completed and become a stable state. However, in some abnormal situations, such as the node pair state is unstable, the next batch of nodes to be upgraded cannot be selected. In this case, the node upgrade will be "stopped": from the user's perspective, the upgrade status is normal (the status is to continue upgrading), but from the functional process point of view, the system has been unable to select the next batch of upgrade nodes due to the unstable node pair state, and ultimately cannot continue to upgrade, and since there is no fault during the upgrade process, the upgrade function cannot be canceled. Therefore, once the node pair reorganization is abnormal and the node pair state is unstable, the upgrade function will be stuck, the cluster storage system will not be able to continue to upgrade, and the user does not manually intervene to cancel the upgrade, and the cluster storage system will remain in the current state. Since the upgrade process of the cluster storage system will be stuck in an unstable state, the availability and reliability of the cluster storage system will be affected.
[0037] In order to solve the above technical problems, the present invention provides a method for upgrading nodes in a cluster in an unstable state, which is described in detail below.
[0038] Combine the following Figure 1 The method for upgrading nodes in a cluster in an unstable state of the present invention is described.
[0039] Please refer to Figure 1 , Figure 1 FIG. 1 is a flow chart of a method for upgrading nodes in a cluster under an unstable state provided by an embodiment of the present invention. Figure 1 As shown, the method may include step 101 and step 102.
[0040] Step 101: During the parallel upgrade of each input-output group in the cluster, detect whether the status of the node pair of each input-output group is stable.
[0041] For example, taking a cluster storage system with 8 nodes as an example, after the upgrade detection tool is executed successfully, in response to the start upgrade instruction input by the user, the upgrade process starts, and each input and output group in the cluster is upgraded in parallel.
[0042] Since the status of the node pair is stable at the beginning of the upgrade process, it is queried that the current stage is not a waiting period and the node can be upgraded. Each IO group selects a maximum of two nodes to be upgraded for offline upgrade. For example: the nodes in the first IO group include: node1, node2, node3 and node4, and the nodes in the second IO group include node5, node6, node7 and node8. The nodes to be upgraded selected from the first IO group are node3 and node4, and the nodes to be upgraded selected from the second IO group are node5 and node6. After node3, node4, node5 and node6 are selected, node3, node4, node5 and node6 are upgraded offline.
[0043] The node pairs begin to reorganize and detect whether the status of the node pairs of each input and output group is stable. Assume that at this time, due to some reason, the node pairs of the first IO group cannot complete the reorganization after node3 and node4 are offline, and remain in the reorganization state. The second IO group is not affected. Node3, node4, node5, and node6 nodes are upgraded and rejoin the IO group. At this time, node3, node4, node5, and node6 nodes have not yet established a connection with the host. It is not until 30 minutes later that it is considered that the connection with the host is successfully established. Under normal circumstances, after waiting for node3, node4, node5, and node6 nodes to establish a host connection, the next batch of nodes to be upgraded will be selected based on the node pairs in the current stable state. However, in this scenario, due to the abnormal status of the node pairs of the first IO group, the IO group will not be able to select the nodes to be upgraded, while the second IO group will not be affected. The next batch of upgraded nodes, node7 and node8, will be selected based on the current stable node pairs.
[0044] After node7 and node8 are upgraded and rejoin the cluster storage system, the status of the node pair in the first IO group is still unstable, and the node to be upgraded cannot be selected. The remaining two nodes, node1 and node2, have not been upgraded yet.
[0045] In one embodiment, detecting whether the status of the node pairs of each input-output group is stable in step 101 includes: responding to a status query command, querying whether the status of the node pairs of each input-output group is stable, and displaying the query result on the user interface.
[0046] Specifically, the user inputs a status query command, the cluster storage system responds to the status query command, queries whether the status of the node pairs of each input and output group is stable, and displays the query results on the user interface, so that the user can quickly understand whether the status of the node pairs of each input and output group is stable, so that the user can manually intervene in the upgrade, such as canceling the upgrade or continuing the upgrade, to avoid the upgrade process being stuck.
[0047] In another embodiment, detecting whether the status of the node pairs of each input-output group is stable in step 101 includes: periodically acquiring the status of the node pairs of each input-output group, and displaying whether the status of the node pairs of each input-output group is stable on a user interface.
[0048] Specifically, the cluster storage system periodically obtains the status of the node pairs of each input and output group, and displays whether the status of the node pairs of each input and output group is stable on the user interface. The status of the node pairs can be automatically obtained and displayed without the user manually entering status query commands for query, which can improve processing efficiency.
[0049] Step 102: When the state of the node pair of the target input-output group is unstable, all non-upgraded nodes in the target input-output group are upgraded.
[0050] For example, since the node pair of the first IO group is in an abnormal state, the node to be upgraded cannot be selected, and the target input and output group can be the first IO group. When the node pair of the first IO group is in an unstable state, all the non-upgraded nodes (i.e., node1 and node2) in the first IO group are upgraded.
[0051] In one embodiment, upgrading all non-upgraded nodes in the target input-output group in step 102 includes: waiting for other normal input-output group nodes to be upgraded, and then upgrading all non-upgraded nodes in the target input-output group.
[0052] Specifically, after waiting for the upgrade of other normal input and output group nodes to be completed, all non-upgraded nodes in the target input and output group will be upgraded. In this way, the upgrade process of the target input and output group can be prevented from affecting the upgrade of other normal input and output group nodes.
[0053] Based on the above embodiments, in one embodiment, after waiting for the upgrade of other normal input and output group nodes to be completed, all non-upgraded nodes in the target input and output group are upgraded, including: after waiting for the upgrade of other normal input and output group nodes to be completed, receiving a first upgrade command including a first parameter and a second parameter; in response to the first parameter, activating the target input and output group to continue node upgrade; in response to the second parameter, skipping the volume dependency check and ignoring the node pair check, and upgrading all non-upgraded nodes in the target input and output group.
[0054] Exemplarily, the first parameter is -r, the second parameter is -f, and after waiting for other normal input and output group nodes to be upgraded, a first upgrade command including -r and -f is received. In response to the -r parameter, the target input and output group is activated to continue the node upgrade. In response to the -f parameter, the volume dependency check and the node pair check are skipped, and all non-upgraded nodes in the target input and output group are upgraded. In this way, inputting the -f parameter can not only skip the volume dependency check, but also ignore the node pair check, and upgrade all non-upgraded nodes in the target input and output group. Due to the reuse of the -f parameter, development efficiency can be improved.
[0055] Based on the above embodiments, in one embodiment, Figure 2 As shown, the status of the node pairs of each input and output group is detected to see if they are stable. After waiting for the upgrade of other normal input and output group nodes to be completed, all non-upgraded nodes in the target input and output group are upgraded, including: Perform the following steps by upgrading the node selection function: Check whether the status of the node pairs of each input and output group is stable; In the case where the state of the node pair of the target input-output group is unstable, detecting whether a first upgrade command is received; In case of receiving the first upgrade command, detecting whether the upgraded nodes in the target input and output group have established a connection with the host; The following steps are performed by the volume dependency check function: When the upgraded nodes in the target input and output group are connected to the host, detect whether the status of the node pairs in each input and output group is stable; When the state of the node pair of the target input-output group is unstable, in response to the first parameter (-r parameter), the target input-output group is activated to continue the node upgrade; Detecting whether the first upgrade command includes a second parameter; When the second parameter (-f parameter) is included in the first upgrade command, the volume dependency check and the node pair check are skipped, and all non-upgraded nodes in the target input and output group are upgraded.
[0056] Optionally, the following steps are further performed by upgrading the node selection function: For each input-output group, when the node pair of the input-output group is in a stable state, detect whether the upgraded node in the input-output group has established a connection with the host; If the upgraded nodes in the input and output group have not established a connection with the host, no processing or upgrade is performed, and this selection ends; In the case where the first upgrade command is not received, no processing or upgrade is performed, and this selection ends.
[0057] Optionally, perform the following steps through the volume dependency check function: When the states of the node pairs of the input and output groups are stable, a maximum of two nodes are selected for upgrading based on the stable node pairs; When the second parameter (-f parameter) is not included in the first upgrade command, the volume dependency check passes and the node is upgraded; or, if the volume dependency check fails, the upgrade is terminated and waits for user operation.
[0058] In this embodiment, the nodes in the cluster can be upgraded in an unstable state, and the upgrade process of the cluster storage system will not be stuck in the unstable state, thereby enhancing the availability and reliability of the cluster storage system. Since the second parameter (-f parameter) is reused, the development efficiency can be improved. In addition, only the scene in the unstable state is processed, which has little impact on the original process and the risk is controllable.
[0059] In another embodiment, after waiting for other normal input-output group nodes to be upgraded, all non-upgraded nodes in the target input-output group are upgraded, including: after waiting for other normal input-output group nodes to be upgraded, receiving a second upgrade command including a first parameter, a second parameter and a third parameter; in response to the first parameter, activating the target input-output group to continue node upgrade; in response to the second parameter, skipping the volume dependency check; in response to the third parameter, ignoring the node pair check, and upgrading all non-upgraded nodes in the target input-output group.
[0060] Exemplarily, the first parameter is -r, the second parameter is -f, and the third parameter is -q. After waiting for the upgrade of other normal input and output group nodes to be completed, a second upgrade command including -r, -f, and -q is received. In response to the -r parameter, the target input and output group is activated to continue the node upgrade. In response to the -f parameter, the volume dependency check is skipped. In response to the -q parameter, the node pair check is ignored, and all non-upgraded nodes in the target input and output group are upgraded. In this way, the node pair check can be ignored by adding the -q parameter, and all non-upgraded nodes in the target input and output group can be upgraded. The nodes in the cluster can be upgraded in an unstable state, and the upgrade process of the cluster storage system will not be stuck in the unstable state, thereby enhancing the availability and reliability of the cluster storage system.
[0061] It should be noted that the -q parameter is used as the newly added third parameter only to teach those skilled in the art how to implement the present invention, and the present invention is not limited thereto.
[0062] In summary, the method for upgrading nodes in a cluster under an unstable state provided by an embodiment of the present invention firstly detects whether the state of the node pairs of each input-output group is stable during the parallel upgrading of each input-output group in the cluster; and then, when the state of the node pairs of the target input-output group is unstable, all the non-upgraded nodes in the target input-output group are upgraded. The embodiment of the present invention can upgrade the nodes in the cluster under an unstable state, and will not cause the upgrading process of the cluster storage system to get stuck under the unstable state, thereby enhancing the availability and reliability of the cluster storage system.
[0063] The following describes a device for upgrading nodes in a cluster under an unstable state provided by the present invention. The device for upgrading nodes in a cluster under an unstable state described below and the method for upgrading nodes in a cluster under an unstable state described above can refer to each other.
[0064] Please refer to Figure 3 , Figure 3 Schematic diagram of the structure of the device for upgrading nodes in a cluster under an unstable state provided by an embodiment of the present invention. Figure 3 As shown, the device may include: The detection module 10 is used to detect whether the status of the node pairs of each input and output group is stable during the parallel upgrade of each input and output group in the cluster; The upgrading module 20 is used to upgrade the remaining non-upgraded nodes in the target input-output group when the state of the node pair of the target input-output group is unstable.
[0065] In one embodiment, the upgrade module 20 is specifically used for: After waiting for the upgrade of other normal input and output group nodes to be completed, upgrade all non-upgraded nodes in the target input and output group.
[0066] In one embodiment, the upgrade module 20 is specifically used for: After waiting for other normal input and output group nodes to be upgraded, receiving a first upgrade command including a first parameter and a second parameter; In response to the first parameter, activating the target input-output group to continue the node upgrade; In response to the second parameter, the volume dependency check and the node pair check are skipped, and all non-upgraded nodes in the target input and output group are upgraded.
[0067] In one embodiment, the detection module 10 and the upgrade module 20 are specifically used for: Perform the following steps by upgrading the node selection function: Check whether the status of the node pairs of each input and output group is stable; In the case where the state of the node pair of the target input-output group is unstable, detecting whether a first upgrade command is received; In case of receiving the first upgrade command, detecting whether the upgraded nodes in the target input and output group have established a connection with the host; The following steps are performed by the volume dependency check function: When the upgraded nodes in the target input and output group are connected to the host, detect whether the status of the node pairs in each input and output group is stable; When the state of the node pair of the target input-output group is unstable, activating the target input-output group to continue the node upgrade in response to the first parameter; Detecting whether the first upgrade command includes a second parameter; When the second parameter is included in the first upgrade command, the volume dependency check and the node pair check are skipped, and all non-upgraded nodes in the target input and output group are upgraded.
[0068] In one embodiment, the upgrade module 20 is specifically used for: After waiting for other normal input and output group nodes to be upgraded, receiving a second upgrade command including the first parameter, the second parameter and the third parameter; In response to the first parameter, activating the target input-output group to continue the node upgrade; In response to the second parameter, skipping the volume dependency check; In response to the third parameter, the check of the node pair is ignored, and all the non-upgraded nodes in the target input-output group are upgraded.
[0069] In one embodiment, the detection module 10 is specifically used for: In response to the status query command, it is queried whether the status of the node pairs of each input and output group is stable, and the query result is displayed on the user interface.
[0070] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute a method for upgrading nodes in a cluster under an unstable state, the method comprising: during the parallel upgrading of each input-output group in the cluster, detecting whether the state of the node pair of each input-output group is stable; when the state of the node pair of the target input-output group is unstable, upgrading all the non-upgraded nodes in the target input-output group.
[0071] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0072] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the method for upgrading nodes in a cluster under an unstable state provided by the above-mentioned method embodiments. The method includes: in the process of parallel upgrading of each input-output group in the cluster, detecting whether the state of the node pair of each input-output group is stable; when the state of the node pair of the target input-output group is unstable, upgrading all non-upgraded nodes in the target input-output group.
[0073] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when executed by a processor to execute the method for upgrading nodes in a cluster in an unstable state provided by the above-mentioned method embodiments, the method comprising: during the parallel upgrading of each input-output group in the cluster, detecting whether the state of the node pair of each input-output group is stable; if the state of the node pair of the target input-output group is unstable, upgrading all the unupgraded nodes in the target input-output group. .
[0074] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0075] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for upgrading nodes in a cluster in an unstable state, characterized in that: include: During the parallel upgrade of each input-output group in the cluster, detecting whether the state of the node pair of each input-output group is stable; When the state of the node pair of the target input-output group is unstable, all the non-upgraded nodes in the target input-output group are upgraded.
2. The method for upgrading nodes in a cluster under an unstable state according to claim 1, characterized in that: The step of upgrading all non-upgraded nodes in the target input and output group includes: After waiting for the upgrade of other normal nodes in the input-output group to be completed, all non-upgraded nodes in the target input-output group are upgraded.
3. The method for upgrading nodes in a cluster under an unstable state according to claim 2, characterized in that: After waiting for the upgrade of other normal nodes in the input-output group to be completed, upgrading all non-upgraded nodes in the target input-output group includes: After waiting for the upgrade of other normal input and output group nodes to be completed, receiving a first upgrade command including a first parameter and a second parameter; In response to the first parameter, activating the target input-output group to continue the node upgrade; In response to the second parameter, the volume dependency check and the node pair check are skipped, and all non-upgraded nodes in the target input and output group are upgraded.
4. The method for upgrading nodes in a cluster under an unstable state according to claim 3, characterized in that: The detecting whether the state of the node pair of each input-output group is stable, and after waiting for the upgrade of other normal nodes of the input-output group to be completed, upgrading all non-upgraded nodes in the target input-output group includes: Perform the following steps by upgrading the node selection function: Detecting whether the state of the node pairs of each input and output group is stable; In the case where the state of the node pair of the target input-output group is unstable, detecting whether the first upgrade command is received; Upon receiving the first upgrade command, detecting whether the upgraded nodes in the target input and output group have established a connection with the host; The following steps are performed by the volume dependency check function: When the upgraded nodes in the target input-output group are connected to the host, detecting whether the status of the node pairs in each input-output group is stable; When the state of the node pair of the target input-output group is unstable, activating the target input-output group to continue the node upgrade in response to the first parameter; Detecting whether the first upgrade command includes the second parameter; When the first upgrade command includes the second parameter, the volume dependency check and the node pair check are skipped, and all non-upgraded nodes in the target input and output group are upgraded.
5. The method for upgrading nodes in a cluster under an unstable state according to claim 2, characterized in that: After waiting for the upgrade of other normal nodes in the input-output group to be completed, upgrading all non-upgraded nodes in the target input-output group includes: After waiting for the upgrade of other normal input and output group nodes to be completed, receiving a second upgrade command including the first parameter, the second parameter and the third parameter; In response to the first parameter, activating the target input-output group to continue the node upgrade; In response to the second parameter, skipping the volume dependency check; In response to the third parameter, the check of the node pairs is ignored, and all the non-upgraded nodes in the target input-output group are upgraded.
6. The method for upgrading nodes in a cluster in an unstable state according to any one of claims 1 to 5, characterized in that: The detecting whether the state of the node pairs of each input-output group is stable comprises: In response to the status query command, it is queried whether the status of the node pairs of each input and output group is stable, and the query result is displayed on the user interface.
7. A device for upgrading nodes in a cluster in an unstable state, characterized in that: include: A detection module, used to detect whether the status of the node pairs of each input-output group is stable during the parallel upgrade of each input-output group in the cluster; The upgrade module is used to upgrade the remaining non-upgraded nodes in the target input-output group when the state of the node pair of the target input-output group is unstable.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for upgrading nodes in a cluster in an unstable state according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for upgrading nodes in a cluster in an unstable state according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for upgrading nodes in a cluster in an unstable state according to any one of claims 1 to 6 is implemented.
