TWI764160B - An implementation method, a device for high availability based on openstack, and an electronic device - Google Patents

An implementation method, a device for high availability based on openstack, and an electronic device

Info

Publication number
TWI764160B
TWI764160B TW109118358A TW109118358A TWI764160B TW I764160 B TWI764160 B TW I764160B TW 109118358 A TW109118358 A TW 109118358A TW 109118358 A TW109118358 A TW 109118358A TW I764160 B TWI764160 B TW I764160B
Authority
TW
Taiwan
Prior art keywords
bare metal
node
metal node
service
agent service
Prior art date
Application number
TW109118358A
Other languages
Chinese (zh)
Other versions
TW202147106A (en
Inventor
鐘碩彥
Original Assignee
鴻海精密工業股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 鴻海精密工業股份有限公司 filed Critical 鴻海精密工業股份有限公司
Priority to TW109118358A priority Critical patent/TWI764160B/en
Publication of TW202147106A publication Critical patent/TW202147106A/en
Application granted granted Critical
Publication of TWI764160B publication Critical patent/TWI764160B/en

Links

Images

Landscapes

  • Power Sources (AREA)
  • Hardware Redundancy (AREA)

Abstract

The present disclosure relates to an implementation method, a device for high availability based on OpenStack, and an electronic device. The method includes: a controlling node sets at least one main bare metal node and one alternate bare metal node, connect to the main bare metal node and the alternate bare metal node respectively by a power control network and controls the main bare metal node to turn on a power supply so that the main bare metal node can run a job system image file, receives node status information sent by the main bare metal node, and determines that the node status information is abnormal when failing to receives the node status information, turns off the power supply of the main bare metal node when the node status information of the main bare metal node is abnormal, and turns on the power supply of the alternate bare metal node in order to enable the alternate bare metal node to run the job system image file.

Description

基於OpenStack的裸機高可用性的實現方法、裝置及電子設備 Implementation method, device and electronic device for bare metal high availability based on OpenStack

本發明涉及雲計算技術領域,具體涉及一種基於OpenStack的裸機高可用性的實現方法、裝置及電子設備。 The invention relates to the technical field of cloud computing, in particular to a method, device and electronic device for realizing high availability of bare metal based on OpenStack.

OpenStack是一個開源的雲計算管理平臺項目,提供實施簡單、可大規模擴展、豐富、標準統一的雲計算管理平臺。作為雲計算IAAS層的標準,OpenStack已經廣泛的應用到各行業。但是到目前為止OpenStack並沒有完整的高可用性(High Availability,HA)的解決方案。如果底層裸機節點出現問題,無法自動拯救運行在裸機上面的服務。 OpenStack is an open source cloud computing management platform project that provides a cloud computing management platform that is simple to implement, scalable, rich, and standardized. As the standard of cloud computing IAAS layer, OpenStack has been widely used in various industries. But so far OpenStack does not have a complete High Availability (HA) solution. If there is a problem with the underlying bare metal node, the services running on the bare metal cannot be automatically rescued.

鑒於以上內容,有必要提出一種基於OpenStack的裸機高可用性的實現方法、裝置及電子設備以解決在裸機節點出現故障問題時將服務在另一裸機節點上運行,從而恢復服務的執行。 In view of the above, it is necessary to propose an OpenStack-based bare metal high availability implementation method, apparatus and electronic device to solve the problem of running a service on another bare metal node when a bare metal node fails, thereby restoring the execution of the service.

本申請的第一方面提供一種基於OpenStack的裸機高可用性的實現方法,所述方法包括:控制節點設定至少兩個裸機節點中的一個裸機節點為主裸機節點,及設定所述至少兩個裸機節點中剩下的裸機節點為備用裸機節點,其中,所述主裸機節點及備用裸機節點中注入有作業系統映射檔; 所述控制節點藉由電源控制網路分別與所述主裸機節點及備用裸機節點通訊連接並控制所述主裸機節點開啟電源以使所述主裸機節點運行所述作業系統映射檔,及藉由業務網路與所述主裸機節點通訊連接;所述控制節點接收所述主裸機節點發送的節點狀態資訊,並當未接收到所述主裸機節點發送的節點狀態資訊時確定所述主裸機節點工作異常;及所述控制節點當確定所述主裸機節點工作異常時控制關閉所述主裸機節點的電源,並啟動所述備用裸機節點的電源以使所述備用裸機節點運行所述作業系統映射檔。 A first aspect of the present application provides a method for realizing high availability of bare metal based on OpenStack, the method comprising: setting a bare metal node of at least two bare metal nodes by a control node as a primary bare metal node, and setting the at least two bare metal nodes The remaining bare metal node in the two bare metal nodes is a backup bare metal node, wherein an operating system mapping file is injected into the primary bare metal node and the backup bare metal node; The control node communicates with the primary bare metal node and the backup bare metal node respectively through a power control network, and controls the primary bare metal node to turn on power, so that the primary bare metal node runs the operating system mapping file , and communicate with the main bare metal node through the service network; the control node receives the node status information sent by the main bare metal node, and when the control node does not receive the node status information sent by the main bare metal node When it is determined that the primary bare metal node is abnormal; and the control node controls to turn off the power of the primary bare metal node when it is determined that the primary bare metal node is abnormal, and starts the power of the standby bare metal node to enable The standby bare metal node runs the operating system mapping file.

優選地,所述控制節點包括DHCP agent服務及Ironic conductor服務,所述裸機節點包括agent服務及電源控制器。 Preferably, the control node includes a DHCP agent service and an Ironic conductor service, and the bare metal node includes an agent service and a power controller.

優選地,所述控制節點藉由電源控制網路分別與所述主裸機節點及備用裸機節點通訊連接並控制所述主裸機節點開啟電源以使所述主裸機節點運行所述作業系統映射檔包括:所述Ironic conductor服務藉由所述電源控制網路與所述主裸機節點及所述備用裸機節點中的電源控制器通訊連接,並控制所述主裸機節點中的電源控制器啟動電源以使所述主裸機節點的所述agent服務運行所述作業系統映射檔。 Preferably, the control node communicates with the primary bare metal node and the backup bare metal node respectively through a power control network, and controls the primary bare metal node to turn on power so that the primary bare metal node runs the operation The system map file includes: the Ironic conductor service communicates with the power controllers in the primary bare metal node and the backup bare metal node through the power control network, and controls the power supply controller in the primary bare metal node. The power controller activates the power to make the agent service of the primary bare metal node run the operating system mapping file.

優選地,所述藉由業務網路與所述主裸機節點通訊連接包括:所述DHCP agent服務藉由所述業務網路與所述主裸機節點的所述agent服務通訊連接。 Preferably, the communication connection with the master bare metal node through a service network includes: the DHCP agent service is communicated and connected with the agent service of the master bare metal node through the service network.

優選地,所述DHCP agent服務藉由所述業務網路與所述主裸機節點的所述agent服務通訊連接包括:所述DHCP agent服務根據所述主裸機節點的agent服務發送的第一請求信號分配一目標IP位址給所述主裸機節點中的agent服務,並記錄所述主裸機節點的Mac地址,及所述DHCP agent服務藉由所述目標IP位址及所述 主裸機節點的Mac地址實現與所述主裸機節點中的agent服務通訊連接,其中所述第一請求信號包括所述主裸機節點的Mac位址。 Preferably, the communication connection between the DHCP agent service and the agent service of the master bare-metal node through the service network includes: the DHCP agent service sends a first message according to the agent service of the master bare-metal node. The request signal assigns a target IP address to the agent service in the main bare metal node, and records the Mac address of the main bare metal node, and the DHCP agent service uses the target IP address and the The Mac address of the main bare metal node implements a communication connection with the agent service in the main bare metal node, wherein the first request signal includes the Mac address of the main bare metal node.

優選地,在所述啟動所述備用裸機節點的電源以使所述備用裸機節點運行所述作業系統映射檔之後還包括:所述控制節點藉由所述Ironic conductor服務控制所述備用裸機節點的所述電源控制器開啟電源;藉由所述DHCP agent服務接收所述備用裸機節點的所述agent服務發送的請求IP位址的第二請求信號並根據所述第二請求信號分配目標IP位址給所述備用裸機節點的agent服務及記錄所述備用裸機節點的Mac地址以使得所述備用裸機節點的agent服務藉由所述業務網路與所述控制節點的所述DHCP agent服務通訊連接,其中,所述第二請求信號包括所述備用裸機節點的Mac位址。 Preferably, after the starting the power supply of the standby bare metal node to enable the standby bare metal node to run the operating system mapping file, the method further comprises: the control node controls the standby bare metal node through the Ironic conductor service The power controller of the standby bare metal node turns on the power supply; the DHCP agent service is used to receive a second request signal requesting an IP address sent by the agent service of the standby bare metal node and assign it according to the second request signal The target IP address is given to the agent service of the standby bare metal node and the Mac address of the standby bare metal node is recorded so that the agent service of the standby bare metal node can be used by all the connections between the business network and the control node. The DHCP agent service communication connection, wherein the second request signal includes the Mac address of the standby bare metal node.

優選地,在所述啟動所述備用裸機節點的電源以使所述備用裸機節點運行所述作業系統映射檔之後還包括:所述控制節點藉由所述Ironic conductor服務將與所述DHCP agent服務通訊連接的備用裸機節點設定為新的主裸機節點並選取另一個未使用的裸機節點為新的備用裸機節點,及將所述作業系統映射檔注入到所述新的備用裸機節點中。 Preferably, after starting the power supply of the standby bare metal node so that the standby bare metal node runs the operating system mapping file, the method further comprises: the control node communicates with the DHCP through the Ironic conductor service The backup bare metal node connected to the agent service communication is set as the new primary bare metal node and another unused bare metal node is selected as the new backup bare metal node, and the operating system mapping file is injected into the new backup bare metal node in bare metal nodes.

優選地,所述作業系統映射檔包括圖像檔檔、應用程式檔案及或作業系統檔。 Preferably, the operating system mapping file includes an image file, an application program file and/or an operating system file.

本申請的第二方面提供一種基於OpenStack的裸機高可用性的實現裝置,所述裝置包括:設置模組,設定至少兩個裸機節點中的一個裸機節點為主裸機節點,及設定所述至少兩個裸機節點中剩下的裸機節點為備用裸機節點,其中,所述主裸機節點及備用裸機節點中注入有作業系統映射檔; 通訊模組,控制控制節點藉由電源控制網路分別與所述主裸機節點及備用裸機節點通訊連接並控制所述主裸機節點開啟電源以使所述主裸機節點運行所述作業系統映射檔,及藉由業務網路與所述主裸機節點通訊連接;狀態檢測模組,控制所述控制節點接收所述主裸機節點發送的節點狀態資訊,並當未接收到所述主裸機節點發送的節點狀態資訊時確定所述主裸機節點工作異常;及控制模組,當確定所述主裸機節點工作異常時控制關閉所述主裸機節點的電源,並啟動所述備用裸機節點的電源以使所述備用裸機節點運行所述作業系統映射檔。 A second aspect of the present application provides a device for realizing high availability of bare metal based on OpenStack, the device comprising: setting a module, setting one bare metal node of at least two bare metal nodes as a master bare metal node, and setting all the bare metal nodes The remaining bare metal nodes in the at least two bare metal nodes are backup bare metal nodes, wherein an operating system mapping file is injected into the primary bare metal node and the backup bare metal node; A communication module, which controls the control node to communicate with the primary bare metal node and the backup bare metal node respectively through a power control network, and controls the primary bare metal node to turn on the power supply so that the primary bare metal node runs the operation a system mapping file, and communicated with the main bare metal node through a business network; a state detection module controls the control node to receive the node state information sent by the main bare metal node, and when not receiving the When the node status information sent by the master bare metal node determines that the master bare metal node is abnormal; and the control module controls to turn off the power of the master bare metal node when it is determined that the master bare metal node is abnormal, and starts all power supply of the standby bare metal node to enable the standby bare metal node to run the operating system map file.

本申請的協力廠商面提供一種電子設備,所述電子設備包括處理器及記憶體,所述處理器用於執行所述記憶體中存儲的電腦程式時實現上述基於OpenStack的裸機高可用性的實現方法。 The third party aspect of the present application provides an electronic device, the electronic device includes a processor and a memory, and the processor is used for implementing the above-mentioned OpenStack-based bare metal high availability implementation method when executing a computer program stored in the memory .

本案中的控制節點當確定主裸機節點工作異常時控制關閉所述主裸機節點的電源,並啟動備用裸機節點的電源以使所述備用裸機節點運行所述作業系統映射檔。從而解決在主裸機節點出現故障問題時將作業系統映射檔所包含服務在備用裸機節點上運行,從而恢復服務的執行。 In this case, the control node controls to turn off the power of the primary bare metal node when it is determined that the primary bare metal node is abnormal, and turns on the power of the backup bare metal node so that the backup bare metal node runs the operating system mapping file. Therefore, when the primary bare metal node fails, the service included in the operating system mapping file is run on the standby bare metal node, thereby restoring the execution of the service.

1:控制節點 1: control node

2:裸機節點 2: Bare metal node

11:DHCP agent服務 11:DHCP agent service

12:Ironic conductor服務 12: Ironic conductor service

21:agent服務 21:agent service

22:電源控制器 22: Power Controller

3:業務網路 3: Business Network

4:電源控制網路 4: Power control network

40:基於OpenStack的裸機高可用性的實現裝置 40: Implementation of OpenStack-based Bare Metal High Availability

401:設置模組 401: set module

402:通訊模組 402: Communication module

403:狀態檢測模組 403: Status detection module

404:控制模組 404: Control Module

5:電子設備 5: Electronic equipment

51:記憶體 51: Memory

52:處理器 52: Processor

53:電腦程式 53: Computer Programs

S11-S14:步驟 S11-S14: Steps

圖1為本發明一實施方式中基於OpenStack的裸機高可用性的實現方法的流程圖。 FIG. 1 is a flowchart of a method for realizing high availability of bare metal based on OpenStack in an embodiment of the present invention.

圖2為本發明一實施方式中基於OpenStack的裸機高可用性的實現方法的應用環境圖。 FIG. 2 is an application environment diagram of a method for realizing bare metal high availability based on OpenStack in an embodiment of the present invention.

圖3為本發明一實施方式中基於OpenStack的裸機高可用性的實現裝置的結構圖。 FIG. 3 is a structural diagram of an apparatus for implementing bare metal high availability based on OpenStack in an embodiment of the present invention.

圖4為本發明一實施方式中電子設備的示意圖。 FIG. 4 is a schematic diagram of an electronic device in an embodiment of the present invention.

為了能夠更清楚地理解本發明的上述目的、特徵和優點,下面結合附圖和具體實施例對本發明進行詳細描述。需要說明的是,在不衝突的情況下,本申請的實施例及實施例中的特徵可以相互組合。 In order to more clearly understand the above objects, features and advantages of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments may be combined with each other in the case of no conflict.

在下面的描述中闡述了很多具體細節以便於充分理解本發明,所描述的實施例僅僅是本發明一部分實施例,而不是全部的實施例。基於本發明中的實施例,本領域普通技術人員在沒有做出創造性勞動前提下所獲得的所有其他實施例,都屬於本發明保護的範圍。 In the following description, many specific details are set forth in order to facilitate a full understanding of the present invention, and the described embodiments are only some, but not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

除非另有定義,本文所使用的所有的技術和科學術語與屬於本發明的技術領域的技術人員通常理解的含義相同。本文中在本發明的說明書中所使用的術語只是為了描述具體的實施例的目的,不是旨在於限制本發明。 Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terms used herein in the description of the present invention are for the purpose of describing specific embodiments only, and are not intended to limit the present invention.

優選地,本發明基於OpenStack的裸機高可用性的實現方法應用在一個或者複數電子設備中。所述電子設備是一種能夠按照事先設定或存儲的指令,自動進行數值計算和/或資訊處理的設備,其硬體包括但不限於微處理器、專用積體電路(Application Specific Integrated Circuit,ASIC)、可程式設計閘陣列(Field-Programmable Gate Array,FPGA)、數文書處理器(Digital Signal Processor,DSP)、嵌入式設備等。 Preferably, the implementation method of bare metal high availability based on OpenStack of the present invention is applied to one or more electronic devices. The electronic device is a device that can automatically perform numerical calculations and/or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs) , Programmable Gate Array (Field-Programmable Gate Array, FPGA), Digital Signal Processor (Digital Signal Processor, DSP), embedded devices, etc.

