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 deviceInfo
- 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
Links
Images
Landscapes
- Power Sources (AREA)
- Hardware Redundancy (AREA)
Abstract
Description
本發明涉及雲計算技術領域,具體涉及一種基於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
參考圖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
本實施方式中,所述控制節點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
步驟S12,所述控制節點1藉由電源控制網路4分別與所述主裸機節點及備用裸機節點通訊連接並控制所述主裸機節點開啟電源以使所述主裸機節點運行所述作業系統映射檔,及藉由業務網路3與所述主裸機節點通訊連接。
Step S12, the
本實施方式中,所述控制節點1藉由電源控制網路4分別與所述主裸機節點及備用裸機節點通訊連接並控制所述主裸機節點開啟電源以使所述主裸機節點運行所述作業系統映射檔包括:所述控制節點1的Ironic conductor服務12藉由電源控制網路4與所述主裸機節點及備用裸機節點中的電源控制器22通訊連接,並控制所述主裸機節點中的電源控制器22啟動電源以使所述主裸機節點的agent服務21運行所述作業系統映射檔。在具體實施方
式中,所述控制節點1中的Ironic conductor服務12藉由智慧平臺管理介面(Intelligent PlatformManagement Interface,IPMI)命令控制所述主裸機節點中的電源控制器22啟動電源。
In this embodiment, the
本實施方式中,所述藉由業務網路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
步驟S13,所述控制節點1接收所述主裸機節點發送的節點狀態資訊,並當未接收到所述主裸機節點發送的節點狀態資訊時確定所述主裸機節點工作異常。
Step S13, the
本實施方式中,所述主裸機節點的agent服務21藉由心跳機制回報節點狀態資訊給所述控制節點1。所述控制節點1的DHCP agent服務11接收所述主裸機節點的agent服務21發送的節點狀態資訊。當所述主裸機節點的作業系統映射檔運行出現故障或所述業務網路3斷網時,所述DHCP agent服務11接收不到所述主裸機節點發送的節點狀態資訊,並在確定出未接收到所述主裸機節點的agent服務21發送的節點狀態資訊時判定所述主裸機節點工作異常。
In this embodiment, the
步驟S14,所述控制節點1當確定所述主裸機節點工作異常時控制關閉所述主裸機節點的電源,並啟動所述備用裸機節點的電源以使所述備用裸機節點運行所述作業系統映射檔。
Step S14, the
本實施方式中,所述控制節點1當確定所述主裸機節點工作異常時控制關閉所述主裸機節點的電源包括:所述控制節點1藉由Ironic conductor服務12控制所述主裸機節點的電源控制器22關閉電源。在具體實施方式中,所述Ironic conductor服務12藉由IPMI命令控制所述主裸機節點的電源控制器22關閉電源。
In this embodiment, when the
本實施方式中,所述方法在所述啟動所述備用裸機節點的電源以使所述備用裸機節點運行所述作業系統映射檔之後還包括:所述控制節點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
本實施方式中,所述方法在所述啟動所述備用裸機節點的電源以使所述備用裸機節點運行所述作業系統映射檔之後還包括:所述控制節點1藉由所述Ironic conductor服務12將與所述控制節點1的DHCP agent服務11通訊連接的備用裸機節點設定為新的主裸機節點並選取另一個未使用的裸機節點為新的備用裸機節點,及將所述作業系統映射檔注入到所述新的備用裸機節點中。
In this embodiment, the method further includes: the
本案中的控制節點1當確定主裸機節點工作異常時控制關閉所述主裸機節點的電源,並啟動備用裸機節點的電源以使所述備用裸機節點運行所述作業系統映射檔。從而解決在主裸機節點出現故障問題時將作業系統映射檔所包含服務在備用裸機節點上運行,從而恢復服務的執行。
In this case, the
實施例2 Example 2
圖3為本發明一實施方式中基於OpenStack的裸機高可用性的實現裝置40的結構圖。
FIG. 3 is a structural diagram of an
在一些實施例中,所述基於OpenStack的裸機高可用性的實現裝置40運行於電子設備中。所述基於OpenStack的裸機高可用性的實現裝置40可以包括複數由程式碼段所組成的功能模組。所述基於OpenStack的裸機高可用性的實現裝置40中的各個程式段的程式碼可以存儲於記憶體中,並由至少一個處理器所執行。
In some embodiments, the
本實施例中,所述基於OpenStack的裸機高可用性的實現裝置40根據其所執行的功能,可以被劃分為複數功能模組。參考圖3所示,所述基於OpenStack的裸機高可用性的實現裝置40包括設置模組401、通訊模組402、狀態檢測模組403及控制模組404。本實施方式中,所述模組是指一種能夠被至少一個處理器所執行並且能夠完成固定功能的一系列電腦程式段,其存儲在記憶體中。所述在一些實施例中,關於各模組的功能將在後續的實施例中詳述。
In this embodiment, the
所述設置模組401設定至少兩個裸機節點2中的一個裸機節點2為主裸機節點,及設定所述至少兩個裸機節點2中剩下的裸機節點2為備用裸機節點,其中,所述主裸機節點及備用裸機節點中注入有作業系統映射檔。
The
本實施方式中,所述控制節點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
所述通訊模組402控制所述控制節點1藉由電源控制網路4分別與所述主裸機節點及備用裸機節點通訊連接並控制所述主裸機節點開啟電源
以使所述主裸機節點運行所述作業系統映射檔,及藉由業務網路3與所述主裸機節點通訊連接。
The
本實施方式中,所述通訊模組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
本實施方式中,所述通訊模組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
所述狀態檢測模組403控制控制節點1接收所述主裸機節點發送的節點狀態資訊,並當未接收到所述主裸機節點發送的節點狀態資訊時確定所述主裸機節點工作異常。
The
本實施方式中,所述主裸機節點的agent服務21藉由心跳機制回報節點狀態資訊給所述控制節點1。所述控制節點1的DHCP agent服務11接收所述主裸機節點的agent服務21發送的節點狀態資訊。當所述主裸機節點的作業系統映射檔運行出現故障或所述業務網路3斷網時,所述DHCP agent服務11接收不到所述主裸機節點發送的節點狀態資訊,所述狀態檢測模組403在確
定出所述DHCP agent服務11未接收到所述主裸機節點的agent服務21發送的節點狀態資訊時判定所述主裸機節點工作異常。
In this embodiment, the
所述控制模組404當確定所述主裸機節點工作異常時控制關閉所述主裸機節點的電源,並啟動所述備用裸機節點的電源以使所述備用裸機節點運行所述作業系統映射檔。
The
本實施方式中,所述控制模組404控制所述控制節點1藉由Ironic conductor服務12控制所述主裸機節點的電源控制器22關閉電源。在具體實施方式中,所述Ironic conductor服務12藉由IPMI命令控制所述主裸機節點的電源控制器22關閉電源。
In this embodiment, the
本實施方式中,所述控制模組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
本實施方式中,所述控制模組404還用於控制所述控制節點1藉由所述Ironic conductor服務12將與所述控制節點1的DHCP agent服務11通訊連接的備用裸機節點設定為新的主裸機節點並選取另一個未使用的裸機節點為新的備用裸機節點,及將所述作業系統映射檔注入到所述新的備用裸機節點中。
In this embodiment, the
本案中的控制節點1當確定主裸機節點工作異常時控制關閉所述主裸機節點的電源,並啟動備用裸機節點的電源以使所述備用裸機節點運行所述作業系統映射檔。從而解決在主裸機節點出現故障問題時將作業系統映射檔所包含服務在備用裸機節點上運行,從而恢復服務的執行。
In this case, the
實施例3 Example 3
圖4為本發明一實施方式中電子設備5的示意圖。
FIG. 4 is a schematic diagram of an
所述電子設備5包括記憶體51、處理器52以及存儲在所述記憶體51中並可在所述處理器52上運行的電腦程式53。所述處理器52執行所述電腦程式53時實現上述基於OpenStack的裸機高可用性的實現方法實施例中的步驟,例如圖1所示的步驟S11~S14。或者,所述處理器52執行所述電腦程式53時實現上述基於OpenStack的裸機高可用性的實現裝置實施例中各模組/單元的功能,例如圖3中的模組401~404。
The
示例性的,所述電腦程式53可以被分割成一個或複數模組/單元,所述一個或者複數模組/單元被存儲在所述記憶體51中,並由所述處理器52執行,以完成本發明。所述一個或複數模組/單元可以是能夠完成特定功能的一系列電腦程式指令段,所述指令段用於描述所述電腦程式53在所述電子設備5中的執行過程。例如,所述電腦程式53可以被分割成圖3中的設置模組401、通訊模組402、狀態檢測模組403及控制模組404,各模組具體功能參見實施例2。
Exemplarily, the
本實施方式中,所述電子設備5與控制節點1是同一裝置。例如,所述電子設備5還可以是桌上型電腦、筆記本、掌上型電腦及雲端終端裝置等計算設備。本領域技術人員可以理解,所述示意圖僅僅是電子設備5的示例,並不構成對電子設備5的限定,可以包括比圖示更多或更少的部件,或者組合某些部件,或者不同的部件,例如所述電子設備5還可以包括輸入輸出設備、網路接入設備、匯流排等。
In this embodiment, the
所稱處理器52可以是中央處理模組(Central Processing Unit,CPU),還可以是其他通用處理器、數位訊號處理器(Digital Signal Processor,DSP)、專用積體電路(Application Specific Integrated Circuit,ASIC)、現場可程式設計閘陣列(Field-Programmable Gate Array,FPGA)或者其他可程式設計邏輯器件、分立門或者電晶體邏輯器件、分立硬體元件等。通用處理器可以是微處理器或者所
述處理器52也可以是任何常規的處理器等,所述處理器52是所述電子設備5的控制中心,利用各種介面和線路連接整個電子設備5的各個部分。
The
所述記憶體51可用於存儲所述電腦程式53和/或模組/單元,所述處理器52藉由運行或執行存儲在所述記憶體51內的電腦程式和/或模組/單元,以及調用存儲在記憶體51內的資料,實現所述電子設備5的各種功能。所述記憶體51可主要包括存儲程式區和存儲資料區,其中,存儲程式區可存儲作業系統、至少一個功能所需的應用程式(比如聲音播放功能、圖像播放功能等)等;存儲資料區可存儲根據電子設備5的使用所創建的資料(比如音訊資料、電話本等)等。此外,記憶體51可以包括高速隨機存取記憶體,還可以包括非易失性記憶體,例如硬碟、記憶體、插接式硬碟,智慧存儲卡(Smart Media Card,SMC),安全數位(Secure Digital,SD)卡,快閃記憶體卡(Flash Card)、至少一個磁碟記憶體件、快閃記憶體器件、或其他易失性固態記憶體件。
The
所述電子設備5集成的模組/單元如果以軟體功能模組的形式實現並作為獨立的產品銷售或使用時,可以存儲在一個電腦可讀取存儲介質中。基於這樣的理解,本發明實現上述實施例方法中的全部或部分流程,也可以藉由電腦程式來指令相關的硬體來完成,所述的電腦程式可存儲於一電腦可讀存儲介質中,所述電腦程式在被處理器執行時,可實現上述各個方法實施例的步驟。其中,所述電腦程式包括電腦程式代碼,所述電腦程式代碼可以為原始程式碼形式、物件代碼形式、可執行檔或某些中間形式等。所述電腦可讀介質可以包括:能夠攜帶所述電腦程式代碼的任何實體或裝置、記錄介質、U盤、移動硬碟、磁碟、光碟、電腦記憶體、唯讀記憶體(ROM,Read-Only Memory)、隨機存取記憶體(RAM,Random Access Memory)、電載波信號、電信信號以及軟體分發介質等。需要說明的是,所述電腦可讀介質包含的內容可以根據司法管轄區內立法和專利實踐的要求進行適當的增減,例如在某些司法管轄區,根據立法和專利實踐,電腦可讀介質不包括電載波信號和電信信號。
If the modules/units integrated in the
在本發明所提供的幾個實施例中,應該理解到,所揭露的電子設備和方法,可以藉由其它的方式實現。例如,以上所描述的電子設備實施例僅僅是示意性的,例如,所述模組的劃分,僅僅為一種邏輯功能劃分,實際實現時可以有另外的劃分方式。 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)
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)
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 |
-
2020
- 2020-06-01 TW TW109118358A patent/TWI764160B/en active
Patent Citations (4)
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)
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 |