Node mounting method and device, computer device and storage medium
Through the automated network protocol stack mode comparison and adjustment method, the time-consuming and labor-intensive problem of manual intervention verification is solved, the efficiency, accuracy and stability of node mounting in the distributed system are achieved, and the adaptability and reliability of the system are improved.
Patent Information
- Application Number
- CN202411829148.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2044-12-12
Smart Images

Figure CN119676128B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a node mounting method and device, a computer device and a storage medium. BACKGROUND
[0002] With the development of information technology, distributed systems become mainstream. In distributed systems, there are many nodes, and the network protocol stack modes used by different nodes may differ, which can easily lead to data communication problems.
[0003] In related technologies, in the node mounting process, to avoid system crashes or data loss caused by inconsistent network protocol stack modes, manual intervention is used to perform consistency checking of the network protocol stack mode to ensure the safety of node mounting.
[0004] However, this manual intervention to perform consistency checking of the network protocol stack mode not only consumes time and effort, but also has a high probability of checking errors, which seriously affects the stability and reliability of the system. SUMMARY
[0005] Therefore, the present application provides a node mounting method and device, a computer device and a storage medium to solve the problem that manual intervention to perform consistency checking of the network protocol stack mode in related technologies not only consumes time and effort, but also has a high probability of checking errors, which seriously affects the stability and reliability of the system.
[0006] In a first aspect, the present application provides a node mounting method, which comprises:
[0007] In response to a scene selection operation, determining the current scene;
[0008] If the current scene is a first scene, receiving a mounting request sent by a node to be mounted;
[0009] Based on the mounting request, obtaining the network protocol stack configuration of the node to be mounted, and based on the network stack protocol configuration of the node to be mounted, generating network protocol stack mode description information of the node to be mounted;
[0010] Comparing the network protocol stack mode description information of the node to be mounted with the network protocol stack mode description information of the current cluster;
[0011] If the comparison result is that the network protocol stack mode description information of the node to be mounted is consistent with the network protocol stack mode description information of the current cluster, it is determined that the node to be mounted is allowed to mount to the current cluster, and mounting information is sent to the node to be mounted, so that the node to be mounted receives the mounting information and mounts based on the mounting information.
[0012] The node mounting method provided in this embodiment receives a mounting request sent by the node to be mounted when the current scenario is the first scenario, obtains the network protocol stack configuration of the node to be mounted based on the mounting request, generates network protocol stack mode description information of the node to be mounted based on the network protocol stack configuration of the node to be mounted, automatically compares the network protocol stack mode description information of the node to be mounted with the network protocol stack mode description information of the current cluster, obtains a comparison result, and the comparison result is that the network protocol stack mode description information of the node to be mounted is consistent with the network protocol stack mode description information of the current cluster, determines that the node to be mounted is allowed to be mounted to the current cluster, sends a mount permission information to the node to be mounted, so that the node to be mounted receives the mount permission information and performs mounting based on the mount permission information. This realizes that when the node is mounted, the consistency check of the network protocol stack mode is automatically performed, which not only saves time and manpower, but also has a high accuracy of the check, thereby improving the stability and reliability of the distributed system.
[0013] In an optional embodiment, the method further includes:
[0014] If the comparison result shows that the network protocol stack mode description information of the node to be mounted is inconsistent with the network protocol stack mode description information of the current cluster, it is determined that the node to be mounted is prohibited from mounting, and an error message indicating that the network protocol stack mode does not match is returned.
[0015] The node mounting method provided in this embodiment can effectively avoid system crashes or data loss caused by inconsistent network protocol stack modes by verifying whether the network protocol stack mode of the node to be mounted is consistent with the network protocol stack mode of the cluster before the node is mounted, thereby improving the security and reliability of distributed system mounting.
[0016] In an optional embodiment, the method further includes:
[0017] When the current scenario is the second scenario, receiving a mount request and a message for network protocol stack mode negotiation sent by the node to be mounted;
[0018] Based on the mount request sent by the node to be mounted, obtaining network protocol stack mode description information of the node to be mounted in the message for network protocol stack mode negotiation;
[0019] Compare the network protocol stack mode description information of the node to be mounted with the network protocol stack mode description information of the current cluster;
[0020] If the comparison result shows that the network protocol stack mode description information of the node to be mounted is consistent with the network protocol stack mode description information of the current cluster, determine to allow the node to be mounted to be mounted to the current cluster, and send a mount permission message to the node to be mounted, so that the node to be mounted receives the mount permission message and performs the mount operation based on the mount permission message;
[0021] If the comparison result shows that the network protocol stack mode description information of the node to be mounted is inconsistent with the network protocol stack mode description information of the current cluster, determining whether the network protocol stack mode of the current cluster can be adjusted to be consistent with the network protocol stack mode of the node to be mounted;
[0022] When the network protocol stack mode of the current cluster can be adjusted to be consistent with the network protocol stack mode of the node to be mounted, a mount permission information is sent to the node to be mounted, and the network protocol stack mode of the current cluster is adjusted to be consistent with the network protocol stack mode of the node to be mounted, so that the node to be mounted receives the mount permission information and performs mounting based on the mount permission information.
[0023] The node mounting method provided in this embodiment adjusts the network protocol stack mode of the current cluster if the network protocol stack mode of the node to be mounted is inconsistent with the network protocol stack mode of the current cluster when the current scenario is the second scenario. If the network protocol stack mode of the current cluster can be adjusted to be consistent with the network protocol stack mode of the node to be mounted, the node to be mounted is allowed to be mounted, and the network protocol stack mode of the current cluster is adjusted to be consistent with the network protocol stack mode of the node to be mounted. This ensures that the new node can still be mounted to the cluster through negotiation under different network protocol stack modes, thereby improving the adaptability, flexibility, and scalability of the system.
[0024] In an optional embodiment, the method further includes:
[0025] When the network protocol stack mode of the current cluster cannot be adjusted to be consistent with the network protocol stack mode of the node to be mounted, a mount prohibition message is sent to the node to be mounted, and the mount request of the node to be mounted is rejected.
[0026] The node mounting method provided in this embodiment rejects the mounting request of the node to be mounted if the network protocol stack mode of the current cluster cannot be adjusted to be consistent with the network protocol stack mode of the node to be mounted, thereby avoiding system crashes or data loss caused by inconsistent network protocol stack modes and improving the security and reliability of distributed system mounting.
[0027] In an optional embodiment, the method further includes:
[0028] Real-time monitoring of the process of mounting the node to be mounted;
[0029] If an exception occurs during the mounting process of the node to be mounted, obtain the exception information;
[0030] Based on the abnormal information, the mounting status of the node to be mounted is determined.
[0031] The node mounting method provided in this embodiment can detect and capture abnormalities in the mounting operation as soon as they occur through a real-time monitoring mechanism, greatly shortening the time window for fault monitoring and improving maintenance efficiency.
[0032] In an optional implementation, determining the mounting status of the node to be mounted based on the abnormal information includes:
[0033] If the abnormality level indicated by the abnormal information is the first level, immediately stop the mounting of the node to be mounted, and determine the mounting state of the node to be mounted as stopped mounting;
[0034] When the abnormality level indicated by the abnormal information is the second level, continuing to mount the node to be mounted, and determining the mounting state of the node to be mounted to continue mounting;
[0035] The first level of abnormality is higher than the second level of abnormality.
[0036] The node mounting method provided in this embodiment achieves refined management of exceptions during the mounting process by distinguishing the degree of exceptions that occur during the mounting process and adopting different mounting strategies for exceptions of different levels. This not only avoids unnecessary mounting terminations, but also ensures that serious exceptions are contained in a timely manner, thereby enhancing the adaptability and robustness of the system.
[0037] In an optional embodiment, the method further includes:
[0038] If an exception occurs during the mounting process of the node to be mounted, the exception information is recorded in a log so that the user can analyze the cause of the exception based on the log, wherein the exception information includes the level of the exception.
[0039] The node mounting method provided in this embodiment provides a basis for subsequent analysis by recording abnormal information in a log. Users or operation and maintenance personnel can quickly trace the scene and cause of the abnormality based on the abnormal information in the log, which helps to quickly locate and resolve the abnormality and improve maintenance efficiency.
[0040] In a second aspect, the present invention provides a node mounting device, the device comprising:
[0041] A first determining module, configured to determine a current scene in response to a scene selection operation;
[0042] A first receiving module is configured to receive a mount request sent by a node to be mounted when the current scenario is the first scenario;
[0043] A first acquisition module is configured to acquire, based on the mount request, a network protocol stack configuration of the node to be mounted, and generate network protocol stack mode description information of the node to be mounted based on the network stack protocol configuration of the node to be mounted;
[0044] A first comparison module is used to compare the network protocol stack mode description information of the node to be mounted with the network protocol stack mode description information of the current cluster;
[0045] The second determination module is used to determine that the node to be mounted is allowed to be mounted to the current cluster when the comparison result shows that the network protocol stack mode description information of the node to be mounted is consistent with the network protocol stack mode description information of the current cluster, and send a mount permission information to the node to be mounted, so that the node to be mounted receives the mount permission information and performs mounting based on the mount permission information.
[0046] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, computer instructions being stored in the memory, and the processor executing the node mounting method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0047] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the node mounting method of the first aspect or any corresponding embodiment thereof.
[0048] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the node mounting method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in related technologies, the following briefly introduces the drawings required for use in the specific embodiments or related technical descriptions. 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 any creative work.
[0050] Figure 1 is a flowchart of a node mounting method according to an embodiment of the present invention;
[0051] Figure 2 is a flowchart of another node mounting method according to an embodiment of the present invention;
[0052] Figure 3 is a schematic diagram of the process of node mounting in the second scenario according to an embodiment of the present invention;
[0053] Figure 4 is a structural block diagram of a node mounting device according to an embodiment of the present invention;
[0054] Figure 5 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0055] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments 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 those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.
[0056] With the development of information technology, distributed systems have become the mainstream of system design and implementation. Distributed systems have numerous nodes and complex environments, and different nodes may use different network protocol stack models, leading to numerous problems in data communication. A network protocol stack refers to the layered set of protocols used in network communications—a set of rules and standards that ensures reliable data transmission between computing devices. A network protocol stack is typically divided into multiple layers, with each layer handling specific tasks in the communication process.
[0057] In related technologies, when a node is mounted to a distributed cluster, if the network protocol stack mode of the node is inconsistent with the network protocol stack mode of the distributed cluster, it will cause the distributed system to crash or data to be lost, seriously affecting the stability and reliability of the system.
[0058] To prevent system crashes or data loss caused by inconsistent network protocol stack models, related technologies use manual intervention to perform consistency checks on the network protocol stack model to ensure the security of node mounting. Consistency checks are used to ensure the consistency and correctness of data within the system, preventing data failures or anomalies due to errors, conflicts, or mismatches. Consistency checks are widely used in database systems, distributed systems, file systems, and other scenarios where data accuracy must be ensured.
[0059] However, this method of manually intervening in consistency verification of the network protocol stack mode is not only time-consuming and labor-intensive, but also has a high probability of verification errors, which seriously affects the stability and reliability of the system.
[0060] An embodiment of the present invention provides a node mounting method, which performs consistency verification of the network protocol stack mode through the current scenario. When the current scenario is the first scenario, if it is detected that the network protocol stack mode of the node to be mounted is inconsistent with the network protocol stack mode of the current cluster, the node to be mounted is prohibited from mounting. When the current scenario is the second scenario, if it is detected that the network protocol stack mode of the node to be mounted is inconsistent with the network protocol stack mode of the current cluster, the network protocol stack mode of the current cluster is adjusted. When the network protocol stack mode of the current cluster can be adjusted to be consistent with the network protocol stack mode of the node to be mounted, the node to be mounted is allowed to be mounted, so as to achieve the effect of automatically performing consistency verification of the network protocol stack mode, saving time and manpower, improving verification accuracy, and improving the stability and reliability of the distributed system.
[0061] According to an embodiment of the present invention, an embodiment of a node mounting method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0062] In this embodiment, a node mounting method is provided, which can be used in a distributed system. Figure 1 is a flowchart of a node mounting method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0063] Step S101: In response to a scene selection operation, determine the current scene.
[0064] Among them, the user determines the current scenario based on the current network environment and changes in the network protocol stack mode, and then selects the corresponding scenario.
[0065] It should be noted that a tool capable of identifying and analyzing node network protocol stack patterns is deployed in a distributed cluster environment. This tool has efficient identification capabilities and accurate analysis functions.
[0066] It is understandable that the node mounting method of this embodiment relies on the accuracy and efficiency of the tool. Deploying and calling the tool uniformly on all nodes may increase the management and maintenance workload.
[0067] Step S102: When the current scenario is the first scenario, a mount request sent by the node to be mounted is received.
[0068] The first scenario is a scenario in which a network environment is relatively stable and a network protocol stack mode changes less.
[0069] When the node attempts to mount to the cluster, the node sends a mounting request to the distributed system, and the distributed system receives the mounting request sent by the node to be mounted.
[0070] In step S103, based on the mounting request, the network protocol stack configuration of the node to be mounted is obtained, and based on the network stack protocol configuration of the node to be mounted, network protocol stack mode description information of the node to be mounted is generated.
[0071] After receiving the mounting request sent by the node to be mounted, the above-mentioned deployed tool is automatically called to perform pre-detection of the network protocol stack mode.
[0072] Specifically, the tool is used to read the network protocol stack configuration of the node to be mounted, and based on the network protocol stack configuration of the node to be mounted, network protocol stack mode description information of the node to be mounted is generated.
[0073] In step S104, the network protocol stack mode description information of the node to be mounted is compared with the network protocol stack mode description information of the current cluster.
[0074] The network protocol stack mode description information of the node to be mounted is compared with the network protocol stack mode description information of the current cluster by using the above-mentioned tool, to determine whether the network protocol stack mode of the node to be mounted is consistent with the network protocol stack mode of the current cluster.
[0075] It should be noted that the network protocol stack modes of the nodes in the cluster are consistent.
[0076] In step S105, in the case that the comparison result is that the network protocol stack mode description information of the node to be mounted is consistent with the network protocol stack mode description information of the current cluster, it is determined that the node to be mounted is allowed to mount to the current cluster, and mounting permission information is sent to the node to be mounted, so that the node to be mounted receives the mounting permission information and mounts based on the mounting permission information.
[0077] The comparison result is that the network protocol stack mode description information of the node to be mounted is consistent with the network protocol stack mode description information of the current cluster, which means that the network protocol stack mode of the node to be mounted is consistent with the network protocol stack mode of the current cluster, the pre-detection is passed, and the node to be mounted is allowed to mount to the current cluster.
[0078] In the case that the pre-detection is passed, mounting permission information is sent to the node to be mounted, so that the node to be mounted receives the mounting permission information and continues the mounting process based on the mounting permission information.
[0079] The node mounting method provided in this embodiment receives a mounting request sent by the node to be mounted when the current scenario is the first scenario, obtains the network protocol stack configuration of the node to be mounted based on the mounting request, generates network protocol stack mode description information of the node to be mounted based on the network protocol stack configuration of the node to be mounted, automatically compares the network protocol stack mode description information of the node to be mounted with the network protocol stack mode description information of the current cluster, obtains a comparison result, and the comparison result is that the network protocol stack mode description information of the node to be mounted is consistent with the network protocol stack mode description information of the current cluster, determines that the node to be mounted is allowed to be mounted to the current cluster, sends a mount permission information to the node to be mounted, so that the node to be mounted receives the mount permission information and performs mounting based on the mount permission information. This realizes that when the node is mounted, the consistency check of the network protocol stack mode is automatically performed, which not only saves time and manpower, but also has a high accuracy of the check, thereby improving the stability and reliability of the distributed system.
[0080] In this embodiment, a node mounting method is provided, which can be used in a distributed system. Figure 2 is a flowchart of a node mounting method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0081] Step S201: In response to the scene selection operation, determine the current scene. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0082] Step S202: When the current scenario is the first scenario, a mount request is received from the node to be mounted. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0083] Step S203: Based on the mount request, obtain the network protocol stack configuration of the node to be mounted, and generate the network protocol stack mode description information of the node to be mounted based on the network stack protocol configuration of the node to be mounted. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0084] Step S204: Compare the network protocol stack mode description information of the node to be mounted with the network protocol stack mode description information of the current cluster. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.
[0085] Step S205, in the case that the comparison result is that the network protocol stack mode description information of the to-be-mounted node is consistent with the network protocol stack mode description information of the current cluster, it is determined that the to-be-mounted node is allowed to mount to the current cluster, and the to-be-mounted node is sent the mounting permission information, so that the to-be-mounted node receives the mounting permission information and mounts based on the mounting permission information. For details, please refer to Figure 1 Step S105 of the embodiment shown will not be described here again.
[0086] Step S206, in the case that the comparison result is that the network protocol stack mode description information of the to-be-mounted node is inconsistent with the network protocol stack mode description information of the current cluster, it is determined that the to-be-mounted node is prohibited from mounting, and error information of network protocol stack mode mismatch is returned.
[0087] The comparison result that the network protocol stack mode description information of the to-be-mounted node is inconsistent with the network protocol stack mode description information of the current cluster indicates that the network protocol stack mode of the to-be-mounted node is inconsistent with the network protocol stack mode of the current cluster, the pre-detection fails, the to-be-mounted node is prohibited from mounting to the current cluster, the mounting operation of the to-be-mounted node is terminated, and detailed error information is returned to prompt the network protocol stack mode mismatch.
[0088] It should be noted that the error information can be provided to a technician or administrator for further diagnosis and problem solving.
[0089] The node mounting method provided in this embodiment can effectively avoid system crashes or data loss caused by inconsistent network protocol stack modes and improve the security and reliability of distributed system mounting by verifying whether the network protocol stack mode of the to-be-mounted node is consistent with the network protocol stack mode of the cluster before mounting.
[0090] The node mounting method provided in this embodiment can discover and prevent potential problems in time before mounting by pre-detecting before actual mounting, avoid frequent mounting errors caused by inconsistent network protocol stack modes, and thus ensure the stability of the entire distributed cluster and the security of data transmission. In particular, in a large-scale cluster environment, the node mounting method can significantly reduce the complexity and workload of system maintenance and improve the work efficiency of administrators.
[0091] In some optional embodiments, the above node mounting method further includes:
[0092] Step a1, in the case that the current scenario is a second scenario, receiving the mounting request and the message for network protocol stack mode negotiation sent by the to-be-mounted node.
[0093] The second scenario is a scenario in which the network environment is complex and the network protocol stack mode can change dynamically.
[0094] Figure 3 FIG. 1 is a flow chart of node mounting in the second scenario according to an embodiment of the present invention. Figure 3 As shown in the figure, in the second scenario, when a node attempts to mount, it sends a mount request and a special message for network protocol stack mode negotiation to the distributed system. That is, the node to be mounted pre-sends a negotiation message to the distributed cluster. The distributed system receives the mount request and the message for network protocol stack mode negotiation sent by the node to be mounted.
[0095] It should be noted that the format and content of the message used for network protocol stack mode negotiation can describe the current network protocol stack mode of the node to be mounted.
[0096] Step a2: Based on the mount request sent by the node to be mounted, obtain the network protocol stack mode description information of the node to be mounted in the message used for network protocol stack mode negotiation.
[0097] Among them, after receiving the mounting request sent by the node to be mounted and the message for network protocol stack mode negotiation, in response to the mounting request sent by the node to be mounted, the message for network protocol stack mode negotiation is parsed to obtain the network protocol stack mode description information of the node to be mounted, that is, the negotiation request is received.
[0098] Step a3: Compare the network protocol stack mode description information of the node to be mounted with the network protocol stack mode description information of the current cluster.
[0099] After obtaining the network protocol stack mode description information of the node to be mounted, the network protocol stack mode description information of the node to be mounted is compared with the network protocol stack mode description information of the current cluster, that is, analyzing whether the modes match.
[0100] Step a4, when the comparison result shows that the network protocol stack mode description information of the node to be mounted is consistent with the network protocol stack mode description information of the current cluster, determine that the node to be mounted is allowed to be mounted to the current cluster, and send a mount permission information to the node to be mounted, so that the node to be mounted receives the mount permission information and performs mounting based on the mount permission information.
[0101] Among them, in the second scenario, the detailed description of the comparison result that the network protocol stack mode description information of the node to be mounted is consistent with the network protocol stack mode description information of the current cluster is the same as the detailed description of the comparison result that the network protocol stack mode description information of the node to be mounted is consistent with the network protocol stack mode description information of the current cluster in the first scenario, and will not be repeated here.
[0102] Step a5, in the case that the comparison result is that the network protocol stack mode description information of the to-be-mounted node is inconsistent with the network protocol stack mode description information of the current cluster, it is judged whether the network protocol stack mode of the current cluster can be adjusted to be consistent with the network protocol stack mode of the to-be-mounted node.
[0103] In the second scenario, if the comparison result is that the network protocol stack mode description information of the to-be-mounted node is inconsistent with the network protocol stack mode description information of the current cluster, negotiation is needed, that is, the mode is adjusted to match the network protocol stack mode of the to-be-mounted node.
[0104] It is judged whether the network protocol stack mode of the current cluster can be adjusted to be consistent with the network protocol stack mode of the to-be-mounted node, that is, whether the network protocol stack mode of the current cluster can be successfully adjusted to be consistent with the network protocol stack mode of the to-be-mounted node.
[0105] Step a6, in the case that the network protocol stack mode of the current cluster can be adjusted to be consistent with the network protocol stack mode of the to-be-mounted node, the to-be-mounted node is sent the mounting permission information, and the network protocol stack mode of the current cluster is adjusted to be consistent with the network protocol stack mode of the to-be-mounted node, so that the to-be-mounted node receives the mounting permission information and mounts based on the mounting permission information.
[0106] In the case that the network protocol stack mode of the current cluster can be adjusted to be consistent with the network protocol stack mode of the to-be-mounted node, it indicates that the to-be-mounted node can be mounted to the current cluster, the to-be-mounted node is sent the mounting permission information, that is, the negotiation result, the negotiation result is that the mode is matched and the mounting is allowed, indicating that the mounting operation continues, and the network protocol stack mode of the current cluster is adjusted to be consistent with the network protocol stack mode of the to-be-mounted node, so as to realize the mounting of the to-be-mounted node.
[0107] The node mounting method provided in the embodiment adjusts the network protocol stack mode of the current cluster if the network protocol stack mode of the to-be-mounted node is inconsistent with the network protocol stack mode of the current cluster in the case that the current scenario is the second scenario, allows the to-be-mounted node to mount in the case that the network protocol stack mode of the current cluster can be adjusted to be consistent with the network protocol stack mode of the to-be-mounted node, and adjusts the network protocol stack mode of the current cluster to be consistent with the network protocol stack mode of the to-be-mounted node. It is ensured that the new node can be mounted to the cluster through negotiation under different network protocol stack modes, and the adaptability, flexibility and expansibility of the system are improved.
[0108] The node mounting method provided by the embodiment of the application is more flexible and dynamic in the case that the current scenario is the second scenario, i.e., the network protocol stack mode may be affected by dynamic factors, based on the newly added message for network protocol stack mode negotiation, allows the node to perform real-time mode confirmation and adjustment during the mounting process, to achieve the consistency of the network protocol stack mode, and can adapt to complex and variable network environments. For example, in some scenarios where the network protocol stack mode may be dynamically adjusted by external environment or internal strategy, the node mounting method can effectively solve the mounting problem caused by different network protocol stack modes, and improve the adaptability and flexibility of the system.
[0109] It should be noted that in the second scenario, it is necessary to ensure that all nodes can normally parse and respond to the message for network protocol stack mode negotiation, and at the same time, the node needs to have certain adaptive adjustment capability, which may have higher requirements for the hardware and software of the system.
[0110] In some optional embodiments, the node mounting method further includes:
[0111] In the case that the network protocol stack mode of the current cluster cannot be adjusted to be consistent with the network protocol stack mode of the to-be-mounted node, the to-be-mounted node is sent the mounting prohibition information, and the mounting request of the to-be-mounted node is rejected.
[0112] In the case that the network protocol stack mode of the current cluster cannot be adjusted to be consistent with the network protocol stack mode of the to-be-mounted node, it means that the adjustment of the network protocol stack mode of the current cluster fails or cannot be adjusted to be consistent with the network protocol stack mode of the to-be-mounted node, the to-be-mounted node is prohibited from mounting, the mounting prohibition information is sent to the to-be-mounted node, i.e., the negotiation result is fed back, the negotiation result is that the mounting fails due to mismatch, and the mounting request of the to-be-mounted node is rejected.
[0113] It should be noted that in the case that the network protocol stack mode of the current cluster cannot be adjusted to be consistent with the network protocol stack mode of the to-be-mounted node, the error information of the mismatch of the network protocol stack mode is returned, and the mounting is prohibited.
[0114] The node mounting method provided by the embodiment avoids system crash or data loss caused by inconsistent network protocol stack modes, and improves the security and reliability of the mounting of the distributed system, by rejecting the mounting request of the to-be-mounted node in the case that the network protocol stack mode of the current cluster cannot be adjusted to be consistent with the network protocol stack mode of the to-be-mounted node.
[0115] In some optional embodiments, the node mounting method further includes:
[0116] Step c1, the process of mounting the to-be-mounted node is monitored in real time.
[0117] Wherein, when the node to be mounted is allowed to be mounted to the current cluster and the node to be mounted is mounted, the mounting process of the node to be mounted is monitored in real time.
[0118] Step c2: If an exception occurs during the mounting process of the node to be mounted, obtain the exception information.
[0119] During the process of mounting the node to be mounted, if an exception is detected, the exception information corresponding to the exception is obtained.
[0120] Step c3: Determine the mounting status of the node to be mounted based on the abnormal information.
[0121] After the abnormal information is obtained, the mounting status of the node to be mounted is determined according to the abnormal information, that is, whether to continue mounting or stop mounting.
[0122] The node mounting method provided in this embodiment can detect and capture abnormalities in the mounting operation as soon as they occur through a real-time monitoring mechanism, greatly shortening the time window for fault monitoring and improving maintenance efficiency.
[0123] In some optional implementations, the above step c3 includes:
[0124] Step c31: when the abnormality level indicated by the abnormality information is the first level, immediately stop the mounting of the node to be mounted, and determine that the mounting state of the node to be mounted is stopped.
[0125] Among them, the first level is the serious exception level. The first level of the exception indicates that the exception will seriously affect the system. In this case, it is necessary to stop the mounting of the node to be mounted. After resolving the serious exception, the mounting of the node to be mounted can be continued.
[0126] Step c32: When the abnormality level indicated by the abnormality information is the second level, continue mounting the node to be mounted, and determine that the mounting state of the node to be mounted is to continue mounting.
[0127] Among them, the abnormality level of the first level is higher than the abnormality level of the second level.
[0128] Among them, the second level is the general exception level. The exception level is the second level, which indicates that the exception will hardly affect the system. In this case, the mounting of the node to be mounted will continue. After the mounting is completed, return to handle the exception.
[0129] The node mounting method provided in this embodiment achieves refined management of exceptions during the mounting process by distinguishing the degree of exceptions that occur during the mounting process and adopting different mounting strategies for exceptions of different levels. This not only avoids unnecessary mounting terminations, but also ensures that serious exceptions are contained in a timely manner, thereby enhancing the adaptability and robustness of the system.
[0130] In some optional implementations, the node mounting method further includes:
[0131] In step d1, if an exception occurs during the mounting process of the node to be mounted, the exception information is recorded in a log so that the user can analyze the cause of the exception based on the log. The exception information includes the level of the exception.
[0132] When an exception occurs during the mounting process of the node to be mounted, a log is recorded to facilitate rapid location of the exception.
[0133] Users can adopt different optimization strategies based on frequently occurring low-level exceptions or occasionally occurring high-level exceptions to continuously improve the mounting process and enhance system robustness.
[0134] The node mounting method provided in this embodiment provides a basis for subsequent analysis by recording abnormal information in a log. Users or operation and maintenance personnel can quickly trace the scene and cause of the abnormality based on the abnormal information in the log, which helps to quickly locate and resolve the abnormality and improve maintenance efficiency.
[0135] In some optional implementations, the node mounting method further includes:
[0136] When the node to be mounted is allowed to be mounted to the current cluster, the data of the current cluster is backed up so that if an exception occurs during the mounting of the node to be mounted and the level of the exception is the first level, data recovery is performed based on the backup data of the current cluster.
[0137] The node mounting method provided in this embodiment can perform data recovery in the event of a serious abnormality when the node to be mounted is mounted to the current cluster by backing up the data of the current cluster, thereby reducing the risk of data loss and improving the stability and fault tolerance of the system in the face of abnormal situations.
[0138] This embodiment also provides a node mounting device, which is used to implement the above-mentioned embodiments and preferred implementations. Details that have already been described will not be repeated. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0139] This embodiment provides a node mounting device, such as Figure 4 Shown, including:
[0140] The first determining module 401 is configured to determine the current scene in response to a scene selection operation.
[0141] The first receiving module 402 is configured to receive a mount request sent by a node to be mounted when the current scenario is the first scenario.
[0142] The first acquisition module 403 is configured to acquire the network protocol stack configuration of the node to be mounted based on the mount request, and generate network protocol stack mode description information of the node to be mounted based on the network stack protocol configuration of the node to be mounted.
[0143] The first comparison module 404 is configured to compare the network protocol stack mode description information of the node to be mounted with the network protocol stack mode description information of the current cluster.
[0144] The second determination module 405 is used to determine whether the node to be mounted is allowed to be mounted to the current cluster when the comparison result shows that the network protocol stack mode description information of the node to be mounted is consistent with the network protocol stack mode description information of the current cluster, and send a mount permission information to the node to be mounted, so that the node to be mounted receives the mount permission information and performs mounting based on the mount permission information.
[0145] In some optional implementations, the node mounting device further includes:
[0146] The third determination module is used to determine that the node to be mounted is prohibited from mounting and return an error message of network protocol stack mode mismatch when the comparison result shows that the network protocol stack mode description information of the node to be mounted is inconsistent with the network protocol stack mode description information of the current cluster.
[0147] In some optional implementations, the node mounting device further includes:
[0148] The second receiving module is used to receive a mount request and a message for network protocol stack mode negotiation sent by the node to be mounted when the current scenario is the second scenario.
[0149] The second acquisition module is configured to acquire, based on the mount request sent by the node to be mounted, network protocol stack mode description information of the node to be mounted in a message used for network protocol stack mode negotiation.
[0150] The second comparison module is used to compare the network protocol stack mode description information of the node to be mounted with the network protocol stack mode description information of the current cluster.
[0151] The fourth determination module is used to determine whether the node to be mounted is allowed to be mounted to the current cluster when the comparison result shows that the network protocol stack mode description information of the node to be mounted is consistent with the network protocol stack mode description information of the current cluster, and send a mount permission information to the node to be mounted, so that the node to be mounted receives the mount permission information and performs mounting based on the mount permission information.
[0152] The first judgment module is used to judge whether the network protocol stack mode of the current cluster can be adjusted to be consistent with the network protocol stack mode of the node to be mounted when the comparison result shows that the network protocol stack mode description information of the node to be mounted is inconsistent with the network protocol stack mode description information of the current cluster.
[0153] The first adjustment module is used to send permission information to the node to be mounted when the network protocol stack mode of the current cluster can be adjusted to be consistent with the network protocol stack mode of the node to be mounted, and adjust the network protocol stack mode of the current cluster to be consistent with the network protocol stack mode of the node to be mounted, so that the node to be mounted receives the permission information and performs mounting based on the permission information.
[0154] In some optional implementations, the node mounting device further includes:
[0155] The sending module is used to send a mount prohibition message to the node to be mounted and reject the mount request of the node to be mounted when the network protocol stack mode of the current cluster cannot be adjusted to be consistent with the network protocol stack mode of the node to be mounted.
[0156] In some optional implementations, the node mounting device further includes:
[0157] The monitoring module is used to monitor the mounting process of the node to be mounted in real time.
[0158] The third acquisition module is used to obtain exception information if an exception occurs during the mounting process of the node to be mounted.
[0159] The fifth determining module is configured to determine the mounting status of the node to be mounted based on the abnormal information.
[0160] In some optional implementations, the fifth determining module includes:
[0161] The first determining unit is configured to immediately stop the mounting of the node to be mounted and determine the mounting state of the node to be mounted as stopped mounting when the abnormality level indicated by the abnormality information is the first level.
[0162] The second determining unit is configured to continue mounting the node to be mounted and determine the mounting state of the node to be mounted as continuing mounting when the abnormality level represented by the abnormality information is the second level.
[0163] Among them, the abnormality level of the first level is higher than the abnormality level of the second level.
[0164] In some optional implementations, the node mounting device further includes:
[0165] The recording module is used to record the exception information in the log if an exception occurs during the mounting process of the node to be mounted, so that the user can analyze the cause of the exception based on the log, wherein the exception information includes the level of the exception.
[0166] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0167] The node mounting device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0168] The embodiment of the present invention also provides a computer device having the above Figure 4 The node mount device is shown.
[0169] See also Figure 5 , Figure 5 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 5 As shown, the computer device includes: one or more processors 501, memory 502, and the interface for connecting each component, including a high-speed interface and a low-speed interface. Each component utilizes different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instruction executed in the computer device, including the instruction stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, being coupled to the display device of the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides the necessary operation of part (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 501 is taken as an example.
[0170] Processor 501 may be a central processing unit, a network processor, or a combination thereof. Processor 501 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.
[0171] The memory 502 stores instructions that can be executed by at least one processor 501, so as to enable the at least one processor 501 to execute the method shown in the above embodiment.
[0172] The memory 502 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 502 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 502 may optionally include a memory remotely located relative to the processor 501, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0173] The memory 502 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid state drive; the memory 502 may also include a combination of the above types of memory.
[0174] The computer device further includes a communication interface 503 for the computer device to communicate with other devices or a communication network.
[0175] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.
[0176] A portion of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by the computer.
[0177] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A node mounting method, characterized in that: The method comprises: In response to a scene selection operation, determining a current scene; When the current scenario is the first scenario, receiving a mount request sent by the node to be mounted; Based on the mount request, obtain the network protocol stack configuration of the node to be mounted, and based on the network stack protocol configuration of the node to be mounted, generate network protocol stack mode description information of the node to be mounted; Compare the network protocol stack mode description information of the node to be mounted with the network protocol stack mode description information of the current cluster; When the comparison result shows that the network protocol stack mode description information of the node to be mounted is consistent with the network protocol stack mode description information of the current cluster, it is determined that the node to be mounted is allowed to be mounted to the current cluster, and a mount permission information is sent to the node to be mounted, so that the node to be mounted receives the mount permission information and performs mounting based on the mount permission information.
2. The method according to claim 1, characterized in that The method further comprises: If the comparison result shows that the network protocol stack mode description information of the node to be mounted is inconsistent with the network protocol stack mode description information of the current cluster, it is determined that the node to be mounted is prohibited from mounting, and an error message indicating that the network protocol stack mode does not match is returned.
3. The method according to claim 1, characterized in that The method further comprises: When the current scenario is the second scenario, receiving a mount request and a message for network protocol stack mode negotiation sent by the node to be mounted; Based on the mount request sent by the node to be mounted, obtaining network protocol stack mode description information of the node to be mounted in the message for network protocol stack mode negotiation; Compare the network protocol stack mode description information of the node to be mounted with the network protocol stack mode description information of the current cluster; If the comparison result shows that the network protocol stack mode description information of the node to be mounted is consistent with the network protocol stack mode description information of the current cluster, determine to allow the node to be mounted to be mounted to the current cluster, and send a mount permission message to the node to be mounted, so that the node to be mounted receives the mount permission message and performs the mount operation based on the mount permission message; If the comparison result shows that the network protocol stack mode description information of the node to be mounted is inconsistent with the network protocol stack mode description information of the current cluster, determining whether the network protocol stack mode of the current cluster can be adjusted to be consistent with the network protocol stack mode of the node to be mounted; When the network protocol stack mode of the current cluster can be adjusted to be consistent with the network protocol stack mode of the node to be mounted, a mount permission information is sent to the node to be mounted, and the network protocol stack mode of the current cluster is adjusted to be consistent with the network protocol stack mode of the node to be mounted, so that the node to be mounted receives the mount permission information and performs mounting based on the mount permission information.
4. The method according to claim 3, characterized in that The method further comprises: When the network protocol stack mode of the current cluster cannot be adjusted to be consistent with the network protocol stack mode of the node to be mounted, a mount prohibition message is sent to the node to be mounted, and the mount request of the node to be mounted is rejected.
5. The method according to claim 1, wherein The method further comprises: Real-time monitoring of the process of mounting the node to be mounted; If an exception occurs during the mounting process of the node to be mounted, obtain the exception information; Based on the abnormal information, the mounting status of the node to be mounted is determined.
6. The method according to claim 5, characterized in that The determining, based on the abnormal information, the mounting status of the node to be mounted, includes: If the abnormality level indicated by the abnormal information is the first level, immediately stop the mounting of the node to be mounted, and determine the mounting state of the node to be mounted as stopped mounting; When the abnormality level indicated by the abnormal information is the second level, continuing to mount the node to be mounted, and determining the mounting state of the node to be mounted to continue mounting; The first level of abnormality is higher than the second level of abnormality.
7. The method according to claim 5, characterized in that The method further comprises: If an exception occurs during the mounting process of the node to be mounted, the exception information is recorded in a log so that the user can analyze the cause of the exception based on the log, wherein the exception information includes the level of the exception.
8. A node mounting device, characterized in that: The device comprises: A first determining module, configured to determine a current scene in response to a scene selection operation; A first receiving module is configured to receive a mount request sent by a node to be mounted when the current scenario is the first scenario; A first acquisition module is configured to acquire, based on the mount request, a network protocol stack configuration of the node to be mounted, and generate network protocol stack mode description information of the node to be mounted based on the network stack protocol configuration of the node to be mounted; A first comparison module is used to compare the network protocol stack mode description information of the node to be mounted with the network protocol stack mode description information of the current cluster; The second determination module is used to determine that the node to be mounted is allowed to be mounted to the current cluster when the comparison result shows that the network protocol stack mode description information of the node to be mounted is consistent with the network protocol stack mode description information of the current cluster, and send a mount permission information to the node to be mounted, so that the node to be mounted receives the mount permission information and performs mounting based on the mount permission information.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the node mounting method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the node mounting method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Distributed virtual machine manager
CN108932154A
Data transmission protocol self-adaption method, system, equipment and medium
CN117857660A