所述電子設備可以是桌上型電腦、筆記型電腦、平板電腦及雲端伺服器等計算設備。所述設備可以與使用者藉由鍵盤、滑鼠、遙控器、觸控板或聲控設備等方式進行人機交互。 The electronic device may be a computing device such as a desktop computer, a notebook computer, a tablet computer, and a cloud server. The device can interact with the user by means of a keyboard, a mouse, a remote control, a touch pad or a voice control device.

實施例1 Example 1

圖1是本發明一實施方式中基於OpenStack的裸機高可用性的實現方法的流程圖。根據不同的需求,所述流程圖中步驟的順序可以改變,某些步驟可以省略。請參考圖2,所示為本發明一實施方式中基於OpenStack的裸機高 可用性的實現方法的應用環境圖。所述方法應用在控制節點1及至少兩個裸機節點2中。 FIG. 1 is a flowchart of a method for implementing bare metal high availability based on OpenStack in an embodiment of the present invention. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted. Please refer to FIG. 2, which shows an OpenStack-based bare metal high The application environment diagram of the realization method of usability. The method is applied in the control node 1 and at least two bare metal nodes 2 .

參考圖1所示,所述基於OpenStack的裸機高可用性的實現方法具體包括以下步驟: Referring to FIG. 1 , the implementation method of bare metal high availability based on OpenStack specifically includes the following steps:

