CN111104134B - Method and device for updating management unit of programmable device and storage medium - Google Patents

Method and device for updating management unit of programmable device and storage medium Download PDF

Info

Publication number
CN111104134B
CN111104134B CN201811257394.3A CN201811257394A CN111104134B CN 111104134 B CN111104134 B CN 111104134B CN 201811257394 A CN201811257394 A CN 201811257394A CN 111104134 B CN111104134 B CN 111104134B
Authority
CN
China
Prior art keywords
programmable device
virtual machine
programmable
mark
marking
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201811257394.3A
Other languages
Chinese (zh)
Other versions
CN111104134A (en
Inventor
田行辉
李娟�
朱正
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201811257394.3A priority Critical patent/CN111104134B/en
Publication of CN111104134A publication Critical patent/CN111104134A/en
Application granted granted Critical
Publication of CN111104134B publication Critical patent/CN111104134B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)
  • Programmable Controllers (AREA)

Abstract

The application discloses a method and a device for updating a management unit of a programmable device, and belongs to the technical field of electronics. The method comprises the following steps: when a management unit updating request is received, performing first marking on each programmable device in a plurality of installed programmable devices; for a target programmable device in the plurality of programmable devices, updating a management unit of the target programmable device when the target programmable device has a first mark and a second mark or when the target programmable device has a first mark and a third mark; and deleting the first mark of the target programmable device after the updating of the management unit of the target programmable device is successfully completed. The management unit updating process in the application simply and efficiently realizes the automation of the management unit updating under the condition of not influencing the service operation, and achieves the effect of smooth updating.

Description

