Fault diagnosis methods, devices, storage media and electronic equipment for cloud physical machines
By conducting routine inspections and automated fault diagnosis of cloud physical machine nodes, the problem of low efficiency in troubleshooting cloud physical machine faults has been solved, enabling rapid and accurate fault location and elimination.
Patent Information
- Application Number
- CN202411845625.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-12-13
AI Technical Summary
Troubleshooting cloud physical machines is inefficient, and existing technologies mainly rely on manual troubleshooting, which is time-consuming and cumbersome.
By inspecting cloud physical machine nodes, faulty nodes and their operational stages are obtained. By comparing virtual LAN information and conducting network connectivity tests, the fault type and cause are automatically diagnosed.
It improves troubleshooting efficiency, reduces human intervention, quickly locates faults, and enhances the reliability of cloud physical machine services.
Smart Images

Figure CN119814534B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud computing, and more specifically, to a method, apparatus, storage medium, and electronic device for diagnosing faults in cloud physical machines. Background Technology
[0002] In the field of cloud computing technology, bare metal services, as a type of computing service that combines the elasticity of virtual machines and the performance of physical machines, can provide individuals or enterprises with dedicated physical servers in the cloud. Creating a bare metal cloud physical machine is similar to creating a virtual machine; simply specify the hardware requirements, such as processor, memory, image, and network configuration, and the required bare metal cloud physical machine can be created. Users can also flexibly apply for and use it as needed. However, the process involved in the deployment of cloud physical machines by cloud platforms is quite complex, from bare metal registration and bare metal checks to cloud physical machine deployment and distribution. The entire process also involves the control of bare metal direct-connect switches and the creation of PXE (Preboot Execution Environment) networks. Therefore, the deployment and distribution process of cloud physical machines is prone to failure. Typically, cloud platforms use manual troubleshooting when bare metal cloud physical machines are deployed, which is time-consuming, cumbersome, and inefficient.
[0003] Therefore, in related technologies, there is a problem of low efficiency in troubleshooting cloud physical machines.
[0004] There is still no effective solution to the problem of low efficiency in troubleshooting cloud physical machines in related technologies. Summary of the Invention
[0005] This application provides a method, apparatus, storage medium, and electronic device for diagnosing cloud physical machines, so as to at least solve the problem of low efficiency in troubleshooting cloud physical machines in related technologies.
[0006] According to one embodiment of this application, a fault diagnosis method for cloud physical machines is provided, applied to a cloud physical machine inspection system. The cloud physical machine inspection system includes a cloud physical machine resource pool, a switch, and cloud physical machine nodes. Each cloud physical machine node corresponds to a server of a cloud physical machine. The cloud physical machine node is connected to the switch. The cloud physical machine resource pool is used to manage the cloud physical machine nodes. The method includes: obtaining inspection results from inspecting the cloud physical machine nodes, the inspection results indicating the faulty cloud physical machine node and the operating stage at which the faulty cloud physical machine node experienced the fault; performing fault diagnosis on the faulty cloud physical machine node based on the inspection results to obtain a fault diagnosis result; and sending the fault diagnosis result to a target object.
[0007] In an exemplary embodiment, fault diagnosis is performed on the faulty cloud physical machine node based on the inspection results to obtain a fault diagnosis result, including: acquiring first virtual local area network (VLAN) information of the cloud physical machine deployment guidance network, wherein the cloud physical machine deployment guidance network is created by the cloud physical machine resource pool and is used to guide the deployment of cloud physical machines in the cloud physical machine resource pool; and acquiring second VLAN information of the target port of the target switch, wherein the target switch represents the switch connected to the faulty cloud physical machine node, and the target port represents the port of the target switch connected to the faulty cloud physical machine node; comparing the first VLAN information and the second VLAN information to obtain a comparison result; and determining the fault diagnosis result as VLAN information inconsistency if the comparison result indicates that the first VLAN information and the second VLAN information are inconsistent.
[0008] In an exemplary embodiment, obtaining first VLAN information of the cloud physical machine deployment boot network and second VLAN information of the target port of the target switch includes: determining the fault type of the faulty cloud physical machine node based on the operating stage at which the faulty cloud physical machine node is in when the fault occurs, and obtaining the first VLAN information and the second VLAN information according to the method corresponding to the fault type; wherein, if the fault occurrence stage is determined to be an inspection stage, the fault type is determined to be a cloud physical machine inspection fault, and if the fault occurrence stage is determined to be a deployment stage, the fault type is determined to be a cloud physical machine deployment fault.
[0009] In an exemplary embodiment, obtaining the first virtual local area network (VLAN) information and the second VLAN information according to the method corresponding to the fault type includes: when the fault type is determined to be a cloud physical machine check fault, obtaining the configuration file of the cloud physical machine resource pool; obtaining first login information from the configuration file, and logging into a first management system according to the first login information, wherein the first login information represents the login information of the cloud physical machine resource pool, the first management system represents the management system of the cloud physical machine resource pool, and the first management system is used to manage the network configuration information of the cloud physical machine resource pool; obtaining the first VLAN information from the first management system; obtaining second login information from the first management system, and logging into a second management system according to the second login information, wherein the second login information represents the login information of the target switch, the second management system represents the management system of the target switch, and the second management system is used to manage the network configuration information of the target switch; and obtaining the second VLAN information from the second management system.
[0010] In an exemplary embodiment, obtaining the first virtual local area network (VLAN) information and the second VLAN information according to the method corresponding to the fault type includes: when the fault type is determined to be a cloud physical machine deployment fault, obtaining the configuration file of the cloud physical machine resource pool, obtaining first login information from the configuration file, and logging into the first management system according to the first login information; obtaining the first VLAN information from the first management system; obtaining the attribute information of the network connection port of the faulty cloud physical machine node, obtaining the second login information from the attribute information, and logging into the second management system according to the second login information; and obtaining the second VLAN information from the second management system.
[0011] In an exemplary embodiment, after comparing the first virtual local area network (VLAN) information and the second VLAN information to obtain a comparison result, the method further includes: if the comparison result indicates that the first VLAN information and the second VLAN information are consistent, obtaining the network addresses of all network connection ports of the cloud physical machine deployment boot network to obtain multiple network addresses, and performing a network connectivity test on the multiple network addresses; if the network connectivity test fails, determining the fault diagnosis result as a network connectivity fault.
[0012] In one exemplary embodiment, performing a network connectivity test on the plurality of network addresses includes: selecting a first network address and a second network address from the plurality of network addresses; sending an echo request message to the second network address through the first network address; if it is determined that the second network address has received the echo request message, sending an echo response message to the first network address through the second network address; if it is determined that the first network address has received the echo response message, determining that the first network address and the second network address are connected; and traversing the plurality of network addresses, determining that the network connectivity test has passed if it is determined that any two network addresses are connected.
[0013] According to another embodiment of this application, a fault diagnosis device for a cloud physical machine is provided, comprising: an acquisition module, configured to acquire inspection results obtained from inspecting cloud physical machine nodes, the inspection results being used to indicate the faulty cloud physical machine node and the operating stage at which the faulty cloud physical machine node is located when the fault occurs; a diagnosis module, configured to perform fault diagnosis on the faulty cloud physical machine node based on the inspection results, and obtain fault diagnosis results; and a sending module, configured to send the fault diagnosis results to a target object.
[0014] According to yet another embodiment of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and the computer program is configured to perform the steps in any of the above method embodiments when it is run.
[0015] According to yet another embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0016] According to yet another embodiment of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0017] This application enables the inspection of cloud physical machine nodes to identify faulty cloud physical machine nodes and the operational stage at which the faulty cloud physical machine nodes were located. Based on the operational stage at which the faulty cloud physical machine nodes were located, fault diagnosis can be performed on the faulty cloud physical machine nodes, and the fault diagnosis results can be sent to the target object. This can solve the problem of low efficiency in cloud physical machine fault diagnosis in related technologies. Attached Figure Description
[0018] Figure 1 This is a hardware structure block diagram of a server device for a fault diagnosis method for a cloud physical machine according to an embodiment of this application;
[0019] Figure 2 This is a flowchart of a fault diagnosis method for a cloud physical machine according to an embodiment of this application;
[0020] Figure 3 This is a schematic diagram (a) of a fault diagnosis method for a cloud physical machine according to an embodiment of this application;
[0021] Figure 4 This is a schematic diagram (II) of a fault diagnosis method for a cloud physical machine according to an embodiment of this application;
[0022] Figure 5 This is a structural block diagram of a fault diagnosis device for a cloud physical machine according to an embodiment of this application. Detailed Implementation
[0023] The embodiments of this application will be described in detail below with reference to the accompanying drawings and examples.
[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0025] The methods and embodiments provided in this application can be executed on a server device or a similar computing device. Taking running on a server device as an example, Figure 1 This is a hardware structure block diagram of a server device for a fault diagnosis method for a cloud physical machine according to an embodiment of this application. For example... Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The server device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the server equipment described above. For example, the server equipment may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0026] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the cloud physical machine fault diagnosis method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby realizing the aforementioned cloud physical machine fault diagnosis method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to server devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0027] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the server device. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0028] The following explains the technical terms used in this application:
[0029] Bare metal server: A physical server without an operating system installed, often simply referred to as bare metal.
[0030] Cloud physical machine: In the context of cloud platforms, this concept corresponds to virtual machines. It refers to a bare-metal server in the cloud platform where an operating system has been installed.
[0031] OpenStack: An open-source cloud computing management platform.
[0032] Ironic: A bare metal service in OpenStack used to manage and deploy bare metal.
[0033] bm-pxe network: A network specifically used for PXE (Preboot Execution Environment) booting during bare metal server deployment and management. PXE is a protocol that allows network booting, enabling computers to start an operating system over a network without local storage.
[0034] This embodiment provides a fault diagnosis method for cloud physical machines, applied to a cloud physical machine inspection system. The cloud physical machine inspection system includes a cloud physical machine resource pool, a switch, and cloud physical machine nodes. Each cloud physical machine node corresponds to a server of a cloud physical machine. The cloud physical machine node is connected to the switch, and the cloud physical machine resource pool is used to manage the cloud physical machine nodes. Figure 2 This is a flowchart of a fault diagnosis method for a cloud physical machine according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:
[0035] Step S202: Obtain the inspection results obtained from the inspection of the cloud physical machine node. The inspection results are used to indicate the faulty cloud physical machine node and the operating stage of the faulty cloud physical machine node when the fault occurred.
[0036] It should be noted that in step S202 above, the operation phase when the faulty cloud physical machine node fails includes an inspection phase and a deployment phase. The inspection phase refers to the phase of obtaining the bare metal server hardware information, and the deployment phase refers to the phase of deploying the operating system on the bare metal server after the inspection phase is passed.
[0037] Step S204: Perform fault diagnosis on the faulty cloud physical machine node based on the inspection results to obtain the fault diagnosis results;
[0038] Step S206: Send the fault diagnosis results to the target object.
[0039] By performing the above steps, the faulty cloud physical machine nodes can be inspected to obtain the faulty cloud physical machine nodes and the operating stage at which the faulty cloud physical machine nodes were at the time of the fault. Then, the fault diagnosis of the faulty cloud physical machine nodes can be performed based on the operating stage at which the faulty cloud physical machine nodes were at the time of the fault, and the fault diagnosis results can be sent to the target object. This can solve the problem of low efficiency in cloud physical machine fault diagnosis in related technologies.
[0040] In an exemplary embodiment, the specific implementation process of performing fault diagnosis on the faulty cloud physical machine node based on the inspection results in step S202 above, and obtaining the fault diagnosis result, includes: obtaining first virtual local area network (VLAN) information of the cloud physical machine deployment guidance network, wherein the cloud physical machine deployment guidance network is created by the cloud physical machine resource pool, and the cloud physical machine deployment guidance network is used to guide the deployment of cloud physical machines in the cloud physical machine resource pool; and obtaining second VLAN information of the target port of the target switch, wherein the target switch represents the switch connected to the faulty cloud physical machine node, and the target port represents the port connected to the target switch and the faulty cloud physical machine node; comparing the first VLAN information and the second VLAN information to obtain a comparison result; and determining the fault diagnosis result as VLAN information inconsistency if the comparison result indicates that the first VLAN information and the second VLAN information are inconsistent.
[0041] Optionally, in the above embodiments, the cloud physical machine deployment boot network is the bm-pxe network, and the first virtual local area network information of the cloud physical machine deployment boot network is the VLAN (Virtual Local Area Network) information of the bm-pxe network. The cloud physical machine node is connected to the port of the switch, the target port is the port where the faulty cloud physical machine node is connected to the switch, and the second virtual local area network information is the VLAN information of the target port.
[0042] Through the above embodiments, the virtual local area network information of the cloud physical machine deployment guidance network and the virtual local area network information of the switch port connected to the cloud physical machine node can be compared, thereby quickly determining whether the fault is caused by the inconsistency of virtual local area network information, and improving the efficiency of fault diagnosis.
[0043] In an exemplary embodiment, the process of obtaining the first virtual local area network (VLAN) information of the cloud physical machine deployment guidance network and the second VLAN information of the target port of the target switch can be implemented in the following way: determining the fault type of the faulty cloud physical machine node based on the operating stage at which the faulty cloud physical machine node is in when the fault occurs, and obtaining the first VLAN information and the second VLAN information according to the method corresponding to the fault type; wherein, if the fault occurrence stage is determined to be the inspection stage, the fault type is determined to be a cloud physical machine inspection fault, and if the fault occurrence stage is determined to be the deployment stage, the fault type is determined to be a cloud physical machine deployment fault.
[0044] Optionally, in the above embodiments, the inspection phase requires inspecting the bare metal server to obtain basic information such as the server's processor, memory, and hard drive. The deployment phase requires writing the user image to the hard drive of the bare metal server and then controlling the switch to switch the bare metal network to the user network.
[0045] Through the above embodiments, fault diagnosis can be performed on fault nodes of cloud physical machines according to different fault types, achieving the effect of targeted fault investigation for specific fault scenarios, thereby locating fault problems more quickly.
[0046] In an exemplary embodiment, the process of obtaining the first virtual local area network (VLAN) information and the second VLAN information according to the fault type includes: when the fault type is determined to be a cloud physical machine check fault, obtaining the configuration file of the cloud physical machine resource pool; obtaining first login information from the configuration file, and logging into a first management system according to the first login information, wherein the first login information represents the login information of the cloud physical machine resource pool, the first management system represents the management system of the cloud physical machine resource pool, and the first management system is used to manage the network configuration information of the cloud physical machine resource pool; obtaining the first VLAN information from the first management system; obtaining second login information from the first management system, and logging into a second management system according to the second login information, wherein the second login information represents the login information of the target switch, the second management system represents the management system of the target switch, and the second management system is used to manage the network configuration information of the target switch; and obtaining the second VLAN information from the second management system.
[0047] Optionally, in the above embodiments, the configuration file of the cloud physical machine resource pool includes the environment address of the bare metal resource pool, the endpoint address, and information such as the token (equivalent to the first login information). The endpoint is the access point of the service in OpenStack, used to interact with the OpenStack service, and the token is the authentication credential used to access the service. By using the contents of the above configuration file, one can log in to the management system of the cloud physical machine resource pool and then obtain the VLAN information of the bm-pxe network.
[0048] The management system of the cloud physical machine resource pool can also obtain the login information of the target switch (equivalent to the second login information), which includes the IP address, login account and password. The target switch refers to the switch that the faulty physical machine node is connected to. By using the above IP address, login account and password, you can log in to the management system of the target switch and then obtain the VLAN information of the port connected to the switch by the faulty cloud physical machine node.
[0049] In an exemplary embodiment, the above-described process of obtaining the first virtual local area network (VLAN) information and the second VLAN information according to the method corresponding to the fault type further includes: when the fault type is determined to be a cloud physical machine deployment fault, obtaining the configuration file of the cloud physical machine resource pool, obtaining first login information from the configuration file, and logging into the first management system according to the first login information; obtaining the first VLAN information from the first management system; obtaining the attribute information of the network connection port of the faulty cloud physical machine node, obtaining the second login information from the attribute information, and logging into the second management system according to the second login information; and obtaining the second VLAN information from the second management system.
[0050] Optionally, in the above embodiments, the cloud physical machine node can connect to different networks. By viewing the properties of the network connection port, the name and port information of the target switch can be obtained. Then, the corresponding IP address, login account, and password can be obtained from the configuration file based on the name and port information of the target switch. The management system of the target switch can be logged in using the IP address, login account, and password, and then the VLAN information of the port connected to the switch by the faulty cloud physical machine node can be obtained.
[0051] In an exemplary embodiment, after performing the steps described above of comparing the first virtual local area network (VLAN) information and the second VLAN information to obtain a comparison result, the method further includes: if the comparison result indicates that the first VLAN information and the second VLAN information are consistent, obtaining the network addresses of all network connection ports of the cloud physical machine deployment boot network to obtain multiple network addresses, and performing a network connectivity test on the multiple network addresses; if the network connectivity test fails, determining the fault diagnosis result as a network connectivity fault.
[0052] In an exemplary embodiment, network connectivity testing of the plurality of network addresses can be performed in the following manner: selecting a first network address and a second network address from the plurality of network addresses; sending an echo request message to the second network address through the first network address; if it is determined that the second network address has received the echo request message, sending an echo response message to the first network address through the second network address; if it is determined that the first network address has received the echo response message, determining that the first network address and the second network address are connected; traversing the plurality of network addresses, and if it is determined that any two network addresses are connected, determining that the network connectivity test has passed.
[0053] Obviously, the embodiments described above are only some embodiments of this application, and not all embodiments. To better understand the verification method for the above test cases, the following description, in conjunction with embodiments, illustrates the process, but is not intended to limit the technical solutions of the embodiments of this application. Specifically:
[0054] In an optional embodiment, Figure 3 This is a schematic diagram (a) of a fault diagnosis method for a cloud physical machine according to an embodiment of this application, as shown below. Figure 3 As shown, the specific steps include:
[0055] Step S301: Power on the cloud physical machine inspection system.
[0056] Optionally, the architecture of the aforementioned cloud physical machine inspection system is as follows: Figure 4 As shown, the cloud physical machine inspection system is interconnected with the cloud physical machine resource pool, cloud physical machine nodes, and switches through the management network. The cloud physical machine nodes correspond to physical servers. The cloud physical machine nodes access the switch, and the switch connects to the cloud physical machine resource pool to generate cloud physical machine instances. The cloud physical machine resource pool includes multiple instances of cloud physical machine nodes to perform unified resource management of the cloud physical machine nodes.
[0057] Step S302: Read the configuration file and parse the input parameters.
[0058] The input parameters of the cloud physical machine fault inspection system include the unique identifier of the cloud physical machine node and the specified port information of the switch to which the cloud physical machine node is connected. After parsing the input parameters, they will be saved to global variables for convenient use in subsequent processing.
[0059] Step S303: Login authentication.
[0060] The configuration file contains the IP address, username, and password for the cloud physical machine resource pool. The cloud physical machine inspection system can log in to the bare metal resource pool management system using the username and password.
[0061] Step S304: Fault diagnosis.
[0062] If the fault occurs during the inspection phase, the bare metal inspection system first logs into the cloud physical machine resource pool management system and reads the VLAN of the BM-PXE network through control commands. After obtaining the VLAN, it reads the switch's IP address, login account, and password through control commands. Then, it logs into the switch's management system to obtain the VLAN of the specified port. It then compares the VLAN of the BM-PXE network with the VLAN of the specified port. If they are inconsistent, the fault is determined to be due to VLAN inconsistency. If the two VLANs are consistent, it proceeds to the BM-PXE network detection and processing. First, the cloud physical machine inspection system retrieves all ports (equivalent to network connection nodes) under the BM-PXE network name from the cloud physical machine resource pool. It resolves the obtained ports, extracts the IP address, and saves it. Then, it performs a ping operation on all the obtained BM-PXE port IPs (equivalent to a network connectivity test). If any ping fails, the fault diagnosis result is determined to be a network connectivity fault. If any abnormality occurs during the above execution process, the cloud physical machine inspection system will stop and return an abnormal result.
[0063] If the fault occurs during the cloud physical machine inspection phase to obtain server hardware information, the cloud physical machine inspection system first logs into the cloud physical machine resource pool management system and reads the VLANs of the BM-PXE network through control commands. After obtaining the information, it retrieves all ports of the current cloud physical machine node based on the unique identifier of the faulty node and processes each port. During port processing, it retrieves the name and port information of the switch connected to the current cloud physical machine node from the port's attributes. Then, it reads the IP address, username, and password of the switch corresponding to the switch name from the configuration file, logs into the switch management system, and retrieves the VLANs of the ports of the switches connected to the cloud physical machine node. It then compares the VLANs of the BM-PXE network with the VLANs of the switch ports. If they are inconsistent, the fault is determined to be due to VLAN inconsistency. If the VLANs are consistent, the BM-PXE network is diagnosed, and the specific process is the same as the processing procedure in the inspection phase described above, which will not be repeated here.
[0064] Step S305: Output the fault diagnosis results.
[0065] Output the above fault diagnosis results and send them to the target object.
[0066] The above embodiments can automatically check whether the VLANs of cloud physical machines and switches are configured correctly, and automatically check whether the PXE network of cloud physical machines is deployed correctly, reducing the cost of manual troubleshooting and improving the reliability of cloud service products such as cloud physical machine services.
[0067] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0068] This embodiment also provides a fault diagnosis device for a cloud physical machine. This system is used to implement the above embodiments and preferred embodiments, and details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the system described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0069] Figure 5 This is a structural block diagram of a cloud physical machine fault diagnosis device according to an embodiment of this application, such as... Figure 5 As shown, the device includes:
[0070] The acquisition module 52 is used to acquire the inspection results obtained from the inspection of cloud physical machine nodes. The inspection results are used to indicate the faulty cloud physical machine node and the operating stage of the faulty cloud physical machine node when the fault occurred.
[0071] Diagnostic module 54 is used to perform fault diagnosis on the faulty cloud physical machine node based on the inspection results and obtain fault diagnosis results;
[0072] The sending module 56 is used to send the fault diagnosis results to the target object.
[0073] The aforementioned device allows for the inspection of cloud physical machine nodes, identifying faulty cloud physical machine nodes and their operational phases at the time of failure. Based on these operational phases, fault diagnosis can be performed on the faulty cloud physical machine nodes, and the diagnosis results can be sent to the target object. This addresses the problem of low efficiency in troubleshooting cloud physical machine faults in related technologies.
[0074] In an exemplary embodiment, the diagnostic module 54 is further configured to: acquire first virtual local area network (VLAN) information of a cloud physical machine deployment guidance network, wherein the cloud physical machine deployment guidance network is created by the cloud physical machine resource pool and is used to guide the deployment of cloud physical machines in the cloud physical machine resource pool; acquire second VLAN information of a target port of a target switch, wherein the target switch represents the switch connected to the faulty cloud physical machine node, and the target port represents the port connected to the target switch and the faulty cloud physical machine node; compare the first VLAN information and the second VLAN information to obtain a comparison result; and, if the comparison result indicates that the first VLAN information and the second VLAN information are inconsistent, determine the fault diagnosis result as inconsistent VLAN information.
[0075] In an exemplary embodiment, the diagnostic module 54 is further configured to: determine the fault type of the faulty cloud physical machine node based on the operating stage at which the faulty cloud physical machine node fails, and obtain the first virtual local area network information and the second virtual local area network information according to the method corresponding to the fault type; wherein, if the fault occurrence stage is determined to be an inspection stage, the fault type is determined to be a cloud physical machine inspection fault, and if the fault occurrence stage is determined to be a deployment stage, the fault type is determined to be a cloud physical machine deployment fault.
[0076] In an exemplary embodiment, the diagnostic module 54 is further configured to: when the fault type is determined to be a cloud physical machine check fault, obtain the configuration file of the cloud physical machine resource pool; obtain first login information from the configuration file, and log in to the first management system according to the first login information, wherein the first login information represents the login information of the cloud physical machine resource pool, the first management system represents the management system of the cloud physical machine resource pool, and the first management system is used to manage the network configuration information of the cloud physical machine resource pool; obtain the first virtual local area network information from the first management system; obtain second login information from the first management system, and log in to the second management system according to the second login information, wherein the second login information represents the login information of the target switch, the second management system represents the management system of the target switch, and the second management system is used to manage the network configuration information of the target switch; and obtain the second virtual local area network information from the second management system.
[0077] In an exemplary embodiment, the diagnostic module 54 is further configured to: when the fault type is determined to be a cloud physical machine deployment fault, obtain the configuration file of the cloud physical machine resource pool, obtain first login information from the configuration file, and log in to the first management system according to the first login information; obtain first virtual local area network information from the first management system; obtain attribute information of the network connection port of the faulty cloud physical machine node, obtain second login information from the attribute information, and log in to the second management system according to the second login information; and obtain second virtual local area network information from the second management system.
[0078] In an exemplary embodiment, the diagnostic module 54 is further configured to: when the comparison result indicates that the first virtual local area network information and the second virtual local area network information are consistent, obtain the network addresses of all network connection ports of the cloud physical machine deployment boot network to obtain multiple network addresses, and perform network connectivity tests on the multiple network addresses; when the network connectivity test is determined to fail, determine the fault diagnosis result as a network connectivity fault.
[0079] In an exemplary embodiment, the diagnostic module 54 is further configured to: select a first network address and a second network address from the plurality of network addresses; send an echo request message to the second network address through the first network address; if it is determined that the second network address has received the echo request message, send an echo response message to the first network address through the second network address; if it is determined that the first network address has received the echo response message, determine that the first network address and the second network address are connected; traverse the plurality of network addresses, and if it is determined that any two network addresses are connected, determine that the network connectivity test has passed.
[0080] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0081] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when run.
[0082] Optionally, in this embodiment, the storage medium may be configured to store program code for performing the following steps:
[0083] S1, obtain the inspection results obtained from the inspection of the cloud physical machine node, the inspection results are used to indicate the faulty cloud physical machine node and the operating stage when the faulty cloud physical machine node fails.
[0084] S2, perform fault diagnosis on the faulty cloud physical machine node based on the inspection results, and obtain the fault diagnosis results;
[0085] S3, send the fault diagnosis results to the target object.
[0086] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0087] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0088] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0089] S1, obtain the inspection results obtained from the inspection of the cloud physical machine node, the inspection results are used to indicate the faulty cloud physical machine node and the operating stage when the faulty cloud physical machine node fails.
[0090] S2, perform fault diagnosis on the faulty cloud physical machine node based on the inspection results, and obtain the fault diagnosis results;
[0091] S3, send the fault diagnosis results to the target object.
[0092] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0093] Optionally, in this embodiment, the computer program described above can be configured to perform the following steps:
[0094] S1, obtain the inspection results obtained from the inspection of the cloud physical machine node, the inspection results are used to indicate the faulty cloud physical machine node and the operating stage when the faulty cloud physical machine node fails.
[0095] S2, perform fault diagnosis on the faulty cloud physical machine node based on the inspection results, and obtain the fault diagnosis results;
[0096] S3, send the fault diagnosis results to the target object.
[0097] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0098] It is obvious to those skilled in the art that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be integrated on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0099] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A fault diagnosis method for cloud physical machines, characterized in that, An application is made to a cloud physical machine inspection system, which includes a cloud physical machine resource pool, a switch, and cloud physical machine nodes. Each cloud physical machine node corresponds to a server of a cloud physical machine, and the cloud physical machine nodes are connected to the switch. The cloud physical machine resource pool is used to manage the cloud physical machine nodes. The method includes: Obtain the inspection results obtained from the inspection of the cloud physical machine node. The inspection results are used to indicate the faulty cloud physical machine node and the operating stage when the faulty cloud physical machine node fails. The operating stage includes the inspection stage and the deployment stage. Based on the inspection results, fault diagnosis is performed on the faulty cloud physical machine node to obtain the fault diagnosis result; The fault diagnosis results are sent to the target object.
2. The method according to claim 1, characterized in that, Based on the inspection results, fault diagnosis is performed on the faulty cloud physical machine node to obtain the fault diagnosis results, including: Obtain the first virtual local area network information of the cloud physical machine deployment guidance network, wherein the cloud physical machine deployment guidance network is created by the cloud physical machine resource pool, and the cloud physical machine deployment guidance network is used to guide the deployment of cloud physical machines in the cloud physical machine resource pool; And obtain the second virtual LAN information of the target port of the target switch, wherein the target switch refers to the switch connected to the faulty cloud physical machine node, and the target port refers to the port of the target switch connected to the faulty cloud physical machine node; The first virtual local area network (VLAN) information and the second VLAN information are compared to obtain the comparison result; If the comparison result indicates that the first VLAN information and the second VLAN information are inconsistent, the fault diagnosis result is determined to be that the VLAN information is inconsistent.
3. The method according to claim 2, characterized in that, Obtain the first virtual local area network (VLAN) information of the cloud physical machine deployment boot network and the second VLAN information of the target port of the target switch, including: The fault type of the faulty cloud physical machine node is determined based on the operating stage at which the faulty cloud physical machine node fails, and the first virtual local area network information and the second virtual local area network information are obtained according to the method corresponding to the fault type. Specifically, if the fault occurrence stage is determined to be the inspection stage, the fault type is determined to be a cloud physical machine inspection fault; if the fault occurrence stage is determined to be the deployment stage, the fault type is determined to be a cloud physical machine deployment fault.
4. The method according to claim 3, characterized in that, Obtaining the first virtual local area network (VLAN) information and the second VLAN information according to the method corresponding to the fault type includes: If the fault type is determined to be a cloud physical machine check fault, the configuration file of the cloud physical machine resource pool is obtained; Obtain first login information from the configuration file, and log in to the first management system based on the first login information. The first login information represents the login information of the cloud physical machine resource pool, and the first management system represents the management system of the cloud physical machine resource pool. The first management system is used to manage the network configuration information of the cloud physical machine resource pool. Obtain the first virtual local area network information from the first management system; Obtain second login information from the first management system, and log in to the second management system according to the second login information. The second login information represents the login information of the target switch, and the second management system represents the management system of the target switch. The second management system is used to manage the network configuration information of the target switch. Obtain the second virtual local area network information from the second management system.
5. The method according to claim 4, characterized in that, Obtaining the first virtual local area network (VLAN) information and the second VLAN information according to the method corresponding to the fault type includes: If the fault type is determined to be a cloud physical machine deployment fault, the configuration file of the cloud physical machine resource pool is obtained, the first login information is obtained from the configuration file, and the user logs into the first management system according to the first login information. Obtain the first virtual local area network information from the first management system; Obtain the attribute information of the network connection port of the faulty cloud physical machine node, obtain the second login information from the attribute information, and log in to the second management system according to the second login information; Obtain the second virtual local area network information from the second management system.
6. The method according to claim 2, characterized in that, After comparing the first virtual local area network (VLAN) information and the second VLAN information to obtain the comparison result, the method further includes: If the comparison result indicates that the first virtual local area network information and the second virtual local area network information are consistent, the network addresses of all network connection ports of the cloud physical machine deployment guide network are obtained to obtain multiple network addresses, and network connectivity tests are performed on the multiple network addresses. If the network connectivity test fails, the fault diagnosis result will be used to determine a network connectivity failure.
7. The method according to claim 6, characterized in that, Perform network connectivity tests on the multiple network addresses, including: Select a first network address and a second network address from the plurality of network addresses, and send an echo request message to the second network address through the first network address; If it is determined that the second network address has received the echo request message, an echo response message is sent to the first network address through the second network address; If it is determined that the first network address has received the echo response message, it is determined that the first network address and the second network address are connected; The network connectivity test is considered passed if any two network addresses are found to be connected.
8. A fault diagnosis device for cloud physical machines, characterized in that, The device includes: The acquisition module is used to acquire the inspection results obtained from the inspection of cloud physical machine nodes. The inspection results are used to indicate the faulty cloud physical machine node and the operating stage when the faulty cloud physical machine node fails. The operating stage includes the inspection stage and the deployment stage. The diagnostic module is used to perform fault diagnosis on the faulty cloud physical machine node based on the inspection results, and obtain the fault diagnosis results; The sending module is used to send the fault diagnosis results to the target object.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Virtual machine fault detection method and device, computer readable storage medium and electronic equipment
CN109992466A
Fault positioning method and computing device
CN118295843A