步驟S11,控制節點1設定至少兩個裸機節點2中的一個裸機節點2為主裸機節點,及設定所述至少兩個裸機節點2中剩下的裸機節點2為備用裸機節點,其中,所述主裸機節點及備用裸機節點中注入有作業系統映射檔。 Step S11, the control node 1 sets one bare metal node 2 of the at least two bare metal nodes 2 as the primary bare metal node, and sets the remaining bare metal nodes 2 of the at least two bare metal nodes 2 as the standby bare metal node, wherein an operating system mapping file is injected into the primary bare metal node and the backup bare metal node.

本實施方式中,所述控制節點1包括DHCP agent服務11及Ironic conductor服務12。所述裸機節點2包括agent服務21及電源控制器22。本實施方式中,所述控制節點1的Ironic conductor服務12從所述至少兩個裸機節點2中隨機選擇一個裸機節點2為主裸機節點,所述至少兩個裸機節點2中剩下的一個或複數裸機節點2為備用裸機節點。所述作業系統映射檔被分別注入到主裸機節點及備用裸機節點的agent服務21中。本實施方式中,所述作業系統映射檔中包含待執行的服務。本實施方式中,所述作業系統映射檔包括圖像檔檔、應用程式檔案及或作業系統檔。 In this embodiment, the control node 1 includes a DHCP agent service 11 and an Ironic conductor service 12 . The bare metal node 2 includes an agent service 21 and a power controller 22 . In this embodiment, the Ironic conductor service 12 of the control node 1 randomly selects one bare metal node 2 from the at least two bare metal nodes 2 as the primary bare metal node, and the remaining bare metal nodes 2 of the at least two bare metal nodes 2 The next one or more bare metal nodes 2 are spare bare metal nodes. The operating system mapping files are respectively injected into the agent services 21 of the primary bare metal node and the backup bare metal node. In this implementation manner, the operating system mapping file includes services to be executed. In this embodiment, the operating system mapping file includes an image file, an application program file and/or an operating system file.

步驟S12,所述控制節點1藉由電源控制網路4分別與所述主裸機節點及備用裸機節點通訊連接並控制所述主裸機節點開啟電源以使所述主裸機節點運行所述作業系統映射檔,及藉由業務網路3與所述主裸機節點通訊連接。 Step S12, the control node 1 communicates with the main bare metal node and the backup bare metal node through the power control network 4 respectively, and controls the main bare metal node to turn on the power to make the main bare metal node run all the functions. The operating system mapping file is connected to the main bare metal node through the service network 3 .

本實施方式中,所述控制節點1藉由電源控制網路4分別與所述主裸機節點及備用裸機節點通訊連接並控制所述主裸機節點開啟電源以使所述主裸機節點運行所述作業系統映射檔包括:所述控制節點1的Ironic conductor服務12藉由電源控制網路4與所述主裸機節點及備用裸機節點中的電源控制器22通訊連接,並控制所述主裸機節點中的電源控制器22啟動電源以使所述主裸機節點的agent服務21運行所述作業系統映射檔。在具體實施方 式中,所述控制節點1中的Ironic conductor服務12藉由智慧平臺管理介面(Intelligent PlatformManagement Interface,IPMI)命令控制所述主裸機節點中的電源控制器22啟動電源。 In this embodiment, the control node 1 communicates with the main bare metal node and the backup bare metal node through the power control network 4 respectively, and controls the main bare metal node to turn on the power to enable the main bare metal node Running the operating system map file includes: the Ironic conductor service 12 of the control node 1 communicates with the power supply controllers 22 in the primary bare metal node and the backup bare metal node through the power control network 4, and controls all The power supply controller 22 in the primary bare metal node starts the power supply so that the agent service 21 of the primary bare metal node runs the operating system mapping file. in the specific implementation In the formula, the Ironic conductor service 12 in the control node 1 controls the power controller 22 in the main bare metal node to start the power supply through an Intelligent Platform Management Interface (IPMI) command.

本實施方式中,所述藉由業務網路3與所述主裸機節點通訊連接包括:所述DHCP agent服務11藉由所述業務網路3與所述主裸機節點的agent服務21通訊連接。在具體實施方式中,在所述主裸機節點的電源啟動後,所述主裸機節點的agent服務21藉由所述業務網路3向所述DHCP agent服務11發送請求IP位址的第一請求信號,其中所述第一請求信號包括所述主裸機節點的Mac位址。所述DHCP agent服務11根據所述第一請求信號分配一目標IP位址給所述主裸機節點中的agent服務21,並記錄所述主裸機節點的Mac地址,及所述DHCP agent服務11藉由所述目標IP位址及所述主裸機節點的Mac地址實現與所述主裸機節點中的agent服務21通訊連接。 In this embodiment, the communication connection with the main bare metal node through the service network 3 includes: the DHCP agent service 11 communicates with the agent service 21 of the main bare metal node through the service network 3 connect. In a specific embodiment, after the power supply of the master bare metal node is started, the agent service 21 of the master bare metal node sends the first request for the IP address to the DHCP agent service 11 through the service network 3 a request signal, wherein the first request signal includes the Mac address of the primary bare metal node. The DHCP agent service 11 assigns a target IP address to the agent service 21 in the main bare metal node according to the first request signal, and records the Mac address of the main bare metal node, and the DHCP agent service 11. Realize the communication connection with the agent service 21 in the main bare metal node through the target IP address and the Mac address of the main bare metal node.

步驟S13,所述控制節點1接收所述主裸機節點發送的節點狀態資訊,並當未接收到所述主裸機節點發送的節點狀態資訊時確定所述主裸機節點工作異常。 Step S13, the control node 1 receives the node status information sent by the master bare metal node, and determines that the master bare metal node is abnormal when not receiving the node status information sent by the master bare metal node.

本實施方式中,所述主裸機節點的agent服務21藉由心跳機制回報節點狀態資訊給所述控制節點1。所述控制節點1的DHCP agent服務11接收所述主裸機節點的agent服務21發送的節點狀態資訊。當所述主裸機節點的作業系統映射檔運行出現故障或所述業務網路3斷網時,所述DHCP agent服務11接收不到所述主裸機節點發送的節點狀態資訊,並在確定出未接收到所述主裸機節點的agent服務21發送的節點狀態資訊時判定所述主裸機節點工作異常。 In this embodiment, the agent service 21 of the master bare metal node reports node status information to the control node 1 through a heartbeat mechanism. The DHCP agent service 11 of the control node 1 receives the node status information sent by the agent service 21 of the master bare metal node. When the operating system mapping file of the master bare metal node fails or the service network 3 is disconnected, the DHCP agent service 11 cannot receive the node status information sent by the master bare metal node, and determines when When the node status information sent by the agent service 21 of the master bare metal node is not received, it is determined that the master bare metal node is abnormal.