Method and device for updating management unit of programmable device and storage medium
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a method and an apparatus for updating a management unit of a programmable device, and a storage medium.
Background
A programmable device is a device with a large number of programmable elements, of which the management element is used to manage the interaction between the user and the operating system. For example, the Programmable Device may be a Field-Programmable Gate Array (FPGA) Device or a Complex Programmable Logic Device (CPLD), and the like, and the management unit of the FPGA Device is a Shell (Shell). When the management unit of the programmable device cannot meet the user requirement or an error occurs, the management unit of the programmable device needs to be updated. For example, when the Shell of the FPGA device cannot meet the user requirement or an error occurs, the Shell needs to be updated on the FPGA device.
At present, before updating the management unit of the programmable device, communication with a user is required to plan a time period for updating the management unit of the programmable device. And then, when the management unit of the programmable device is updated in the time period, the programmable device can be powered off firstly, then the management unit of the programmable device is updated, and then the programmable device is powered on after the management unit of the programmable device is updated successfully.
However, in the above updating method of the management unit of the programmable device, it is necessary to communicate with the user to plan the time period for updating the management unit of the programmable device, which results in a long update period of the management unit of the programmable device. In addition, when the management unit of the programmable device is updated, the programmable device needs to be powered off and powered on, which easily affects the operation of the user service and causes the interruption of the user service.
Disclosure of Invention
The embodiment of the application provides a method and a device for updating a management unit of a programmable device and a storage medium, which can solve the problems that the update cycle of the management unit of the programmable device is long and user services can be interrupted in the related art. The technical scheme is as follows:
in a first aspect, a method for updating a management unit of a programmable device is provided, and is applied to a programmable device installed in a compute node, and the method includes: when a management unit updating request is received, carrying out first marking on each programmable device in a plurality of installed programmable devices, wherein the first marking indicates the programmable device which needs to be updated by the management unit; for a target programmable device in the plurality of programmable devices, updating a management unit of the target programmable device when the target programmable device has the first mark and a second mark, or when the target programmable device has the first mark and a third mark, wherein the second mark indicates a programmable device which is not allocated to a virtual machine for use, the third mark indicates a programmable device which is allocated to the virtual machine and is deleted, and the target programmable device is any programmable device in the plurality of editable devices; and deleting the first mark of the target programmable device after the management unit of the target programmable device is successfully updated.
It should be noted that the management unit update request is used to request an update of the management unit of the programmable device. The programmable device is a device having a plurality of programmable units, and the management unit is a programmable unit for managing interaction between a user and an operating system among the plurality of programmable units included in the programmable device.
In addition, the programmable device with the first flag is a programmable device that needs to update the management unit, the programmable device with the second flag is a programmable device that is not assigned to the virtual machine for use, and the virtual machine to which the programmable device with the third flag is assigned is deleted.
In the embodiment of the application, when a management unit update request is received, a first mark may be performed on each of a plurality of installed programmable devices, and then, a management unit of a programmable device having the first mark and a second mark may be automatically updated, or a management unit of a programmable device having the first mark and a third mark may be automatically updated, so that the automation of the update of the management unit is simply and efficiently realized without affecting the operation of a service, and the effect of smooth update is achieved.
Further, before the first marking is performed on each of the installed plurality of programmable devices when the management unit update request is received, the method further includes: scanning the programmable device when starting up; and carrying out second marking on the scanned programmable device.
In the embodiment of the application, the programmable device is scanned when the computer is started, and the scanned programmable device is marked with the second mark to indicate that the scanned programmable device is a programmable device which is not allocated to the virtual machine for use, so that the management unit of the programmable device can be updated conveniently subsequently.
Further, when a virtual machine creation request of a first virtual machine is received, deleting the second mark of at least one first programmable device in the plurality of programmable devices, and marking the at least one first programmable device with a fourth mark, wherein the fourth mark indicates the programmable device allocated to the virtual machine for use; creating the first virtual machine and allocating the at least one first programmable device to the first virtual machine for use; after the at least one first programmable device is allocated to the first virtual machine for use, deleting the fourth mark of the at least one first programmable device, and marking the at least one first programmable device for a fifth mark, wherein the fifth mark indicates the programmable device allocated to the virtual machine for use.
It should be noted that the virtual machine creation request of the first virtual machine is used to indicate that the first virtual machine is created, and the virtual machine creation request may carry the number of the programmable devices that need to be allocated to the first virtual machine for use, or may directly carry the identifier of the programmable devices that need to be allocated to the first virtual machine for use.
In addition, the first programmable device may be a programmable device that is not allocated for use by the virtual machine and is not updating the management unit, among the plurality of programmable devices, when the virtual machine creation request of the first virtual machine is received.
Note that the programmable device having the fourth flag is a programmable device to be assigned to the virtual machine, and the programmable device having the fifth flag is a programmable device already assigned to the virtual machine.
In this embodiment of the present application, when a virtual machine creation request of a first virtual machine is received and the at least one first programmable device is allocated to the first virtual machine for use, a flag state of the at least one first programmable device in the plurality of programmable devices may be changed, so that when the management unit is updated, the programmable device allocated to the virtual machine for use or the management unit of the programmable device already allocated to the virtual machine for use is prevented from being updated.
Further, when a virtual machine deletion request of a second virtual machine is received, determining at least one second programmable device which is allocated to the second virtual machine to use in the plurality of programmable devices; deleting the second virtual machine; and after the second virtual machine is deleted, deleting the fifth mark of the at least one second programmable device, and carrying out the third mark on the at least one second programmable device.
It should be noted that the virtual machine deletion request of the second virtual machine is used to indicate that the second virtual machine is deleted, and the virtual machine deletion request may carry an identifier of the second virtual machine that needs to be deleted.
In addition, the second programmable device may be a programmable device that has been allocated to the second virtual machine for use among the plurality of programmable devices when the virtual machine deletion request of the second virtual machine is received.
Further, after the deleting the fifth flag of the at least one second programmable device and the third flag of the at least one second programmable device, the method further includes: clearing logic information of the at least one second programmable device; and after the logic information of the at least one second programmable device is cleared, deleting the third mark of the at least one second programmable device, and carrying out the second mark on the at least one second programmable device.
It should be noted that the logic information of the at least one second programmable device is logic code about the second virtual machine programmed on the at least one second programmable device.
Further, scanning the programmable device every preset time after starting up, deleting all current marks of the third programmable device when the last scanned programmable device comprises the third programmable device, and after deleting all current marks of the third programmable device, marking the third programmable device with a sixth mark, wherein the third programmable device is a programmable device except the programmable device scanned this time, and the sixth mark indicates other lost programmable devices; and when the scanned programmable device comprises a fourth programmable device, deleting the sixth mark of the fourth programmable device, and performing the second mark on the fourth programmable device, wherein the fourth programmable device is other programmable devices except the last scanned programmable device.
It should be noted that the third programmable device is a programmable device that has not been scanned this time, the fourth programmable device is a programmable device that has not been scanned last time, and the programmable device with the sixth flag is a lost programmable device.
In the embodiment of the application, the programmable device is scanned at intervals of preset time after the programmable device is started, and when the last scanned programmable device comprises a third programmable device, all current marks of the third programmable device are deleted, and then a sixth mark is carried out on the third programmable device. And when the scanned programmable device comprises a fourth programmable device, deleting a sixth mark of the fourth programmable device, and marking the fourth programmable device for the second time, wherein under the condition, the use of the fourth programmable device can be restarted, so that the use efficiency of the programmable device installed on the computing node can be improved.
In a second aspect, an updating apparatus for a management unit of a programmable device is provided, where the updating apparatus for a management unit of a programmable device has a function of implementing an updating method behavior of the management unit of the programmable device in the first aspect. The updating apparatus of the management unit of the programmable device includes at least one module, where the at least one module is used to implement the updating method of the management unit of the programmable device provided in the first aspect.
In a third aspect, an updating apparatus for a management unit of a programmable device is provided, where the updating apparatus for a management unit of a programmable device structurally includes a processor and a memory, and the memory is used to store a program that supports the updating apparatus for a management unit of a programmable device to execute the updating method for a management unit of a programmable device provided in the first aspect, and to store data used to implement the updating method for a management unit of a programmable device provided in the first aspect. The processor is configured to execute programs stored in the memory. The updating means of the management unit of the programmable device may further comprise a communication bus for establishing a connection between the processor and the memory.
In a fourth aspect, a computer-readable storage medium is provided, which stores instructions that, when executed on a computer, cause the computer to perform the method for updating a management unit of a programmable device according to the first aspect.
In a fifth aspect, there is provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method for updating a management unit of a programmable device according to the first aspect.
The technical effects obtained by the second, third, fourth and fifth aspects are similar to the technical effects obtained by the corresponding technical means in the first aspect, and are not described herein again.
The technical scheme provided by the application can at least bring the following beneficial effects: when a management unit updating request is received, a first mark is carried out on each programmable device in the plurality of installed programmable devices, and the first mark indicates the programmable device which needs to be updated by the management unit. And then, for a target programmable device in the plurality of programmable devices, when the target programmable device has a first mark and a second mark, or when the target programmable device has a first mark and a third mark, updating a management unit of the target programmable device, wherein the second mark indicates a programmable device which is not allocated to the virtual machine for use, the third mark indicates a programmable device which is allocated to the virtual machine and is deleted, and the target programmable device is any one of the plurality of programmable devices. And deleting the first mark of the target programmable device after the updating of the management unit of the target programmable device is successfully completed. The updating process of the management unit simply and efficiently realizes the updating automation of the management unit under the condition of not influencing the operation of the service, and achieves the effect of smooth updating.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a management unit update system according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a method for updating a management unit of a first programmable device according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a marking process of a programmable device according to an embodiment of the present disclosure;
fig. 5 is a flowchart of a second method for updating a management unit of a programmable device according to an embodiment of the present application;
fig. 6 is a flowchart of a method for updating a management unit of a third programmable device according to an embodiment of the present application;
fig. 7 is a flowchart of a method for updating a management unit of a fourth programmable device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an updating apparatus of a management unit of a programmable device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Before explaining the embodiments of the present application in detail, application scenarios and system architectures related to the embodiments of the present application will be described.
First, an application scenario of the embodiment of the present application will be described.
In a cloud computing scenario, a plurality of programmable devices may be installed on a server, the programmable devices may be allocated to virtual machines installed in the server in a pass-through manner for use, and each virtual machine may be allocated to one or more programmable devices. The programmable device comprises a plurality of programmable units, wherein a part of the programmable units are management units for managing the interaction between a user and an operating system, and when the management units cannot meet the user requirements or have errors, the management units need to be updated. The embodiment of the application is applied to a scene of updating the management units of a plurality of programmable devices installed on the server.
Next, a system architecture according to an embodiment of the present application will be described.
Fig. 1 is a schematic structural diagram of a management unit update system according to an embodiment of the present application. Referring to fig. 1, the management unit update system includes: control node 110, compute node 120, and operation and maintenance domain 130. The control node 110 and the computing node 120 may communicate through a wired connection or a wireless connection, and the computing node 120 and the operation and maintenance domain 130 may also communicate through a wired connection or a wireless connection.
The control node 110 may receive the virtual machine creation request or the virtual machine deletion request, and perform authentication and parameter verification on the virtual machine creation request or the virtual machine deletion request, and after both the authentication and the parameter verification pass, send the virtual machine creation request or the virtual machine deletion request to the computing node 120. In addition, control node 110 may also store the identity and tag status of the programmable device.
The control node 110 may include a check interface, a scheduling module, and a database. When the control node 110 receives the virtual machine creation request, the check interface is called to perform authentication and parameter check on the virtual machine creation request, and after the authentication and the parameter check are passed, the scheduling module selects the computing node 120 meeting the creation condition of the virtual machine, and sends the virtual machine creation request to the computing node 120. When receiving the virtual machine deletion request, the control node 110 calls the check interface to perform authentication and parameter check on the virtual machine deletion request, and after both the authentication and the parameter check are passed, the control node sends the virtual machine deletion request to the computing node 120. The database may have stored therein an identification and flag status of each of a plurality of programmable devices installed in compute node 120.
A plurality of programmable devices may be installed on the computing node 120, and the computing node 120 may receive a virtual machine creation request or a virtual machine deletion request sent by the control node 110, and create a new virtual machine or delete an already created virtual machine accordingly. In creating the virtual machine, at least one of the plurality of programmable devices may be assigned for use by the virtual machine being created. After the virtual machine is deleted, the logic information of the at least one programmable device assigned to the use of the deleted virtual machine may be cleared so that the at least one programmable device may be assigned again the next time the virtual machine is created. In addition, the computing node 120 may also scan and mark the programmable device, and when the computing node 120 receives a management unit update request sent by the operation and maintenance domain 130, the computing node 120 may update the management unit of the programmable device that meets a certain marking condition, and after the update of the management unit of the programmable device is successfully completed, the computing node 120 may generate a management unit update result and send the management unit update result to the operation and maintenance domain 130.
Among other things, compute node 120 may include a plurality of programmable devices, compute proxy components, programmable device proxy components, and programmable device driver components. The compute agent component may scan the programmable device, may write the scanned identity of the programmable device to the database of the control node 110, and may delete the identity of the programmable device stored in the database of the control node 110. The programmable device agent component may write the flag state of the programmable device to the database of the control node 110 and may modify or delete the flag state of the programmable device stored in the database of the control node 110. The programmable device agent component may further obtain an identifier and a tag state of the programmable device stored in the database of the control node 110, and for the programmable device satisfying a certain tag condition, the programmable device agent component may send a management unit update request for the programmable device to the programmable device driving component, and the programmable device driving component updates the management unit of the programmable device.
The operation and maintenance domain 130 may send a management unit update request to the compute node 120 to indicate an update to the management unit of the programmable device installed in the compute node 120. The operation and maintenance domain 130 may also receive the management unit update result sent by the computing node 120. When the management unit updating result indicates that the management unit of one or more programmable devices fails to update, the worker can repair or replace the one or more programmable devices.
The operation and maintenance domain 130 may have a programmable device management component installed therein, and the programmable device management component may send a management unit update request to the compute node 120 and may receive a management unit update result sent by the compute node 120.
Fig. 2 is a schematic structural diagram of a computer device provided in an embodiment of the present application, where the computer device may be the computing node 120 shown in fig. 1, and referring to fig. 2, the computer device includes at least one processor 201, a communication bus 202, a memory 203, and at least one communication interface 204.
The processor 201 may be a Central Processing Unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or may be one or more integrated circuits for controlling the execution of programs according to the present disclosure.
The communication bus 202 may include a path for communicating information between the aforementioned components.
The Memory 203 may be a Read-Only Memory (ROM) or other types of static storage devices that can store static information and instructions, a Random Access Memory (RAM) or other types of dynamic storage devices that can store information and instructions, an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), a magnetic Disc storage medium or other magnetic storage devices, or any other medium which can be used to carry or store desired program code in the form of instructions or data structures and which can be accessed by a computer, but is not limited to such. The memory 203 may be self-contained and coupled to the processor 201 via the communication bus 202. The memory 203 may also be integrated with the processor 201.
The communication interface 204 may be any device, such as a transceiver, for communicating with other devices or communication Networks, such as ethernet, Radio Access Network (RAN), Wireless Local Area Networks (WLAN), etc.
In particular implementations, processor 201 may include one or more CPUs, such as CPU0 and CPU1 shown in fig. 2, as one embodiment.
In particular implementations, a computer device may include multiple processors, such as processor 201 and processor 205 shown in fig. 2, as an embodiment. Each of these processors may be a single-Core Processor (CPU) or a multi-Core Processor (CPU). A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
In particular implementations, the computer device may also include an output device 206 and an input device 207, as one embodiment. The output device 206 is in communication with the processor 201 and may display information in a variety of ways. For example, the output device 206 may be a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display device, a Cathode Ray Tube (CRT) display device, a projector (projector), or the like. The input device 207 is in communication with the processor 201 and may receive user input in a variety of ways. For example, the input device 207 may be a mouse, a keyboard, a touch screen device, or a sensing device, among others.
The computer device may be a general purpose computer device or a special purpose computer device. In a specific implementation, the computer device may be a desktop computer, a laptop computer, a web server, a Personal Digital Assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device, or an embedded device, and the embodiment of the present application does not limit the type of the computer device.
The memory 203 is used for storing a program code 210 for executing the scheme of the application, and the processor 201 is used for executing the program code 210 stored in the memory 203. The computer device can implement the method for updating the management unit of the programmable device provided in the embodiment of fig. 3 below by the processor 201 and the program code 210 in the memory 203.
Fig. 3 is a flowchart of a method for updating a management unit of a programmable device according to an embodiment of the present application. Referring to fig. 3, the method includes:
step 301: when a management unit update request is received, a first marking is performed on each of the installed plurality of programmable devices.
It is noted that step 301 may be performed by a programmable device agent component in the compute node.
In addition, the management unit update request is used for requesting to update the management unit of the programmable device, and the management unit update request may be sent by the operation and maintenance domain. A programmable device is a device with a large number of programmable cells, for example, the programmable device may be an FPGA or a CPLD. The management unit is a programmable unit for managing interaction between a user and an operating system in a plurality of programmable units included in the programmable device, for example, when the programmable device is an FPGA device, the management unit of the FPGA device may be a Shell.
Furthermore, the first flag is a flag indicating a programmable device that needs to be updated by the management unit, that is, the programmable device having the first flag is a programmable device that needs to be updated by the management unit.
Since the management unit update request is used to request to update the management unit of the programmable device, when the management unit update request is received, a first flag may be performed on each of the installed plurality of programmable devices to indicate that the plurality of programmable devices are all programmable devices that need to update the management unit.
In practical applications, after the plurality of programmable devices are installed in the computing node, an identifier of each programmable device in the plurality of programmable devices may be written into the database of the control node, where the identifier of the programmable device may be a number, a name, and the like of the programmable device, and this is not limited in this embodiment of the present application. In this case, when the first flag is performed on each of the plurality of installed programmable devices, the first flag may be stored in correspondence with the identifier of each of the plurality of programmable devices stored in the database of the control node, so as to implement the first flag on each of the plurality of programmable devices.
For example, a database of control nodes may have maintained therein a correspondence between programmable device identifications and flag states. For a certain programmable device installed in the computation node, assuming that the identifier of the programmable device is identifier 1, after the computation node installs the programmable device, identifier 1 may be stored in the corresponding relationship between the identifier of the programmable device and the flag state. Then, when the compute node receives the management unit update request, a first flag may be added to a flag state corresponding to the flag 1 in the correspondence between the programmable device identifier and the flag state, so that the first flag of the programmable device may be implemented, and at this time, the correspondence between the programmable device identifier and the flag state may be as shown in table 1 below.
TABLE 1
Programmable device identification Marking status
Identification 1 First mark
Note that, in the embodiment of the present application, only table 1 is taken as an example to describe the correspondence between the programmable device identifier and the flag state, and table 1 does not limit the embodiment of the present application.
Further, before step 301, the programmable device may be scanned at power-on, and the scanned programmable device may be subjected to a second marking.
Note that the second flag is a flag indicating a programmable device not assigned to the virtual machine, that is, the programmable device having the second flag is a programmable device not assigned to the virtual machine.
Since the programmable devices in the compute node are all in an initial state at startup and are not allocated to the virtual machine for use, the programmable devices scanned at startup may be marked with a second flag to indicate that all the scanned programmable devices are programmable devices that are not allocated to the virtual machine for use.
When the scanned programmable device is subjected to the second marking, the second marking may be stored in correspondence with the identifier of the programmable device stored in the database of the control node, so as to implement the second marking of the programmable device.
Step 302: and for a target programmable device in the plurality of programmable devices, updating a management unit of the target programmable device when the target programmable device has the first mark and the second mark or when the target programmable device has the first mark and the third mark, wherein the target programmable device is any one of the plurality of programmable devices.
It is noted that step 302 may be performed by a programmable device driver component in the compute node.
In addition, the third flag is a flag indicating that the programmable device to which the virtual machine is assigned has been deleted, that is, the virtual machine to which the programmable device having the third flag is assigned has been deleted.
Moreover, when the target programmable device has the first mark and the second mark, the target programmable device is a programmable device which needs to update the management unit and is not allocated to the virtual machine for use, and under the condition, the management unit of the target programmable device is updated, so that the service operation in the computing node is not influenced. When the target programmable device has the first mark and the third mark, the target programmable device is a programmable device which needs to update the management unit and is distributed to the deleted virtual machine, and under the condition, the management unit of the target programmable device is updated, and the service operation of the computing node is not influenced.
It is worth noting that in the embodiment of the present application, when a management unit update request is received, a first flag may be performed on each of a plurality of installed programmable devices, and then, a management unit of a programmable device having the first flag and a second flag may be automatically updated, or a management unit of a programmable device having the first flag and a third flag may be automatically updated, so that automation of updating of the management unit is simply and efficiently achieved without affecting service operation, and an effect of smooth update is achieved.
The operation of updating the management unit of the target programmable device is similar to the operation of updating the management unit of a certain programmable device in the related art, and this is not described in detail in this embodiment of the present application.
It should be noted that, when updating the management unit of the target programmable device, the management unit update result of the target programmable device may be generated according to the update condition of the management unit of the target programmable device, and the management unit update result may include update failure or update success. And then, the updating result of the management unit can be sent to the operation and maintenance domain, so that a worker can timely know the updating condition of the management unit of the target programmable device according to the updating result of the management unit and timely maintain or replace the target programmable device which fails to be updated.
Further, when a virtual machine needs to be created on the computing node, the marking state of the programmable device can be updated in the process of creating the virtual machine. Specifically, the second flag of at least one first programmable device in the plurality of programmable devices may be deleted and a fourth flag may be performed on the at least one first programmable device when a virtual machine creation request of the first virtual machine is received; creating a first virtual machine and allocating the at least one first programmable device to the first virtual machine for use; and after the at least one first programmable device is allocated to the first virtual machine for use, deleting the fourth mark of the at least one first programmable device, and carrying out fifth mark on the at least one first programmable device.
It should be noted that the virtual machine creation request of the first virtual machine is used to indicate that the first virtual machine is created, the virtual machine creation request may be sent by the control node, and the virtual machine creation request may carry the number of the programmable devices that need to be allocated to the first virtual machine for use, or may directly carry the identifier of the programmable devices that need to be allocated to the first virtual machine for use. Then, the computing node may determine the at least one first programmable device from the installed plurality of programmable devices according to the number or the identifier of the programmable devices carried in the virtual machine creation request, for example, when the number of the programmable devices that need to be allocated to the first virtual machine for use in the virtual machine creation request is 2, the computing node may randomly select 2 programmable devices that are not allocated to the virtual machine for use and are not updating the management unit from the installed plurality of programmable devices as the first programmable devices; or, when the identifier of the programmable device that needs to be allocated to the first virtual machine for use is identifier 1 and identifier 2 carried in the virtual machine creation request, the computing node may use the programmable device identified by identifier 1 and the programmable device identified by identifier 2 as the first programmable device.
In addition, the first programmable device may be a programmable device that is not allocated to the virtual machine and is not updating the management unit when the virtual machine creation request of the first virtual machine is received, for example, the first programmable device may be a programmable device having the second flag and not having the first flag.
It should be noted that the fourth flag is a flag indicating a programmable device to be assigned to the virtual machine for use, that is, the programmable device having the fourth flag is a programmable device to be assigned to the virtual machine for use.
Since the at least one first programmable device determined upon receipt of the virtual machine creation request for the first virtual machine is about to be allocated for use by the first virtual machine and no longer belongs to programmable devices not allocated for use by the virtual machine, the second flag for the at least one first programmable device may be deleted and a fourth flag may be placed on the at least one first programmable device to indicate that the at least one first programmable device is a programmable device for allocation for use by the virtual machine.
In addition, the fifth flag is a flag indicating a programmable device that has been assigned to the use of the virtual machine, that is, the programmable device having the fifth flag is a programmable device that has been assigned to the use of the virtual machine.
Since the at least one first programmable device is a programmable device that has been assigned to the first virtual machine for use after the at least one first programmable device is assigned to the first virtual machine for use, and is no longer about to be assigned to the first virtual machine for use, the fourth flag of the at least one first programmable device may be deleted and the at least one first programmable device may be marked fifth to indicate that the at least one first programmable device is a programmable device that has been assigned to the virtual machine for use.
When the second flag of at least one first programmable device in the plurality of programmable devices is deleted and a fourth flag is performed on the at least one first programmable device, the second flag in the flag state corresponding to the identifier of the at least one first programmable device stored in the database of the control node may be replaced with the fourth flag to delete the second flag of the at least one first programmable device and implement the fourth flag of the at least one first programmable device.
When the fourth flag of the at least one first programmable device is deleted and the fifth flag of the at least one first programmable device is performed, the fifth flag may be replaced with the fourth flag in the flag state corresponding to the identifier of the at least one first programmable device stored in the database of the control node, so as to delete the fourth flag of the at least one first programmable device and implement the fifth flag of the at least one first programmable device.
Further, if the virtual machine creation request of the first virtual machine is sent by the control node, before the control node sends the virtual machine creation request, the control node may further invoke a check interface to perform authentication and parameter check on the virtual machine creation request, and after both the authentication and the parameter check pass, the scheduling module in the control node selects a computing node that meets the virtual machine creation condition, and sends the virtual machine creation request to the computing node.
It should be noted that the virtual machine creation condition may be that the number of programmable devices in the compute node that are not allocated to the virtual machine for use and are not in the update management unit is greater than or equal to the number of programmable devices that need to be allocated to the first virtual machine for use, and of course, the virtual machine creation condition may also be other conditions, which is not limited in this embodiment of the present application.
Further, when the virtual machine needs to be deleted on the computing node, the marking state of the programmable device can be updated in the process of deleting the virtual machine. Specifically, at least one second programmable device which is allocated to the second virtual machine to use in the plurality of programmable devices may be determined when a virtual machine deletion request of the second virtual machine is received; deleting the second virtual machine; and after the second virtual machine is deleted, deleting the fifth mark of the at least one second programmable device, and carrying out third mark on the at least one second programmable device.
It should be noted that the virtual machine deletion request of the second virtual machine is used to indicate that the second virtual machine is deleted, the virtual machine deletion request may be sent by the control node, and the virtual machine deletion request may carry an identifier of the second virtual machine that needs to be deleted.
In addition, the second programmable device may be a programmable device that has been allocated to the second virtual machine for use among the plurality of programmable devices when the virtual machine deletion request of the second virtual machine is received.
Since the at least one second programmable device is no longer in use by the second virtual machine after the second virtual machine is deleted, the fifth flag of the at least one second programmable device may be deleted and the at least one second programmable device may be flagged third to indicate that the at least one second programmable device is a deleted programmable device assigned to the virtual machine.
When the fifth mark of the at least one second programmable device is deleted and the third mark is performed on the at least one second programmable device, the fifth mark in the mark state corresponding to the identifier of the at least one second programmable device stored in the database of the control node may be replaced with the third mark, so as to delete the fifth mark of the at least one second programmable device and implement the third mark of the at least one second programmable device.
Further, if the virtual machine deletion request of the second virtual machine is sent by the control node, before the control node sends the virtual machine creation deletion, the control node may also call the verification interface to perform authentication and parameter verification on the virtual machine deletion request, and after both the authentication and the parameter verification pass, the control node sends the virtual machine deletion request to the computing node.
Furthermore, in order to enable the at least one second programmable device allocated to the second virtual machine to be allocated to other virtual machines for use again after the second virtual machine is deleted, after the fifth mark of the at least one second programmable device is deleted and the third mark is performed on the at least one second programmable device, the logic information of the at least one second programmable device can be cleared; and after the logic information of the at least one second programmable device is cleared, deleting the third mark of the at least one second programmable device, and carrying out second mark on the at least one second programmable device.
It should be noted that the logic information of the at least one second programmable device is logic code about the second virtual machine programmed on the at least one second programmable device.
After the logic information of the at least one second programmable device is cleared, the at least one second programmable device is not already a programmable device allocated to the second virtual machine, so that after the logic information of the at least one second programmable device is cleared, the third flag of the at least one second programmable device can be deleted, and the at least one second programmable device is marked with the second flag to indicate that the at least one second programmable device is a programmable device not allocated to the virtual machine.
When the third flag of the at least one second programmable device is deleted and the second flag of the at least one second programmable device is performed, the third flag in the flag state corresponding to the identifier of the at least one second programmable device stored in the database of the control node may be replaced with the second flag to delete the third flag of the at least one second programmable device and implement the second flag of the at least one second programmable device.
Furthermore, the programmable device can be scanned every preset time length after the startup; when the last scanned programmable device comprises a third programmable device, deleting all current marks of the third programmable device, and after deleting all current marks of the third programmable device, carrying out sixth marking on the third programmable device; and when the scanned programmable device comprises a fourth programmable device, deleting the sixth mark of the fourth programmable device, and carrying out second marking on the fourth programmable device.
It should be noted that the third programmable device is a programmable device other than the programmable device scanned this time, that is, the third programmable device is a programmable device not scanned this time.
In addition, the sixth flag is a flag for indicating other programmable devices that are missing, that is, the programmable device having the sixth flag is a programmable device that has been missing.
Since the third programmable device is a programmable device other than the programmable device scanned this time, when the programmable device scanned last time includes the third programmable device, it indicates that the third programmable device is lost after the last scanning and before the current scanning, and the lost programmable device cannot be operated, so it is necessary to delete all current marks of the third programmable device first, and then perform a sixth mark on the third programmable device to indicate that the third programmable device is lost.
Furthermore, the fourth programmable device is a programmable device other than the programmable device scanned last time, that is, the fourth programmable device is a programmable device not scanned last time.
Because the fourth programmable device is other programmable devices except the last scanned programmable device, when the scanned programmable device includes the fourth programmable device, the fourth programmable device may have been scanned, but is lost during the last scanning, and is retrieved during the current scanning, at this time, the sixth mark of the fourth programmable device may be deleted, and the second mark is performed on the fourth programmable device to indicate that the fourth programmable device may be allocated to the virtual machine for use; or, the fourth programmable device may be a programmable device that has not been scanned before the current scanning, that is, the fourth programmable device is a programmable device newly scanned at this time, an identifier of the fourth programmable device may be written into the database of the control node, and then the second flag and the identifier of the fourth programmable device stored in the database of the control node are stored correspondingly, so as to indicate that the fourth programmable device is a programmable device that is not allocated to the virtual machine for use.
When the sixth marking is performed on the third programmable device after all the current marks of the third programmable device are deleted, all the marks in the marking state corresponding to the identifier of the third programmable device stored in the database of the control node may be replaced with the sixth mark, so that the sixth mark of the third programmable device is deleted after all the current marks of the third programmable device are deleted.
When the sixth flag of the fourth programmable device is deleted and the second flag of the fourth programmable device is performed, the sixth flag in the flag state corresponding to the identifier of the fourth programmable device stored in the database of the control node may be replaced with the second flag, so as to delete the sixth flag of the fourth programmable device and implement the second flag of the fourth programmable device.
It is worth to be noted that, after the programmable device is started up, the programmable device is scanned at intervals of a preset time, and when the last scanned programmable device includes a third programmable device, all current marks of the third programmable device are deleted, and then a sixth mark is performed on the third programmable device. And when the scanned programmable device comprises a fourth programmable device, deleting a sixth mark of the fourth programmable device, and marking the fourth programmable device for the second time, wherein under the condition, the use of the fourth programmable device can be restarted, so that the use efficiency of the programmable device installed on the computing node can be improved.
Step 303: and deleting the first mark of the target programmable device after the updating of the management unit of the target programmable device is successfully completed.
It is noted that step 303 may be performed by a programmable device agent component in the compute node.
In addition, after the management unit of the target programmable device is successfully updated, the target programmable device does not need to update the management unit, so that the first mark of the target programmable device can be deleted to avoid triggering the update of the management unit of the target programmable device.
In the embodiment of the application, when a management unit update request is received, a first mark is carried out on each programmable device in a plurality of installed programmable devices, and the first mark indicates the programmable device which needs to be updated by the management unit. And then, for a target programmable device in the plurality of programmable devices, when the target programmable device has a first mark and a second mark, or when the target programmable device has a first mark and a third mark, updating a management unit of the target programmable device, wherein the second mark indicates a programmable device which is not allocated to the virtual machine for use, the third mark indicates a programmable device which is allocated to the virtual machine and is deleted, and the target programmable device is any one of the plurality of programmable devices. And deleting the first mark of the target programmable device after the updating of the management unit of the target programmable device is successfully completed. The updating process of the management unit simply and efficiently realizes the updating automation of the management unit under the condition of not influencing the operation of the service, and achieves the effect of smooth updating.
For ease of understanding, the marking process of the programmable device is described below with reference to fig. 4, and as shown in fig. 4, the marking process of the programmable device is as follows:
1. and when the computer is started, the computing node scans the programmable device and carries out second marking on the scanned programmable device.
2. When the computing node receives a virtual machine creation request, the virtual machine is in a pre-created state, at the moment, the second mark used for at least one programmable device distributed to the virtual machine to be created is deleted, and the fourth mark is carried out on the at least one programmable device.
3. And the computing node creates a virtual machine, allocates the at least one programmable device to the created virtual machine for use, deletes the fourth mark of the at least one programmable device after the at least one programmable device is allocated to the virtual machine for use, and marks the at least one programmable device for the fifth mark.
4. And when the computing node receives a virtual machine deleting request, deleting the virtual machine, deleting the fifth mark allocated to at least one programmable device of the virtual machine after the virtual machine is deleted, and carrying out third mark on the at least one programmable device.
It should be noted that, after the third marking is performed on the at least one programmable device, the computing node may also clear the logic information of the at least one programmable device, so that the at least one programmable device may be allocated to another virtual machine for use again. And after the logic information of the at least one programmable device is cleared, the third flag of the at least one programmable device may be deleted, and the second flag of the at least one programmable device may be performed.
5. When the compute node receives a management unit update request, a first marking is performed on each of the installed plurality of programmable devices.
It should be noted that, for any one of the plurality of programmable devices, when the programmable device has the first flag and the second flag, or when the programmable device has the first flag and the third flag, the management unit of the programmable device may be updated. And deleting the first mark of the programmable device after the updating of the management unit of the programmable device is successfully completed.
6. Scanning the programmable device at intervals of preset time by the computing node, determining the programmable device to be a lost programmable device when the last scanned programmable device comprises other programmable devices except the programmable device scanned at this time, deleting all current marks of the programmable device, and then marking the programmable device by a sixth mark; and when the programmable device scanned this time comprises other programmable devices except the programmable device scanned last time, determining that the programmable device is the programmable device found in the scanning this time, deleting the sixth mark of the programmable device, and carrying out the second mark on the programmable device.
Different situations that may exist when the management unit of the programmable device is updated are described below with reference to fig. 5, 6, and 7.
In the first case, referring to fig. 5, when a plurality of programmable devices are installed on a compute node, but no virtual machine has been created on the compute node, the compute node receives a management unit update request.
Step 501: when the computer is started, the computing agent components in the computing nodes scan the computing nodes, and the programmable device agent components in the computing nodes perform second marking on the scanned programmable devices.
Step 502: and the computing node receives the management unit updating request, and the programmable device agent component carries out first marking on the plurality of programmable devices, wherein the plurality of programmable devices are provided with the first marking and the second marking.
Step 503: and the programmable device agent component sends a management unit update request to the programmable device driving components in the computing nodes to indicate the programmable device driving components to update the management units of the plurality of programmable devices.
Step 504: and after the programmable device driving component successfully finishes updating the management units of the plurality of programmable devices, the programmable device agent component deletes the first marks of the plurality of programmable devices.
In a second scenario, referring to fig. 6, a plurality of programmable devices are installed on the compute node, and the compute node receives a management unit update request after at least a first programmable device of the plurality of programmable devices is allocated for use by the first virtual machine.
Step 601: when the computer is started, the computing agent components in the computing nodes scan the computing nodes, and the programmable device agent components in the computing nodes perform second marking on the scanned programmable devices.
Step 602: and the computing node receives a virtual machine creation request of the first virtual machine, and the programmable device agent component deletes the second mark of at least one first programmable device in the plurality of programmable devices and carries out fourth mark on the at least one first programmable device.
Step 603: the computing node creates a first virtual machine.
Step 604: the programmable device agent component deletes the fourth marking of the at least one first programmable device and marks the at least one first programmable device a fifth marking.
Step 605: and the computing node receives the management unit updating request, the programmable device agent component carries out the first marking on the plurality of programmable devices, and at the moment, other programmable devices except the at least one first programmable device in the plurality of programmable devices all have the first marking and the second marking.
Step 606: and the programmable device agent component sends a management unit update request to the programmable device driving component in the computing node to instruct the programmable device driving component to update the management units of the other programmable devices except the at least one first programmable device in the plurality of programmable devices.
Step 607: after the programmable device driving component successfully finishes updating the management units of the other programmable devices except the at least one first programmable device in the plurality of programmable devices, the programmable device agent component deletes the first marks of the other programmable devices except the at least one first programmable device in the plurality of programmable devices.
Step 608: and the computing node receives a virtual machine deleting request of the first virtual machine and deletes the first virtual machine.
Step 609: and the programmable device agent component deletes the fifth mark of the at least one first programmable device and carries out third mark on the at least one first programmable device, wherein the at least one first programmable device has the first mark and the third mark.
Step 610: and the programmable device agent component sends a management unit update request to the programmable device driving component to indicate the programmable device driving component to update the management unit of the at least one first programmable device.
Step 611: and deleting the first mark of the at least one first programmable device after the programmable device driving component successfully finishes updating the management unit of the at least one first programmable device.
It is noted that, referring to fig. 7, steps 612-615 may also be performed after step 609.
Step 612: the programmable device agent component clears the logic information of the at least one first programmable device.
Step 613: the programmable device agent component deletes the third mark of the at least one first programmable device and carries out second mark on the at least one first programmable device, and at the moment, the at least one first programmable device has the first mark and the second mark.
Step 614: and the programmable device agent component sends a management unit update request to the programmable device driving component to indicate the programmable device driving component to update the management unit of the at least one first programmable device.
Step 615: and deleting the first mark of the at least one first programmable device after the programmable device driving component successfully finishes updating the management unit of the at least one first programmable device.
Fig. 8 is a schematic structural diagram of an updating apparatus of a management unit of a programmable device according to an embodiment of the present application. The apparatus may be implemented as part or all of a computer device, which may be the computer device shown in fig. 2, by software, hardware, or a combination of both. Referring to fig. 8, the apparatus includes: a first marking module 801, an updating module 802, and a first deleting module 803.
A first marking module 801 for performing step 301 in the embodiment of fig. 3;
an update module 802 for performing step 302 in the embodiment of fig. 3;
a first deleting module 803, configured to perform step 303 in the embodiment of fig. 3.
Optionally, the apparatus further comprises:
the first scanning module is used for scanning the programmable device when the computer is started;
and the second marking module is used for carrying out second marking on the scanned programmable device.
Optionally, the apparatus further comprises:
a third marking module, configured to delete the second mark of at least one first programmable device in the plurality of programmable devices and perform a fourth marking on the at least one first programmable device when receiving a virtual machine creation request of the first virtual machine, where the fourth marking indicates a programmable device for allocation to the virtual machine;
the creating module is used for creating the first virtual machine and distributing the at least one first programmable device to the first virtual machine for use;
and the fourth marking module is used for deleting the fourth mark of the at least one first programmable device after the at least one first programmable device is allocated to the first virtual machine for use, and marking the at least one first programmable device for the fifth mark, wherein the fifth mark indicates the programmable device allocated to the virtual machine for use.
Optionally, the apparatus further comprises:
the determining module is used for determining at least one second programmable device which is distributed to the second virtual machine to use in the plurality of programmable devices when a virtual machine deleting request of the second virtual machine is received;
the second deleting module is used for deleting the virtual machine;
and a fifth marking module, configured to delete the fifth mark of the at least one second programmable device after the second virtual machine is deleted, and perform the third marking on the at least one second programmable device.
Optionally, the apparatus further comprises:
the clearing module is used for clearing the logic information of the at least one second programmable device;
and the sixth marking module is used for deleting the third marking of the at least one second programmable device and carrying out the second marking on the at least one second programmable device after the logic information of the at least one second programmable device is cleared.
Optionally, the apparatus further comprises:
the second scanning module is used for scanning the programmable device at intervals of preset time length after starting up;
a seventh marking module, configured to delete all current marks of the third programmable device when the last scanned programmable device includes the third programmable device, and perform a sixth marking on the third programmable device after deleting all current marks of the third programmable device, where the third programmable device is a programmable device other than the scanned programmable device, and the sixth marking indicates a lost other programmable device;
and the eighth marking module deletes the sixth mark of the fourth programmable device and performs the second marking on the fourth programmable device when the scanned programmable device includes the fourth programmable device, wherein the fourth programmable device is other programmable devices except the programmable device scanned last time.
In the embodiment of the application, when a management unit update request is received, a first mark is carried out on each programmable device in a plurality of installed programmable devices, and the first mark indicates the programmable device which needs to be updated by the management unit. And then, for a target programmable device in the plurality of programmable devices, when the target programmable device has a first mark and a second mark, or when the target programmable device has a first mark and a third mark, updating a management unit of the target programmable device, wherein the second mark indicates a programmable device which is not allocated to the virtual machine for use, the third mark indicates a programmable device which is allocated to the virtual machine and is deleted, and the target programmable device is any one of the plurality of programmable devices. And deleting the first mark of the target programmable device after the updating of the management unit of the target programmable device is successfully completed. The updating process of the management unit simply and efficiently realizes the updating automation of the management unit under the condition of not influencing the operation of the service, and achieves the effect of smooth updating.
It should be noted that: the updating apparatus for a management unit of a programmable device provided in the foregoing embodiment is only illustrated by dividing the above functional modules when the management unit of the programmable device is updated, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the updating apparatus for the management unit of the programmable device provided in the foregoing embodiment and the updating method embodiment of the management unit of the programmable device belong to the same concept, and details of a specific implementation process thereof are referred to in the method embodiment and are not described herein again.
In the above embodiments, the implementation may be wholly or partly realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., Digital Versatile Disk (DVD)), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above-mentioned embodiments are provided not to limit the present application, and any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (13)