步驟S14,所述控制節點1當確定所述主裸機節點工作異常時控制關閉所述主裸機節點的電源,並啟動所述備用裸機節點的電源以使所述備用裸機節點運行所述作業系統映射檔。 Step S14, the control node 1 controls to turn off the power of the main bare metal node when it is determined that the main bare metal node works abnormally, and starts the power of the backup bare metal node so that the backup bare metal node runs all the functions. operating system mapping file.

本實施方式中,所述控制節點1當確定所述主裸機節點工作異常時控制關閉所述主裸機節點的電源包括:所述控制節點1藉由Ironic conductor服務12控制所述主裸機節點的電源控制器22關閉電源。在具體實施方式中,所述Ironic conductor服務12藉由IPMI命令控制所述主裸機節點的電源控制器22關閉電源。 In this embodiment, when the control node 1 determines that the master bare metal node is abnormally working, controlling the power off of the master bare metal node includes: the control node 1 controls the master bare metal node through the Ironic conductor service 12 The node's power controller 22 turns off the power. In a specific embodiment, the Ironic conductor service 12 controls the power controller 22 of the primary bare metal node to turn off the power through an IPMI command.

本實施方式中,所述方法在所述啟動所述備用裸機節點的電源以使所述備用裸機節點運行所述作業系統映射檔之後還包括:所述控制節點1藉由Ironic conductor服務12控制所述備用裸機節點的電源控制器22開啟電源,藉由所述DHCP agent服務11接收所述備用裸機節點的agent服務21發送的請求IP位址的第二請求信號並根據所述第二請求信號分配所述目標IP位址給所述備用裸機節點的agent服務21及記錄所述備用裸機節點的Mac地址以使得所述備用裸機節點的agent服務21藉由業務網路3與所述控制節點1的DHCP agent服務11通訊連接,其中,所述第二請求信號包括所述備用裸機節點的Mac位址。 In this embodiment, the method further includes: the control node 1 serves 12 through the Ironic conductor after the power supply of the standby bare metal node is activated to enable the standby bare metal node to run the operating system mapping file. Control the power supply controller 22 of the standby bare metal node to turn on the power supply, and receive the second request signal requesting an IP address sent by the agent service 21 of the standby bare metal node through the DHCP agent service 11 and according to the first request signal. Two request signals to assign the target IP address to the agent service 21 of the backup bare metal node and record the Mac address of the backup bare metal node so that the agent service 21 of the backup bare metal node can use the business network 3 It is connected in communication with the DHCP agent service 11 of the control node 1, wherein the second request signal includes the Mac address of the standby bare metal node.

本實施方式中,所述方法在所述啟動所述備用裸機節點的電源以使所述備用裸機節點運行所述作業系統映射檔之後還包括:所述控制節點1藉由所述Ironic conductor服務12將與所述控制節點1的DHCP agent服務11通訊連接的備用裸機節點設定為新的主裸機節點並選取另一個未使用的裸機節點為新的備用裸機節點,及將所述作業系統映射檔注入到所述新的備用裸機節點中。 In this embodiment, the method further includes: the control node 1 using the Ironic conductor after the power supply of the standby bare metal node is activated to enable the standby bare metal node to run the operating system mapping file. The service 12 sets the standby bare metal node communicating with the DHCP agent service 11 of the control node 1 as the new primary bare metal node and selects another unused bare metal node as the new standby bare metal node, and sets all the The operating system mapping file is injected into the new standby bare metal node.

本案中的控制節點1當確定主裸機節點工作異常時控制關閉所述主裸機節點的電源,並啟動備用裸機節點的電源以使所述備用裸機節點運行所述作業系統映射檔。從而解決在主裸機節點出現故障問題時將作業系統映射檔所包含服務在備用裸機節點上運行,從而恢復服務的執行。 In this case, the control node 1 controls to turn off the power of the primary bare metal node when it is determined that the primary bare metal node is abnormal, and turns on the power of the backup bare metal node so that the backup bare metal node runs the operating system mapping file. Therefore, when the primary bare metal node fails, the service included in the operating system mapping file is run on the standby bare metal node, thereby restoring the execution of the service.

實施例2 Example 2

圖3為本發明一實施方式中基於OpenStack的裸機高可用性的實現裝置40的結構圖。 FIG. 3 is a structural diagram of an apparatus 40 for implementing bare metal high availability based on OpenStack in an embodiment of the present invention.

在一些實施例中,所述基於OpenStack的裸機高可用性的實現裝置40運行於電子設備中。所述基於OpenStack的裸機高可用性的實現裝置40可以包括複數由程式碼段所組成的功能模組。所述基於OpenStack的裸機高可用性的實現裝置40中的各個程式段的程式碼可以存儲於記憶體中,並由至少一個處理器所執行。 In some embodiments, the apparatus 40 for implementing OpenStack-based bare metal high availability runs in an electronic device. The OpenStack-based bare metal high availability implementation device 40 may include a plurality of functional modules composed of program code segments. The program code of each program segment in the OpenStack-based bare metal high availability implementation device 40 can be stored in the memory and executed by at least one processor.

本實施例中,所述基於OpenStack的裸機高可用性的實現裝置40根據其所執行的功能,可以被劃分為複數功能模組。參考圖3所示,所述基於OpenStack的裸機高可用性的實現裝置40包括設置模組401、通訊模組402、狀態檢測模組403及控制模組404。本實施方式中,所述模組是指一種能夠被至少一個處理器所執行並且能夠完成固定功能的一系列電腦程式段,其存儲在記憶體中。所述在一些實施例中,關於各模組的功能將在後續的實施例中詳述。 In this embodiment, the apparatus 40 for realizing high availability of bare metal based on OpenStack may be divided into a plurality of functional modules according to the functions performed by the apparatus 40 . Referring to FIG. 3 , the apparatus 40 for realizing high availability of bare metal based on OpenStack includes a setting module 401 , a communication module 402 , a status detection module 403 and a control module 404 . In this embodiment, the module refers to a series of computer program segments that can be executed by at least one processor and can perform fixed functions, and are stored in a memory. In some embodiments, the functions of each module will be described in detail in subsequent embodiments.

所述設置模組401設定至少兩個裸機節點2中的一個裸機節點2為主裸機節點,及設定所述至少兩個裸機節點2中剩下的裸機節點2為備用裸機節點,其中,所述主裸機節點及備用裸機節點中注入有作業系統映射檔。 The setting module 401 sets one bare metal node 2 of the at least two bare metal nodes 2 as the primary bare metal node, and sets the remaining bare metal nodes 2 of the at least two bare metal nodes 2 as the standby bare metal node, wherein an operating system mapping file is injected into the primary bare metal node and the backup bare metal node.

本實施方式中,所述控制節點1包括DHCP agent服務11及Ironic conductor服務12。所述裸機節點2包括agent服務21及電源控制器22。本實施方式中,所述設置模組401控制Ironic conductor服務12從所述至少兩個裸機節點2中隨機選擇一個裸機節點2為主裸機節點,所述至少兩個裸機節點2中剩下的一個或複數裸機節點2為備用裸機節點。所述作業系統映射檔被分別注入到主裸機節點及備用裸機節點的agent服務21中。本實施方式中,所述作業系統映射檔中包含待執行的服務。本實施方式中,所述作業系統映射檔包括圖像檔檔、應用程式檔案及或作業系統檔。 In this embodiment, the control node 1 includes a DHCP agent service 11 and an Ironic conductor service 12 . The bare metal node 2 includes an agent service 21 and a power controller 22 . In this embodiment, the setting module 401 controls the Ironic conductor service 12 to randomly select one bare metal node 2 from the at least two bare metal nodes 2 as the primary bare metal node, and among the at least two bare metal nodes 2 The remaining one or more bare metal nodes 2 are spare bare metal nodes. The operating system mapping files are respectively injected into the agent services 21 of the primary bare metal node and the backup bare metal node. In this implementation manner, the operating system mapping file includes services to be executed. In this embodiment, the operating system mapping file includes an image file, an application program file and/or an operating system file.

所述通訊模組402控制所述控制節點1藉由電源控制網路4分別與所述主裸機節點及備用裸機節點通訊連接並控制所述主裸機節點開啟電源 以使所述主裸機節點運行所述作業系統映射檔,及藉由業務網路3與所述主裸機節點通訊連接。 The communication module 402 controls the control node 1 to communicate with the main bare metal node and the backup bare metal node through the power control network 4 respectively, and controls the main bare metal node to turn on the power In order to make the main bare metal node run the operating system mapping file, and communicate with the main bare metal node through the service network 3 .

本實施方式中,所述通訊模組402控制所述控制節點1的Ironic conductor服務12藉由電源控制網路4與所述主裸機節點及備用裸機節點中的電源控制器22通訊連接,並控制所述主裸機節點中的電源控制器22啟動電源以使所述主裸機節點的agent服務21運行所述作業系統映射檔。在具體實施方式中,所述通訊模組402控制所述控制節點1中的Ironic conductor服務12藉由智慧平臺管理介面(Intelligent Platform Management Interface,IPMI)命令控制所述主裸機節點中的電源控制器22啟動電源。 In this embodiment, the communication module 402 controls the Ironic conductor service 12 of the control node 1 to communicate with the power controller 22 in the primary bare metal node and the backup bare metal node through the power control network 4 , And control the power supply controller 22 in the main bare metal node to start the power supply so that the agent service 21 of the main bare metal node runs the operating system mapping file. In a specific embodiment, the communication module 402 controls the Ironic conductor service 12 in the control node 1 to control the power control in the master bare metal node through Intelligent Platform Management Interface (IPMI) commands The device 22 starts the power supply.

本實施方式中,所述通訊模組402控制所述DHCP agent服務11藉由所述業務網路3與所述主裸機節點的agent服務21通訊連接。在具體實施方式中,在所述主裸機節點的電源啟動後,所述主裸機節點的agent服務21藉由所述業務網路3向所述DHCP agent服務11發送請求IP位址的第一請求信號,其中所述第一請求信號包括所述主裸機節點的Mac位址。所述通訊模組402控制DHCP agent服務11根據所述第一請求信號分配一目標IP位址給所述主裸機節點中的agent服務21,並記錄所述主裸機節點的Mac地址,及所述DHCP agent服務11藉由所述目標IP位址及所述主裸機節點的Mac地址實現與所述主裸機節點中的agent服務21通訊連接。 In this embodiment, the communication module 402 controls the DHCP agent service 11 to communicate with the agent service 21 of the master bare metal node through the service network 3 . In a specific embodiment, after the power supply of the master bare metal node is started, the agent service 21 of the master bare metal node sends the first request for the IP address to the DHCP agent service 11 through the service network 3 a request signal, wherein the first request signal includes the Mac address of the primary bare metal node. The communication module 402 controls the DHCP agent service 11 to assign a target IP address to the agent service 21 in the master bare metal node according to the first request signal, and records the Mac address of the master bare metal node, and The DHCP agent service 11 realizes the communication connection with the agent service 21 in the main bare metal node through the target IP address and the Mac address of the main bare metal node.

所述狀態檢測模組403控制控制節點1接收所述主裸機節點發送的節點狀態資訊,並當未接收到所述主裸機節點發送的節點狀態資訊時確定所述主裸機節點工作異常。 The state detection module 403 controls the control node 1 to receive the node state information sent by the master bare metal node, and determines that the master bare metal node is abnormal when the node state information sent by the master bare metal node is not received. .

本實施方式中,所述主裸機節點的agent服務21藉由心跳機制回報節點狀態資訊給所述控制節點1。所述控制節點1的DHCP agent服務11接收所述主裸機節點的agent服務21發送的節點狀態資訊。當所述主裸機節點的作業系統映射檔運行出現故障或所述業務網路3斷網時,所述DHCP agent服務11接收不到所述主裸機節點發送的節點狀態資訊,所述狀態檢測模組403在確 定出所述DHCP agent服務11未接收到所述主裸機節點的agent服務21發送的節點狀態資訊時判定所述主裸機節點工作異常。 In this embodiment, the agent service 21 of the master bare metal node reports node status information to the control node 1 through a heartbeat mechanism. The DHCP agent service 11 of the control node 1 receives the node status information sent by the agent service 21 of the master bare metal node. When the operating system mapping file of the master bare metal node fails or the service network 3 is disconnected, the DHCP agent service 11 cannot receive the node status information sent by the master bare metal node. The detection module 403 is correct When it is determined that the DHCP agent service 11 has not received the node status information sent by the agent service 21 of the master bare metal node, it is determined that the master bare metal node is working abnormally.

所述控制模組404當確定所述主裸機節點工作異常時控制關閉所述主裸機節點的電源,並啟動所述備用裸機節點的電源以使所述備用裸機節點運行所述作業系統映射檔。 The control module 404 controls to turn off the power of the primary bare-metal node when it is determined that the primary bare-metal node is abnormal, and starts the power of the backup bare-metal node to make the backup bare-metal node run the job System map file.

本實施方式中,所述控制模組404控制所述控制節點1藉由Ironic conductor服務12控制所述主裸機節點的電源控制器22關閉電源。在具體實施方式中,所述Ironic conductor服務12藉由IPMI命令控制所述主裸機節點的電源控制器22關閉電源。 In this embodiment, the control module 404 controls the control node 1 to control the power controller 22 of the main bare metal node to turn off the power through the Ironic conductor service 12 . In a specific embodiment, the Ironic conductor service 12 controls the power controller 22 of the primary bare metal node to turn off the power through an IPMI command.

本實施方式中,所述控制模組404還用於控制所述控制節點1藉由Ironic conductor服務12控制所述備用裸機節點的電源控制器22開啟電源,藉由所述DHCP agent服務11接收所述備用裸機節點的agent服務21發送的請求IP位址的第二請求信號並根據所述第二請求信號分配所述目標IP位址給所述備用裸機節點的agent服務21及記錄所述備用裸機節點的Mac地址以使得所述備用裸機節點的agent服務21藉由業務網路3與所述控制節點1的DHCP agent服務11通訊連接,其中,所述第二請求信號包括所述備用裸機節點的Mac位址。 In this embodiment, the control module 404 is further configured to control the control node 1 to control the power supply controller 22 of the standby bare metal node to turn on the power through the Ironic conductor service 12 , and receive the power through the DHCP agent service 11 . The second request signal of the request IP address sent by the agent service 21 of the standby bare metal node and the target IP address is allocated to the agent service 21 of the standby bare metal node according to the second request signal. The Mac address of the standby bare metal node so that the agent service 21 of the standby bare metal node communicates with the DHCP agent service 11 of the control node 1 through the service network 3, wherein the second request signal includes all The Mac address of the standby bare metal node.

本實施方式中,所述控制模組404還用於控制所述控制節點1藉由所述Ironic conductor服務12將與所述控制節點1的DHCP agent服務11通訊連接的備用裸機節點設定為新的主裸機節點並選取另一個未使用的裸機節點為新的備用裸機節點,及將所述作業系統映射檔注入到所述新的備用裸機節點中。 In this embodiment, the control module 404 is further configured to control the control node 1 to set the standby bare metal node that communicates with the DHCP agent service 11 of the control node 1 as a new one through the Ironic conductor service 12 and select another unused bare metal node as a new backup bare metal node, and inject the operating system mapping file into the new backup bare metal node.

本案中的控制節點1當確定主裸機節點工作異常時控制關閉所述主裸機節點的電源,並啟動備用裸機節點的電源以使所述備用裸機節點運行所述作業系統映射檔。從而解決在主裸機節點出現故障問題時將作業系統映射檔所包含服務在備用裸機節點上運行,從而恢復服務的執行。 In this case, the control node 1 controls to turn off the power of the primary bare metal node when it is determined that the primary bare metal node is abnormal, and turns on the power of the backup bare metal node so that the backup bare metal node runs the operating system mapping file. Therefore, when the primary bare metal node fails, the service included in the operating system mapping file is run on the standby bare metal node, thereby restoring the execution of the service.

實施例3 Example 3