1. A method for updating a management unit of a programmable device, the method comprising:
when a management unit updating request is received, carrying out first marking on each programmable device in a plurality of installed programmable devices, wherein the first marking indicates the programmable device which needs to be updated by the management unit;
for a target programmable device in the plurality of programmable devices, when the target programmable device has the first mark and a second mark, or when the target programmable device has the first mark and a third mark, updating a management unit of the target programmable device, wherein the second mark indicates a programmable device which is not allocated to a virtual machine for use, the third mark indicates a programmable device which is allocated to the virtual machine and is deleted, and the target programmable device is any one of the plurality of programmable devices;
deleting the first mark of the target programmable device after the management unit of the target programmable device is successfully updated;
the method further comprises the following steps:
when a virtual machine deletion request of a second virtual machine is received, determining at least one second programmable device which is allocated to the second virtual machine to use in the plurality of programmable devices; deleting the second virtual machine;
and after the second virtual machine is deleted, deleting a fifth mark of the at least one second programmable device, and carrying out the third mark on the at least one second programmable device, wherein the fifth mark indicates the programmable device which is allocated to the virtual machine for use.
2. The method of claim 1, wherein prior to first marking each of the installed plurality of programmable devices upon receiving the management unit update request, further comprising:
scanning the programmable device when starting up;
and carrying out second marking on the scanned programmable device.
3. The method of claim 1, wherein the method further comprises:
when a virtual machine creation request of a first virtual machine is received, deleting the second mark of at least one first programmable device in the plurality of programmable devices, and marking the at least one first programmable device with a fourth mark, wherein the fourth mark indicates the programmable device used for being allocated to the virtual machine;
creating the first virtual machine and allocating the at least one first programmable device to the first virtual machine for use;
and after the at least one first programmable device is allocated to the first virtual machine for use, deleting the fourth mark of the at least one first programmable device, and carrying out the fifth mark on the at least one first programmable device.
4. The method of claim 2, wherein the method further comprises:
when a virtual machine creation request of a first virtual machine is received, deleting the second mark of at least one first programmable device in the plurality of programmable devices, and marking the at least one first programmable device with a fourth mark, wherein the fourth mark indicates the programmable device used for being allocated to the virtual machine;
creating the first virtual machine and allocating the at least one first programmable device to the first virtual machine for use;
and after the at least one first programmable device is allocated to the first virtual machine for use, deleting the fourth mark of the at least one first programmable device, and carrying out the fifth mark on the at least one first programmable device.
5. The method of claim 1, wherein after said deleting said fifth marking of said at least one second programmable device and said third marking of said at least one second programmable device, further comprising:
clearing logic information of the at least one second programmable device;
and after the logic information of the at least one second programmable device is cleared, deleting the third mark of the at least one second programmable device, and carrying out the second mark on the at least one second programmable device.
6. The method of any of claims 1-5, wherein the method further comprises:
scanning the programmable device every other preset time length after starting up;
when the last scanned programmable device comprises a third programmable device, deleting all current marks of the third programmable device, and after deleting all current marks of the third programmable device, carrying out sixth marking on the third programmable device, wherein the third programmable device is a programmable device except the scanned programmable device at this time, and the sixth marking indicates other lost programmable devices;
and when the scanned programmable device comprises a fourth programmable device, deleting the sixth mark of the fourth programmable device, and performing the second mark on the fourth programmable device, wherein the fourth programmable device is other programmable devices except the last scanned programmable device.
7. An apparatus for updating a management unit of a programmable device, the apparatus comprising:
the first marking module is used for marking each programmable device in a plurality of installed programmable devices in a first marking mode when a management unit updating request is received, and the first marking indicates the programmable device which needs to be updated by the management unit;
an update module, configured to, for a target programmable device in the plurality of programmable devices, update a management unit of the target programmable device when the target programmable device has the first flag and the second flag, or when the target programmable device has the first flag and the third flag, where the second flag indicates a programmable device that is not allocated for use by a virtual machine, the third flag indicates a programmable device that is allocated to the virtual machine and has been deleted, and the target programmable device is any one of the plurality of programmable devices;
the first deleting module is used for deleting the first mark of the target programmable device after the management unit of the target programmable device is successfully updated;
the device further comprises:
the determining module is used for determining at least one second programmable device which is distributed to the second virtual machine to use in the plurality of programmable devices when a virtual machine deleting request of the second virtual machine is received;
the second deleting module is used for deleting the virtual machine;
and the fifth marking module is used for deleting the fifth mark of the at least one second programmable device after the second virtual machine is deleted, and carrying out the third mark on the at least one second programmable device, wherein the fifth mark indicates the programmable device which is allocated to the virtual machine for use.
8. The apparatus of claim 7, wherein the apparatus further comprises:
the first scanning module is used for scanning the programmable device when the computer is started;
and the second marking module is used for carrying out second marking on the scanned programmable device.
9. The apparatus of claim 7, wherein the apparatus further comprises:
a third marking module, configured to delete the second mark of at least one first programmable device in the plurality of programmable devices and perform a fourth marking on the at least one first programmable device when receiving a virtual machine creation request of the first virtual machine, where the fourth marking indicates a programmable device for allocation to the virtual machine;
the creating module is used for creating the first virtual machine and distributing the at least one first programmable device to the first virtual machine for use;
and the fourth marking module is used for deleting the fourth mark of the at least one first programmable device and carrying out the fifth mark on the at least one first programmable device after the at least one first programmable device is allocated to the first virtual machine for use.
10. The apparatus of claim 8, wherein the apparatus further comprises:
a third marking module, configured to delete the second mark of at least one first programmable device in the plurality of programmable devices and perform a fourth marking on the at least one first programmable device when receiving a virtual machine creation request of the first virtual machine, where the fourth marking indicates a programmable device for allocation to the virtual machine;
the creating module is used for creating the first virtual machine and distributing the at least one first programmable device to the first virtual machine for use;
and the fourth marking module is used for deleting the fourth mark of the at least one first programmable device after the at least one first programmable device is allocated to the first virtual machine for use, and marking the at least one first programmable device for the fifth mark, wherein the fifth mark indicates the programmable device allocated to the virtual machine for use.
11. The apparatus of claim 7, wherein the apparatus further comprises:
the clearing module is used for clearing the logic information of the at least one second programmable device;
and the sixth marking module is used for deleting the third marking of the at least one second programmable device and carrying out the second marking on the at least one second programmable device after the logic information of the at least one second programmable device is cleared.
12. The apparatus of any of claims 7-11, wherein the apparatus further comprises:
the second scanning module is used for scanning the programmable device at intervals of preset time length after starting up;
a seventh marking module, configured to delete all current marks of the third programmable device when the last scanned programmable device includes the third programmable device, and perform a sixth marking on the third programmable device after deleting all current marks of the third programmable device, where the third programmable device is a programmable device other than the scanned programmable device, and the sixth marking indicates a lost other programmable device;
and the eighth marking module deletes the sixth mark of the fourth programmable device and performs the second marking on the fourth programmable device when the scanned programmable device includes the fourth programmable device, wherein the fourth programmable device is other programmable devices except the programmable device scanned last time.
13. A computer-readable storage medium having stored therein instructions which, when run on a computer, cause the computer to execute the method for updating a management unit of a programmable device according to any one of claims 1 to 6.
CN201811257394.3A 2018-10-26 2018-10-26 Method and device for updating management unit of programmable device and storage medium Active CN111104134B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811257394.3A CN111104134B (en) 2018-10-26 2018-10-26 Method and device for updating management unit of programmable device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811257394.3A CN111104134B (en) 2018-10-26 2018-10-26 Method and device for updating management unit of programmable device and storage medium