圖4為本發明一實施方式中電子設備5的示意圖。 FIG. 4 is a schematic diagram of an electronic device 5 in an embodiment of the present invention.

所述電子設備5包括記憶體51、處理器52以及存儲在所述記憶體51中並可在所述處理器52上運行的電腦程式53。所述處理器52執行所述電腦程式53時實現上述基於OpenStack的裸機高可用性的實現方法實施例中的步驟,例如圖1所示的步驟S11~S14。或者,所述處理器52執行所述電腦程式53時實現上述基於OpenStack的裸機高可用性的實現裝置實施例中各模組/單元的功能,例如圖3中的模組401~404。 The electronic device 5 includes a memory 51 , a processor 52 and a computer program 53 stored in the memory 51 and executable on the processor 52 . When the processor 52 executes the computer program 53 , the steps in the above-mentioned embodiments of the method for implementing bare metal high availability based on OpenStack are implemented, for example, steps S11 to S14 shown in FIG. 1 . Alternatively, when the processor 52 executes the computer program 53, the functions of each module/unit in the above-mentioned OpenStack-based bare metal high availability implementation apparatus embodiment, such as modules 401-404 in FIG. 3, are realized.

示例性的,所述電腦程式53可以被分割成一個或複數模組/單元,所述一個或者複數模組/單元被存儲在所述記憶體51中,並由所述處理器52執行,以完成本發明。所述一個或複數模組/單元可以是能夠完成特定功能的一系列電腦程式指令段,所述指令段用於描述所述電腦程式53在所述電子設備5中的執行過程。例如,所述電腦程式53可以被分割成圖3中的設置模組401、通訊模組402、狀態檢測模組403及控制模組404,各模組具體功能參見實施例2。 Exemplarily, the computer program 53 can be divided into one or more modules/units, and the one or more modules/units are stored in the memory 51 and executed by the processor 52 to The present invention has been completed. The one or more modules/units may be a series of computer program instruction segments capable of accomplishing specific functions, and the instruction segments are used to describe the execution process of the computer program 53 in the electronic device 5 . For example, the computer program 53 can be divided into a setting module 401, a communication module 402, a state detection module 403, and a control module 404 in FIG.

本實施方式中,所述電子設備5與控制節點1是同一裝置。例如,所述電子設備5還可以是桌上型電腦、筆記本、掌上型電腦及雲端終端裝置等計算設備。本領域技術人員可以理解,所述示意圖僅僅是電子設備5的示例,並不構成對電子設備5的限定,可以包括比圖示更多或更少的部件,或者組合某些部件,或者不同的部件,例如所述電子設備5還可以包括輸入輸出設備、網路接入設備、匯流排等。 In this embodiment, the electronic device 5 and the control node 1 are the same device. For example, the electronic device 5 may also be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud terminal device. Those skilled in the art can understand that the schematic diagram is only an example of the electronic device 5, and does not constitute a limitation to the electronic device 5, and may include more or less components than the one shown, or combine some components, or different Components such as the electronic device 5 may also include input and output devices, network access devices, bus bars, and the like.

所稱處理器52可以是中央處理模組(Central Processing Unit,CPU),還可以是其他通用處理器、數位訊號處理器(Digital Signal Processor,DSP)、專用積體電路(Application Specific Integrated Circuit,ASIC)、現場可程式設計閘陣列(Field-Programmable Gate Array,FPGA)或者其他可程式設計邏輯器件、分立門或者電晶體邏輯器件、分立硬體元件等。通用處理器可以是微處理器或者所 述處理器52也可以是任何常規的處理器等,所述處理器52是所述電子設備5的控制中心,利用各種介面和線路連接整個電子設備5的各個部分。 The processor 52 may be a central processing unit (CPU), other general-purpose processors, a digital signal processor (DSP), or an application specific integrated circuit (ASIC). ), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any The processor 52 can also be any conventional processor, etc. The processor 52 is the control center of the electronic device 5 , and uses various interfaces and lines to connect various parts of the entire electronic device 5 .

所述記憶體51可用於存儲所述電腦程式53和/或模組/單元,所述處理器52藉由運行或執行存儲在所述記憶體51內的電腦程式和/或模組/單元,以及調用存儲在記憶體51內的資料,實現所述電子設備5的各種功能。所述記憶體51可主要包括存儲程式區和存儲資料區,其中,存儲程式區可存儲作業系統、至少一個功能所需的應用程式(比如聲音播放功能、圖像播放功能等)等;存儲資料區可存儲根據電子設備5的使用所創建的資料(比如音訊資料、電話本等)等。此外,記憶體51可以包括高速隨機存取記憶體,還可以包括非易失性記憶體,例如硬碟、記憶體、插接式硬碟,智慧存儲卡(Smart Media Card,SMC),安全數位(Secure Digital,SD)卡,快閃記憶體卡(Flash Card)、至少一個磁碟記憶體件、快閃記憶體器件、或其他易失性固態記憶體件。 The memory 51 can be used to store the computer programs 53 and/or modules/units, and the processor 52 runs or executes the computer programs and/or modules/units stored in the memory 51, And call the data stored in the memory 51 to realize various functions of the electronic device 5 . The memory 51 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; storage data The area may store data (such as audio data, phone book, etc.) created according to the use of the electronic device 5, and the like. In addition, the memory 51 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, Smart Media Card (SMC), Secure Digital (Secure Digital, SD) card, flash memory card (Flash Card), at least one disk memory device, flash memory device, or other volatile solid state memory device.

所述電子設備5集成的模組/單元如果以軟體功能模組的形式實現並作為獨立的產品銷售或使用時,可以存儲在一個電腦可讀取存儲介質中。基於這樣的理解,本發明實現上述實施例方法中的全部或部分流程,也可以藉由電腦程式來指令相關的硬體來完成,所述的電腦程式可存儲於一電腦可讀存儲介質中,所述電腦程式在被處理器執行時,可實現上述各個方法實施例的步驟。其中,所述電腦程式包括電腦程式代碼,所述電腦程式代碼可以為原始程式碼形式、物件代碼形式、可執行檔或某些中間形式等。所述電腦可讀介質可以包括:能夠攜帶所述電腦程式代碼的任何實體或裝置、記錄介質、U盤、移動硬碟、磁碟、光碟、電腦記憶體、唯讀記憶體(ROM,Read-Only Memory)、隨機存取記憶體(RAM,Random Access Memory)、電載波信號、電信信號以及軟體分發介質等。需要說明的是,所述電腦可讀介質包含的內容可以根據司法管轄區內立法和專利實踐的要求進行適當的增減,例如在某些司法管轄區,根據立法和專利實踐,電腦可讀介質不包括電載波信號和電信信號。 If the modules/units integrated in the electronic device 5 are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the present invention realizes all or part of the processes in the methods of the above embodiments, and can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, When the computer program is executed by the processor, the steps of the above method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in the form of original code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, removable hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-only memory) Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium Electric carrier signals and telecommunication signals are not included.

在本發明所提供的幾個實施例中,應該理解到,所揭露的電子設備和方法,可以藉由其它的方式實現。例如,以上所描述的電子設備實施例僅僅是示意性的,例如,所述模組的劃分,僅僅為一種邏輯功能劃分,實際實現時可以有另外的劃分方式。 In the several embodiments provided by the present invention, it should be understood that the disclosed electronic devices and methods may be implemented in other manners. For example, the above-described electronic device embodiments are only illustrative. For example, the division of the modules is only a logical function division, and other division methods may be used in actual implementation.

另外,在本發明各個實施例中的各功能模組可以集成在相同處理模組中,也可以是各個模組單獨物理存在,也可以兩個或兩個以上模組集成在相同模組中。上述集成的模組既可以採用硬體的形式實現,也可以採用硬體加軟體功能模組的形式實現。 In addition, each functional module in each embodiment of the present invention may be integrated in the same processing module, or each module may exist physically alone, or two or more modules may be integrated in the same module. The above-mentioned integrated modules can be implemented in the form of hardware, or can be implemented in the form of hardware plus software function modules.

對於本領域技術人員而言,顯然本發明不限於上述示範性實施例的細節,而且在不背離本發明的精神或基本特徵的情況下,能夠以其他的具體形式實現本發明。因此,無論從哪一點來看,均應將實施例看作是示範性的,而且是非限制性的,本發明的範圍由所附權利要求而不是上述說明限定,因此旨在將落在權利要求的等同要件的含義和範圍內的所有變化涵括在本發明內。不應將權利要求中的任何附圖標記視為限制所涉及的權利要求。此外,顯然“包括”一詞不排除其他模組或步驟,單數不排除複數。電子設備權利要求中陳述的複數模組或電子設備也可以由同一個模組或電子設備藉由軟體或者硬體來實現。第一,第二等詞語用來表示名稱,而並不表示任何特定的順序。 It will be apparent to those skilled in the art that the present invention is not limited to the details of the above-described exemplary embodiments, but that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments are to be regarded in all respects as illustrative and not restrictive, and the scope of the invention is to be defined by the appended claims rather than the foregoing description, which are therefore intended to fall within the scope of the claims. All changes within the meaning and range of the equivalents of , are included in the present invention. Any reference signs in the claims shall not be construed as limiting the involved claim. Furthermore, it is clear that the word "comprising" does not exclude other modules or steps, and the singular does not exclude the plural. The plural modules or electronic devices recited in the electronic device claims can also be realized by software or hardware by one and the same module or electronic device. The terms first, second, etc. are used to denote names and do not denote any particular order.

S11-S14:步驟 S11-S14: Steps

Claims (8)

一種基於OpenStack的裸機高可用性的實現方法,其改良在於,所述方法包括:控制節點設定至少兩個裸機節點中的一個裸機節點為主裸機節點,及設定所述至少兩個裸機節點中剩下的裸機節點為備用裸機節點,其中,所述主裸機節點及備用裸機節點中注入有作業系統映射檔;所述控制節點藉由電源控制網路分別與所述主裸機節點及備用裸機節點通訊連接並控制所述主裸機節點開啟電源以使所述主裸機節點運行所述作業系統映射檔,及藉由業務網路與所述主裸機節點通訊連接;所述控制節點接收所述主裸機節點發送的節點狀態資訊,並當未接收到所述主裸機節點發送的節點狀態資訊時確定所述主裸機節點工作異常;及所述控制節點當確定所述主裸機節點工作異常時控制關閉所述主裸機節點的電源,並啟動所述備用裸機節點的電源以使所述備用裸機節點運行所述作業系統映射檔,其中,所述控制節點包括DHCP agent服務及Ironic conductor服務,所述裸機節點包括agent服務及電源控制器;所述控制節點藉由所述Ironic conductor服務控制所述備用裸機節點的所述電源控制器開啟電源;並藉由所述DHCP agent服務接收所述備用裸機節點的所述agent服務發送的請求IP位址的第二請求信號並根據所述第二請求信號分配目標IP位址給所述備用裸機節點的agent服務及記錄所述備用裸機節點的Mac地址以使得所述備用裸機節點的agent服務藉由所述業務網路與所述控制節點的所述DHCP agent服務通訊連接,其中,所述第二請求信號包括所述備用裸機節點的Mac位址。 A method for realizing high availability of bare metal based on OpenStack, the improvement is that the method includes: a control node sets one bare metal node among at least two bare metal nodes as a master bare metal node, and sets the at least two bare metal nodes The remaining bare metal nodes in the metal nodes are backup bare metal nodes, wherein the main bare metal node and the backup bare metal node are injected with operating system mapping files; the control node is respectively connected to the The primary bare metal node and the backup bare metal node are communicated and connected, and the primary bare metal node is controlled to be powered on, so that the primary bare metal node runs the operating system mapping file, and communicates with the primary bare metal node through a service network a communication connection; the control node receives the node state information sent by the master bare metal node, and determines that the master bare metal node is abnormal when not receiving the node state information sent by the master bare metal node; and the When it is determined that the primary bare metal node is abnormal, the control node controls to turn off the power of the primary bare metal node, and starts the power of the backup bare metal node so that the backup bare metal node runs the operating system mapping file, Wherein, the control node includes a DHCP agent service and an Ironic conductor service, the bare metal node includes an agent service and a power controller; the control node controls the power supply of the backup bare metal node through the Ironic conductor service The controller turns on the power supply; and receives a second request signal requesting an IP address sent by the agent service of the standby bare metal node through the DHCP agent service, and assigns a target IP address to a target IP address according to the second request signal The agent service of the standby bare metal node and recording the Mac address of the standby bare metal node so that the agent service of the standby bare metal node communicates with the DHCP agent service of the control node through the business network connection, wherein the second request signal includes the Mac address of the standby bare metal node. 如請求項1所述的基於OpenStack的裸機高可用性的實現方法,其中,所述控制節點藉由電源控制網路分別與所述主裸機節點及備用裸機節點通訊連接並控制所述主裸機節點開啟電源以使所述主裸機節點運行所述作業系統映射檔包括: 所述Ironic conductor服務藉由所述電源控制網路與所述主裸機節點及所述備用裸機節點中的電源控制器通訊連接,並控制所述主裸機節點中的電源控制器啟動電源以使所述主裸機節點的所述agent服務運行所述作業系統映射檔。 The method for realizing high availability of bare metal based on OpenStack according to claim 1, wherein the control node communicates with the primary bare metal node and the backup bare metal node through a power control network, and controls the primary bare metal node. Powering on the bare metal node to cause the primary bare metal node to run the operating system mapping file includes: The Ironic conductor service communicates with the power controllers in the primary bare metal node and the backup bare metal node through the power control network, and controls the power controllers in the primary bare metal node to activate power The operating system mapping file is executed by the agent service of the main bare metal node. 如請求項1所述的基於OpenStack的裸機高可用性的實現方法,其中,所述藉由業務網路與所述主裸機節點通訊連接包括:所述DHCP agent服務藉由所述業務網路與所述主裸機節點的所述agent服務通訊連接。 The method for realizing high availability of bare metal based on OpenStack according to claim 1, wherein the communicating and connecting with the master bare metal node through a service network comprises: the DHCP agent service is provided through the service network Communication connection with the agent service of the main bare metal node. 如請求項3所述的基於OpenStack的裸機高可用性的實現方法,其中,所述DHCP agent服務藉由所述業務網路與所述主裸機節點的所述agent服務通訊連接包括:所述DHCP agent服務根據所述主裸機節點的agent服務發送的第一請求信號分配一目標IP位址給所述主裸機節點中的agent服務,並記錄所述主裸機節點的Mac地址,及所述DHCP agent服務藉由所述目標IP位址及所述主裸機節點的Mac地址實現與所述主裸機節點中的agent服務通訊連接,其中所述第一請求信號包括所述主裸機節點的Mac位址。 The method for realizing high availability of bare metal based on OpenStack according to claim 3, wherein the communication connection between the DHCP agent service and the agent service of the master bare metal node through the service network includes: the The DHCP agent service allocates a target IP address to the agent service in the main bare metal node according to the first request signal sent by the agent service of the main bare metal node, and records the Mac address of the main bare metal node, and The DHCP agent service realizes the communication connection with the agent service in the main bare metal node through the target IP address and the Mac address of the main bare metal node, wherein the first request signal includes the main bare metal node. The Mac address of the machine node. 如請求項1所述的基於OpenStack的裸機高可用性的實現方法,其中,在所述啟動所述備用裸機節點的電源以使所述備用裸機節點運行所述作業系統映射檔之後還包括:所述控制節點藉由所述Ironic conductor服務將與所述DHCP agent服務通訊連接的備用裸機節點設定為新的主裸機節點並選取另一個未使用的裸機節點為新的備用裸機節點,及將所述作業系統映射檔注入到所述新的備用裸機節點中。 The method for implementing OpenStack-based bare metal high availability according to claim 1, wherein after starting the power supply of the backup bare metal node so that the backup bare metal node runs the operating system mapping file, further comprising: : The control node uses the Ironic conductor service to set the standby bare metal node that communicates with the DHCP agent service as a new primary bare metal node and selects another unused bare metal node as a new backup bare metal node node, and inject the operating system map file into the new standby bare metal node. 如請求項1所述的基於OpenStack的裸機高可用性的實現方法,其中,所述作業系統映射檔包括圖像檔、應用程式檔案及或作業系統檔。 The method for implementing OpenStack-based bare metal high availability according to claim 1, wherein the operating system mapping file includes an image file, an application program file and/or an operating system file. 一種基於OpenStack的裸機高可用性的實現裝置,其改良在於,所述裝置包括: 設置模組,設定至少兩個裸機節點中的一個裸機節點為主裸機節點,及設定所述至少兩個裸機節點中剩下的裸機節點為備用裸機節點,其中,所述主裸機節點及備用裸機節點中注入有作業系統映射檔;通訊模組,控制控制節點藉由電源控制網路分別與所述主裸機節點及備用裸機節點通訊連接並控制所述主裸機節點開啟電源以使所述主裸機節點運行所述作業系統映射檔,及藉由業務網路與所述主裸機節點通訊連接;狀態檢測模組,控制所述控制節點接收所述主裸機節點發送的節點狀態資訊,並當未接收到所述主裸機節點發送的節點狀態資訊時確定所述主裸機節點工作異常;及控制模組,當確定所述主裸機節點工作異常時控制關閉所述主裸機節點的電源,並啟動所述備用裸機節點的電源以使所述備用裸機節點運行所述作業系統映射檔,其中,所述控制節點包括DHCP agent服務及Ironic conductor服務,所述裸機節點包括agent服務及電源控制器;所述控制節點藉由所述Ironic conductor服務控制所述備用裸機節點的所述電源控制器開啟電源;並藉由所述DHCP agent服務接收所述備用裸機節點的所述agent服務發送的請求IP位址的第二請求信號並根據所述第二請求信號分配目標IP位址給所述備用裸機節點的agent服務及記錄所述備用裸機節點的Mac地址以使得所述備用裸機節點的agent服務藉由所述業務網路與所述控制節點的所述DHCP agent服務通訊連接,其中,所述第二請求信號包括所述備用裸機節點的Mac位址。 A device for realizing high availability of bare metal based on OpenStack, the improvement is that the device includes: Setting a module, setting one of the at least two bare metal nodes as the primary bare metal node, and setting the remaining bare metal nodes among the at least two bare metal nodes as the standby bare metal nodes, wherein the An operating system mapping file is injected into the primary bare metal node and the backup bare metal node; the communication module, the control node communicates with the primary bare metal node and the backup bare metal node through a power control network, and controls the primary bare metal node. The bare metal node is powered on so that the main bare metal node runs the operating system mapping file, and communicates with the main bare metal node through a service network; a state detection module controls the control node to receive the node status information sent by the master bare metal node, and when the node status information sent by the master bare metal node is not received, determine that the master bare metal node is working abnormally; and a control module, when it is determined that the master bare metal node When the work is abnormal, control to turn off the power of the main bare metal node, and start the power of the backup bare metal node to make the backup bare metal node run the operating system mapping file, wherein the control node includes a DHCP agent service and Ironic conductor service, the bare metal node includes an agent service and a power controller; the control node controls the power controller of the standby bare metal node to turn on the power through the Ironic conductor service; The DHCP agent service receives a second request signal requesting an IP address sent by the agent service of the standby bare metal node, and assigns a target IP address to the agent service of the standby bare metal node according to the second request signal and Recording the Mac address of the standby bare metal node so that the agent service of the standby bare metal node communicates with the DHCP agent service of the control node through the service network, wherein the second request signal Include the Mac address of the spare bare metal node. 一種電子設備,其改良在於,所述電子設備包括處理器及記憶體,所述處理器用於執行所述記憶體中存儲的電腦程式時實現如請求項1至6中任一項所述基於OpenStack的裸機高可用性的實現方法。 An electronic device, which is improved in that the electronic device includes a processor and a memory, and the processor is used to implement the OpenStack-based system according to any one of claim 1 to 6 when executing a computer program stored in the memory. The realization method of bare metal high availability.
TW109118358A 2020-06-01 2020-06-01 An implementation method, a device for high availability based on openstack, and an electronic device TWI764160B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109118358A TWI764160B (en) 2020-06-01 2020-06-01 An implementation method, a device for high availability based on openstack, and an electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109118358A TWI764160B (en) 2020-06-01 2020-06-01 An implementation method, a device for high availability based on openstack, and an electronic device