Publications (2)

Publication Number Publication Date
CN111104134A CN111104134A (en) 2020-05-05
CN111104134B true CN111104134B (en) 2021-09-07

Family

ID=70418844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811257394.3A Active CN111104134B (en) 2018-10-26 2018-10-26 Method and device for updating management unit of programmable device and storage medium

Country Status (1)

Country Link
CN (1) CN111104134B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002189609A (en) * 2000-12-20 2002-07-05 Nec Corp System and method for updating software adapted to accident
CN102662701A (en) * 2012-03-28 2012-09-12 中兴通讯股份有限公司 Online CPLD (Complex Programmable Logic Devices) upgrading method, device and business veneer
CN105005487A (en) * 2015-06-29 2015-10-28 清华大学 Continuous-service high-performance cluster operating system online upgrading method
CN108536526A (en) * 2017-03-02 2018-09-14 腾讯科技(深圳)有限公司 A kind of method for managing resource and device based on programmable hardware

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002189609A (en) * 2000-12-20 2002-07-05 Nec Corp System and method for updating software adapted to accident
CN102662701A (en) * 2012-03-28 2012-09-12 中兴通讯股份有限公司 Online CPLD (Complex Programmable Logic Devices) upgrading method, device and business veneer
CN105005487A (en) * 2015-06-29 2015-10-28 清华大学 Continuous-service high-performance cluster operating system online upgrading method
CN108536526A (en) * 2017-03-02 2018-09-14 腾讯科技(深圳)有限公司 A kind of method for managing resource and device based on programmable hardware