Publications (2)

Publication Number Publication Date
TW202147106A TW202147106A (en) 2021-12-16
TWI764160B true TWI764160B (en) 2022-05-11

Family

ID=80783991

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109118358A TWI764160B (en) 2020-06-01 2020-06-01 An implementation method, a device for high availability based on openstack, and an electronic device

Country Status (1)

Country Link
TW (1) TWI764160B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775953A (en) * 2016-12-30 2017-05-31 北京中电普华信息技术有限公司 Realize the method and system of OpenStack High Availabitities
TWI625949B (en) * 2016-06-06 2018-06-01 Chunghwa Telecom Co Ltd Control system for controlling virtual overlay network through controller to generate tenant virtual network and control method thereof
CN108132829A (en) * 2018-01-11 2018-06-08 郑州云海信息技术有限公司 A kind of high available virtual machine realization method and system based on OpenStack
CN109684032A (en) * 2018-12-04 2019-04-26 武汉烽火信息集成技术有限公司 The OpenStack virtual machine High Availabitity calculate node device and management method of anti-fissure

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI625949B (en) * 2016-06-06 2018-06-01 Chunghwa Telecom Co Ltd Control system for controlling virtual overlay network through controller to generate tenant virtual network and control method thereof
CN106775953A (en) * 2016-12-30 2017-05-31 北京中电普华信息技术有限公司 Realize the method and system of OpenStack High Availabitities
CN108132829A (en) * 2018-01-11 2018-06-08 郑州云海信息技术有限公司 A kind of high available virtual machine realization method and system based on OpenStack
CN109684032A (en) * 2018-12-04 2019-04-26 武汉烽火信息集成技术有限公司 The OpenStack virtual machine High Availabitity calculate node device and management method of anti-fissure

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
C. G. Kominos, N. Seyvet and K. Vandikas, "Bare-metal, virtual machines and containers in OpenStack," 2017 20th Conference on Innovations in Clouds, Internet and Networks (ICIN), 2017, pp. 36-43, doi: 10.1109/ICIN.2017.7899247. 7-9 March 2017 *

Also Published As

Publication number Publication date
TW202147106A (en) 2021-12-16

Similar Documents

Publication Publication Date Title
US10298675B2 (en) Dynamic migration within a network storage system
WO2022078345A1 (en) Method for data interaction between multiple devices, and related device
CN113872807A (en) Intelligent role selection for dual role devices
AU2011282757A1 (en) Setup and configuration of a network storage system
WO2021139224A1 (en) Method and apparatus for file backup in cloud scenario, and medium and electronic device
WO2018192478A1 (en) Cloud management platform, virtual machine management method, system thereof
CN109800261B (en) Dynamic control method and device for double-database connection pool and related equipment
TWI795565B (en) Resource sharing method, device, computer device and storage media
CN111585887A (en) Communication method and device based on multiple networks, electronic equipment and storage medium
CN110716945A (en) Data updating method, data updating system, server and storage medium
CN113467873A (en) Virtual machine scheduling method and device, electronic equipment and storage medium
CN113630443A (en) Service management method, device, server and medium
US11388274B2 (en) Method for implementing high availability of bare metal node based on OpenStack and electronic device using the same
CN109857596B (en) Time consistency backup method, equipment, system, device and storage medium
WO2020252724A1 (en) Log processing method and device, and computer-readable storage medium
CN111586140A (en) Data interaction method and server
TWI764160B (en) An implementation method, a device for high availability based on openstack, and an electronic device
CN113094125A (en) Business process processing method, device, server and storage medium
WO2020119608A1 (en) Spark shuffle-based remote direct memory access system and method
WO2023000672A1 (en) Network switching method and apparatus, electronic device, and storage medium
WO2022133827A1 (en) Method and apparatus for processing task processing request, and blockchain node device
CN114157663A (en) Cloud data access method and cloud server
CN111078407B (en) Memory management method and device, storage medium and electronic equipment
CN110096366B (en) Configuration method and device of heterogeneous memory system and server
US10117178B2 (en) Simultaneous power control among multiple devices per context