Also Published As

Publication number Publication date
CN111104134A (en) 2020-05-05

Similar Documents

Publication Publication Date Title
CN110661658B (en) Node management method and device of block chain network and computer storage medium
US11611481B2 (en) Policy management method and system, and apparatus
CN108984266B (en) Virtual machine management method, device and system
CN109886693B (en) Consensus realization method, device, equipment and medium for block chain system
CN108572845B (en) Upgrading method of distributed micro-service cluster and related system
WO2017183565A1 (en) Network system, patch file application method, and recording medium
WO2020215752A1 (en) Graph computing method and device
CN110520844A (en) Cloud management platform, virtual machine management method and its system
CN111221550B (en) Rule updating method and device for streaming computing and streaming computing system
CN108073423A (en) A kind of accelerator loading method, system and accelerator loading device
CN110069265B (en) Service cluster upgrading method and device and storage medium
CN109828830B (en) Method and apparatus for managing containers
CN114090113B (en) Method, device, equipment and storage medium for dynamically loading data source processing plug-in
CN112650692A (en) Heap memory allocation method, device and storage medium
US10922001B2 (en) Vector-based storage management
CN111104134B (en) Method and device for updating management unit of programmable device and storage medium
CN112631994A (en) Data migration method and system
CN116151631A (en) Service decision processing system, service decision processing method and device
CN107707620B (en) Method and device for processing IO (input/output) request
CN111488232B (en) Out-of-box solution level configuration and diagnostic logging and reporting systems and methods
CN111324374B (en) Application program registration method and device based on application performance management system
CN108566293B (en) Electronic device, zk node information notification method, and storage medium
CN107493316B (en) Application operation management method, server and computer readable storage medium
CN112306372A (en) Method, apparatus and program product for processing data
US11855908B2 (en) Resource allocation in cloud computing systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant