CN113467814A - Batch upgrading method, system and device for RBD virtual machines and readable storage medium - Google Patents

Batch upgrading method, system and device for RBD virtual machines and readable storage medium Download PDF

Info

Publication number
CN113467814A
CN113467814A CN202110597893.2A CN202110597893A CN113467814A CN 113467814 A CN113467814 A CN 113467814A CN 202110597893 A CN202110597893 A CN 202110597893A CN 113467814 A CN113467814 A CN 113467814A
Authority
CN
China
Prior art keywords
rbd
virtual machine
upgrading
monitor
heartbeat
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.)
Pending
Application number
CN202110597893.2A
Other languages
Chinese (zh)
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.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data Technology 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 Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202110597893.2A priority Critical patent/CN113467814A/en
Publication of CN113467814A publication Critical patent/CN113467814A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/656Updates while running
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/301Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is a virtual computing platform, e.g. logically partitioned systems
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a batch upgrading method, a system, a device and a readable storage medium of RBD virtual machines, which comprise the following steps: a timer is established in the RBD virtual machine, and the time interval of reading heartbeat information sent by the monitor by the RBD virtual machine is set through the timer; reading heartbeat messages, and determining whether the RBD virtual machine needs to update the dynamic library or not by analyzing the heartbeat messages; if the dynamic library needs to be upgraded, the administrator imports the IP list of the computing node into the monitor through the management interface, sends an upgrading command to the monitor, and controls the monitor to sequentially send heartbeat messages containing the latest version information of the dynamic library to the computing node according to the IP list. The invention simplifies the upgrading operation of the RBD virtual machine, does not need to restart all virtual machines on all computing nodes to complete upgrading, and realizes automatic batch upgrading of the RBD virtual machines.

Description

Batch upgrading method, system and device for RBD virtual machines and readable storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a batch upgrading method, a batch upgrading system, a batch upgrading device and a readable storage medium of RBD virtual machines.
Background
The RBD is a Block Device in Ceph, namely RADOS Block Device for short, and the RBD Block storage is the most stable and commonly used storage type. The RBD block device can be mounted like a disk. The RBD block device has the characteristics of snapshot, multiple copies, clone and consistency, and data is stored in a striping mode in a plurality of OSD of the Ceph cluster.
At present, the version of a dynamic library of the RBD virtual machine is upgraded by restarting all the virtual machines by an administrator, so that the working efficiency is low, and a large amount of labor input is wasted. In addition, the dynamic library version process of the RBD virtual machine cannot be displayed, and an administrator cannot know the upgrading condition of the RBD virtual machine at any time.
Disclosure of Invention
In view of the above problems, an object of the present invention is to provide a method, a system, a device and a readable storage medium for batch upgrade of RBD virtual machines, which simplify the upgrade operation of RBD virtual machines, do not need to restart all virtual machines on all computing nodes to complete the upgrade, and implement automatic batch upgrade of RBD virtual machines.
In order to achieve the purpose, the invention is realized by the following technical scheme: a batch upgrading method for RBD virtual machines comprises the following steps:
a timer is established in the RBD virtual machine, and the time interval of reading heartbeat information sent by the monitor by the RBD virtual machine is set through the timer;
starting an RBD virtual machine and reading the heartbeat message;
determining whether the RBD virtual machine needs to update the dynamic library or not by analyzing the heartbeat message;
if the RBD virtual machine needs to update the dynamic library, the administrator imports an IP list of the computing node into the monitor through the management interface, sends an update command to the monitor after the import is finished, and controls the monitor to sequentially send heartbeat messages containing the latest version information of the dynamic library to the computing node according to the IP list.
Further, still include:
and when the dynamic libraries of the RBD virtual machines in all the computing nodes are upgraded to the latest version, displaying the upgrading progress through a management interface.
Further, the establishing a timer in the RBD virtual machine, and setting a time interval for the RBD virtual machine to read heartbeat information sent by the monitor through the timer specifically includes:
a timer is established in the RBD virtual machine, the RBD virtual machine is set to read heartbeat information sent by the monitor every 30 seconds through the timer, a version information field is arranged in the heartbeat information, and the latest dynamic library version information of the RBD virtual machine is stored in the version information field.
Further, the starting the RBD virtual machine and reading the heartbeat message specifically includes:
starting an RBD virtual machine and executing a volume opening action;
and after the volume is opened, establishing heartbeat connection with the monitor, and reading heartbeat information sent by the monitor every 30 seconds.
Further, the determining whether the RBD virtual machine needs to update the dynamic library by analyzing the heartbeat message specifically includes:
reading a version information field of the heartbeat information, acquiring latest dynamic library version information of the RBD virtual machine, and if the latest dynamic library version information of the RBD virtual machine is different from the dynamic library version information in the current RBD virtual machine, determining that the RBD virtual machine needs to upgrade a dynamic library; otherwise, the RBD virtual machine does not need to update the dynamic library.
Further, the monitor sequentially sends heartbeat messages containing the latest version information of the dynamic library to the computing node according to the IP list, and specifically includes:
after receiving the upgrading command, the monitor updates the version information field in the heartbeat information to be sent to the first computing node in the IP list into the latest dynamic library version information of the RBD virtual machine, and after the updating is finished, the monitor sends the heartbeat information to all the computing nodes in the IP list;
after waiting for 90 seconds, the monitor counts the upgrading states of all RBD virtual machines on the first computing node, updates the version information field in the heartbeat information to be sent to the second computing node in the IP list into the latest dynamic library version information of the RBD virtual machines, and sends heartbeat information to all computing nodes in the IP list after the updating is finished;
and repeating the steps until version information fields in the heartbeat information sent to all the computing nodes in the IP list are the latest dynamic library version information of the RBD virtual machine.
Further, the displaying of the upgrade progress through the management interface specifically includes:
the RBD virtual machine feeds back the upgrading state to the monitor through the heartbeat message, the monitor forwards the upgrading state to the management interface, and the upgrading progress is displayed through the management interface.
Correspondingly, the invention also discloses a batch upgrading system of the RBD virtual machines, which comprises the following steps:
the timing module is used for establishing a timer in the RBD virtual machine and setting a time interval for reading heartbeat information sent by the monitor by the RBD virtual machine through the timer;
the heartbeat message acquisition module is used for starting the RBD virtual machine and reading the heartbeat message;
the heartbeat message analysis module is used for determining whether the RBD virtual machine needs to update the dynamic library or not by analyzing the heartbeat message;
the upgrading module is used for controlling the monitor to sequentially send heartbeat messages containing the latest version information of the dynamic library to the computing nodes according to the IP list;
and the display module is used for displaying the upgrading progress through the management interface.
Further, the timing module is specifically configured to:
a timer is established in the RBD virtual machine, the RBD virtual machine is set to read heartbeat information sent by the monitor every 30 seconds through the timer, a version information field is arranged in the heartbeat information, and the latest dynamic library version information of the RBD virtual machine is stored in the version information field.
Further, the heartbeat message acquiring module is specifically configured to:
starting an RBD virtual machine and executing a volume opening action;
and after the volume is opened, establishing heartbeat connection with the monitor, and reading heartbeat information sent by the monitor every 30 seconds.
Further, the heartbeat message parsing module is specifically configured to:
reading a version information field of the heartbeat information, acquiring latest dynamic library version information of the RBD virtual machine, and if the latest dynamic library version information of the RBD virtual machine is different from the dynamic library version information in the current RBD virtual machine, determining that the RBD virtual machine needs to upgrade a dynamic library; otherwise, the RBD virtual machine does not need to update the dynamic library.
Further, the upgrade module is specifically configured to:
after receiving the upgrading command, the monitor updates the version information field in the heartbeat information to be sent to the first computing node in the IP list into the latest dynamic library version information of the RBD virtual machine, and after the updating is finished, the monitor sends the heartbeat information to all the computing nodes in the IP list;
after waiting for 90 seconds, the monitor counts the upgrading states of all RBD virtual machines on the first computing node, updates the version information field in the heartbeat information to be sent to the second computing node in the IP list into the latest dynamic library version information of the RBD virtual machines, and sends heartbeat information to all computing nodes in the IP list after the updating is finished;
and repeating the steps until version information fields in the heartbeat information sent to all the computing nodes in the IP list are the latest dynamic library version information of the RBD virtual machine.
Further, the display module is specifically configured to:
the RBD virtual machine feeds back the upgrading state to the monitor through the heartbeat message, the monitor forwards the upgrading state to the management interface, and the upgrading progress is displayed through the management interface.
Correspondingly, the invention discloses a batch upgrading device of RBD virtual machines, which comprises:
the memory is used for storing a batch upgrading program of the RBD virtual machine;
and the processor is used for realizing the steps of the batch upgrading method of the RBD virtual machine when executing the batch upgrading program of the RBD virtual machine.
Correspondingly, the invention discloses a readable storage medium, wherein a batch upgrading program of the RBD virtual machines is stored on the readable storage medium, and when being executed by a processor, the batch upgrading program of the RBD virtual machines realizes the steps of the batch upgrading method of the RBD virtual machines according to any one of the above items.
Compared with the prior art, the invention has the beneficial effects that:
1. the invention simplifies the upgrading operation of the RBD virtual machine, does not need to restart all virtual machines on all computing nodes to complete the upgrading, and automatically completes the upgrading of the RBD virtual machine.
2. The invention realizes the visual display of the upgrading process of the RBD virtual machine, and an administrator can know the upgrading condition of the RBD virtual machine at any time.
3. The invention realizes one-key triggering batch upgrading, can improve the experience of the product and increase the core competitiveness of the product.
4. The invention introduces a batch upgrading function, and sends an upgrading command by one key by introducing the ip list of the computing node in the management interface, so that all RBD virtual machines automatically complete the upgrading process of the dynamic library, the automation degree is higher, the excellent use experience is brought to customers, and the labor cost is also saved.
Therefore, compared with the prior art, the invention has prominent substantive features and remarkable progress, and the beneficial effects of the implementation are also obvious.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of the method of the present invention;
fig. 2 is a system block diagram of the present invention.
In the figure, 1 is a timing module; 2 is a heartbeat message acquisition module; 3 is a heartbeat message analysis module; 4, upgrading the module; and 5, a display module.
Detailed Description
The core of the invention is to provide a batch upgrading method for RBD virtual machines, in the prior art, the version of a dynamic library of the RBD virtual machines is upgraded, and an administrator needs to restart all the virtual machines to complete the upgrading, so that the working efficiency is low, and a large amount of labor input is wasted.
The batch upgrading method of the RBD virtual machines comprises the steps of firstly, establishing a timer in the RBD virtual machines, and setting the time interval for reading heartbeat information sent by a monitor by the RBD virtual machines through the timer. Then, starting the RBD virtual machine and reading the heartbeat message. At the moment, whether the RBD virtual machine needs to update the dynamic library is determined by analyzing the heartbeat message; if the RBD virtual machine needs to update the dynamic library, the administrator imports an IP list of the computing node into the monitor through the management interface, sends an update command to the monitor after the import is finished, and controls the monitor to sequentially send heartbeat messages containing the latest version information of the dynamic library to the computing node according to the IP list. And finally, when the dynamic libraries of the RBD virtual machines in all the computing nodes are upgraded to the latest version, displaying the upgrading progress through a management interface. Therefore, the batch upgrading function is introduced, the calculation node ip list is introduced into the management interface, the upgrading command is issued by one key, all RBD virtual machines automatically complete the upgrading process of the dynamic library, the automation degree is higher, the excellent use experience is brought to customers, and the labor cost is also saved.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment is as follows:
as shown in fig. 1, this embodiment provides a batch upgrading method for RBD virtual machines, including the following steps:
s1: and establishing a timer in the RBD virtual machine, and setting a time interval for reading the heartbeat information sent by the monitor by the RBD virtual machine through the timer.
The method specifically comprises the following steps: and establishing a timer in the RBD virtual machine, and setting the RBD virtual machine to read the heartbeat information sent by the monitor every 30 seconds through the timer. The time interval of reading the heartbeat information sent by the monitor by the RBD virtual machine can be adjusted according to the time condition. And a version information field is arranged in the heartbeat information, and the latest dynamic library version information of the RBD virtual machine is stored in the version information field.
S2: and starting the RBD virtual machine and reading the heartbeat message.
First, the RBD virtual machine is started and a volume open action is performed. And after the volume is opened, establishing heartbeat connection with the monitor, and reading heartbeat information sent by the monitor every 30 seconds.
S3: and determining whether the RBD virtual machine needs to update the dynamic library by analyzing the heartbeat message.
When the RBD virtual machine is in use, a volume is opened, heartbeat messages are established between the opened volume and the monitor, a timer is established inside the RBD virtual machine, the heartbeat messages sent by the monitor are read for 30s, and whether the RBD virtual machine needs to upgrade the dynamic library or not is determined by analyzing the heartbeat messages.
The specific process of analyzing the heartbeat message comprises the following steps:
reading a version information field of the heartbeat information, acquiring latest dynamic library version information of the RBD virtual machine, and if the latest dynamic library version information of the RBD virtual machine is different from the dynamic library version information in the current RBD virtual machine, determining that the RBD virtual machine needs to upgrade a dynamic library; otherwise, the RBD virtual machine does not need to update the dynamic library.
S4: if the RBD virtual machine needs to update the dynamic library, the administrator imports an IP list of the computing node into the monitor through the management interface, sends an update command to the monitor after the import is finished, and controls the monitor to sequentially send heartbeat messages containing the latest version information of the dynamic library to the computing node according to the IP list.
The process that the monitor sends the heartbeat message containing the latest version information of the dynamic library to the computing node in sequence according to the IP list comprises the following steps:
and after receiving the upgrading command, the monitor updates the version information field in the heartbeat information to be sent to the first computing node in the IP list into the latest dynamic library version information of the RBD virtual machine, and after the updating is finished, the monitor sends the heartbeat information to all the computing nodes in the IP list. At this time, in the sent heartbeat messages, the heartbeat message sent to the first computing node in the ip list has the latest version information, and the heartbeat messages sent to other computing nodes are still the old version information.
After waiting for 90 seconds, the monitor counts the upgrading states of all RBD virtual machines on the first computing node, updates the version information field in the heartbeat information to be sent to the second computing node in the IP list into the latest dynamic library version information of the RBD virtual machines, and sends the heartbeat information to all the computing nodes in the IP list after the updating is finished. At this time, the first two nodes sent to the ip list in the sent heartbeat messages are the latest version information, and the heartbeat messages are sent to other computing nodes which are the old version information.
And repeating the steps until version information fields in the heartbeat information sent to all the computing nodes in the IP list are the latest dynamic library version information of the RBD virtual machine. So far, all heartbeat messages in the ip list are latest version information, and finally, the message bar messages sent by the monitor to all the computing nodes are all provided with the latest version information.
S5: and when the dynamic libraries of the RBD virtual machines in all the computing nodes are upgraded to the latest version, displaying the upgrading progress through a management interface.
The process of displaying the upgrading progress through the management interface comprises the following steps:
the RBD virtual machine feeds back the upgrading state to the monitor through the heartbeat message, the monitor forwards the upgrading state to the management interface, and the upgrading progress is displayed through the management interface.
The embodiment provides a batch upgrading method for RBD virtual machines, which simplifies the upgrading operation of the RBD virtual machines, does not need to restart all virtual machines on all computing nodes to complete upgrading, and automatically completes upgrading of the RBD virtual machines. The embodiment realizes the visual display of the upgrading process of the RBD virtual machine, and an administrator can know the upgrading condition of the RBD virtual machine at any time. According to the embodiment, one-key triggering batch upgrading is realized, the experience of the product can be improved, and the core competitiveness of the product is increased.
Example two:
based on the first embodiment, as shown in fig. 2, the present invention further discloses a batch upgrade system for RBD virtual machines, including: the device comprises a timing module 1, a heartbeat message acquisition module 2, a heartbeat message analysis module 3, an upgrading module 4 and a display module 5.
And the timing module 1 is used for establishing a timer in the RBD virtual machine and setting a time interval for reading the heartbeat information sent by the monitor by the RBD virtual machine through the timer. The timing module 1 is specifically configured to:
a timer is established in the RBD virtual machine, the RBD virtual machine is set to read heartbeat information sent by the monitor every 30 seconds through the timer, a version information field is arranged in the heartbeat information, and the latest dynamic library version information of the RBD virtual machine is stored in the version information field.
And the heartbeat message acquisition module 2 is used for starting the RBD virtual machine and reading the heartbeat message. The heartbeat message acquiring module 2 is specifically configured to: starting an RBD virtual machine and executing a volume opening action; and after the volume is opened, establishing heartbeat connection with the monitor, and reading heartbeat information sent by the monitor every 30 seconds.
And the heartbeat message analysis module 3 is used for determining whether the RBD virtual machine needs to update the dynamic library or not by analyzing the heartbeat message. The heartbeat message parsing module 3 is specifically configured to: reading a version information field of the heartbeat information, acquiring latest dynamic library version information of the RBD virtual machine, and if the latest dynamic library version information of the RBD virtual machine is different from the dynamic library version information in the current RBD virtual machine, determining that the RBD virtual machine needs to upgrade a dynamic library; otherwise, the RBD virtual machine does not need to update the dynamic library.
And the upgrading module 4 is used for controlling the monitor to sequentially send heartbeat messages containing the latest version information of the dynamic library to the computing nodes according to the IP list.
The upgrade module 4 is specifically configured to:
1. and after receiving the upgrading command, the monitor updates the version information field in the heartbeat information to be sent to the first computing node in the IP list into the latest dynamic library version information of the RBD virtual machine, and after the updating is finished, the monitor sends the heartbeat information to all the computing nodes in the IP list.
2. After waiting for 90 seconds, the monitor counts the upgrading states of all RBD virtual machines on the first computing node, updates the version information field in the heartbeat information to be sent to the second computing node in the IP list into the latest dynamic library version information of the RBD virtual machines, and sends heartbeat information to all computing nodes in the IP list after the updating is finished;
3. and repeating the steps until version information fields in the heartbeat information sent to all the computing nodes in the IP list are the latest dynamic library version information of the RBD virtual machine.
And the display module 5 is used for displaying the upgrading progress through the management interface. The display module 5 is specifically configured to: the RBD virtual machine feeds back the upgrading state to the monitor through the heartbeat message, the monitor forwards the upgrading state to the management interface, and the upgrading progress is displayed through the management interface.
The embodiment provides a batch upgrading system of RBD virtual machines, which simplifies the upgrading operation of the RBD virtual machines, does not need to restart all virtual machines on all computing nodes to complete upgrading, and automatically completes upgrading of the RBD virtual machines. The embodiment realizes the visual display of the upgrading process of the RBD virtual machine, and an administrator can know the upgrading condition of the RBD virtual machine at any time. According to the embodiment, one-key triggering batch upgrading is realized, the experience of the product can be improved, and the core competitiveness of the product is increased.
Example three:
the embodiment discloses a batch upgrading device of RBD virtual machines, which comprises a processor and a memory; when the processor executes the batch upgrading program of the RBD virtual machines stored in the memory, the following steps are realized:
1. when the RBD virtual machine is in use, a volume is opened, a heartbeat message is established between the opened volume and the monitor, a timer is established inside the RBD virtual machine, the heartbeat message sent by the RBD virtual machine is read once for 30s, and whether the RBD virtual machine needs to be updated or not is determined by analyzing the heartbeat message.
2. The method comprises the steps that an administrator imports an ip list of a computing node through a management interface, then triggers an upgrade command, after a monitor receives the upgrade command, heartbeat messages sent to a first computing node in the ip list are provided with latest version information, and heartbeat messages sent to other nodes are still old version information.
3. After the time is out for 90s, the monitor counts the upgrade states of all RBD virtual machines on the node, then the monitor sends the first two computing nodes of the ip list with the latest version information and sends heartbeat messages with old version information to other computing nodes, and so on, the heartbeat messages in all the ip lists are the latest version information, and finally the heartbeat messages sent by the monitor to all the computing nodes are provided with the latest version information.
4. After the client is upgraded, the RBD virtual machine feeds the upgrade state back to the monitor through the heartbeat message, the monitor forwards the upgrade state to the management interface, and the management interface displays the upgrade progress.
Further, the batch upgrading device for the RBD virtual machines in this embodiment may further include:
the input interface is used for acquiring a batch upgrading program of the RBD virtual machine imported from the outside, storing the acquired batch upgrading program of the RBD virtual machine into the memory, and also used for acquiring various instructions and parameters transmitted by external terminal equipment and transmitting the instructions and parameters to the processor, so that the processor can utilize the instructions and parameters to perform corresponding processing. In this embodiment, the input interface may specifically include, but is not limited to, a USB interface, a serial interface, a voice input interface, a fingerprint input interface, a hard disk reading interface, and the like.
And the output interface is used for outputting various data generated by the processor to the terminal equipment connected with the output interface, so that other terminal equipment connected with the output interface can acquire various data generated by the processor. In this embodiment, the output interface may specifically include, but is not limited to, a USB interface, a serial interface, and the like.
And the communication unit is used for establishing remote communication connection between the batch upgrading device of the RBD virtual machine and the external server so that the batch upgrading device of the RBD virtual machine can mount the mirror image file into the external server. In this embodiment, the communication unit may specifically include, but is not limited to, a remote communication unit based on a wireless communication technology or a wired communication technology.
And the keyboard is used for acquiring various parameter data or instructions input by a user through real-time key cap knocking.
And the display is used for displaying relevant information in the short circuit positioning process of the power supply line of the running server in real time.
The mouse can be used for assisting a user in inputting data and simplifying the operation of the user.
The embodiment provides a batch upgrading device for RBD virtual machines, which simplifies the upgrading operation of the RBD virtual machines, does not need to restart all virtual machines on all computing nodes to complete upgrading, and automatically completes upgrading of the RBD virtual machines. The embodiment realizes the visual display of the upgrading process of the RBD virtual machine, and an administrator can know the upgrading condition of the RBD virtual machine at any time. According to the embodiment, one-key triggering batch upgrading is realized, the experience of the product can be improved, and the core competitiveness of the product is increased.
Example four:
the present embodiments also disclose a readable storage medium, where the readable storage medium includes Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable hard disk, a CD-ROM, or any other form of storage medium known in the art. The readable storage medium stores a batch upgrading program of RBD virtual machines, and the batch upgrading program of the RBD virtual machines realizes the following steps when being executed by a processor:
1. when the RBD virtual machine is in use, a volume is opened, a heartbeat message is established between the opened volume and the monitor, a timer is established inside the RBD virtual machine, the heartbeat message sent by the RBD virtual machine is read once for 30s, and whether the RBD virtual machine needs to be updated or not is determined by analyzing the heartbeat message.
2. The method comprises the steps that an administrator imports an ip list of a computing node through a management interface, then triggers an upgrade command, after a monitor receives the upgrade command, heartbeat messages sent to a first computing node in the ip list are provided with latest version information, and heartbeat messages sent to other nodes are still old version information.
3. After the time is out for 90s, the monitor counts the upgrade states of all RBD virtual machines on the node, then the monitor sends the first two computing nodes of the ip list with the latest version information and sends heartbeat messages with old version information to other computing nodes, and so on, the heartbeat messages in all the ip lists are the latest version information, and finally the heartbeat messages sent by the monitor to all the computing nodes are provided with the latest version information.
4. After the client is upgraded, the RBD virtual machine feeds the upgrade state back to the monitor through the heartbeat message, the monitor forwards the upgrade state to the management interface, and the management interface displays the upgrade progress.
The embodiment provides a readable storage medium, which simplifies the upgrade operation of the RBD virtual machine, does not need to restart all virtual machines on all computing nodes to complete the upgrade, and automatically completes the upgrade of the RBD virtual machine. The embodiment realizes the visual display of the upgrading process of the RBD virtual machine, and an administrator can know the upgrading condition of the RBD virtual machine at any time. According to the embodiment, one-key triggering batch upgrading is realized, the experience of the product can be improved, and the core competitiveness of the product is increased.
In conclusion, the RBD virtual machines on all the computing nodes are automatically upgraded by the batch upgrading design and the upgrading command is issued through the management interface, so that the working efficiency is greatly improved.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The method disclosed by the embodiment corresponds to the system disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the description of the method part.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided by the present invention, it should be understood that the disclosed system, system and method can be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, systems or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each module may exist alone physically, or two or more modules are integrated into one unit.
Similarly, each processing unit in the embodiments of the present invention may be integrated into one functional module, or each processing unit may exist physically, or two or more processing units are integrated into one functional module.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method, system, device and readable storage medium for batch upgrading of RBD virtual machines provided by the present invention are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (10)

1. A batch upgrading method for RBD virtual machines is characterized by comprising the following steps:
a timer is established in the RBD virtual machine, and the time interval of reading heartbeat information sent by the monitor by the RBD virtual machine is set through the timer;
starting an RBD virtual machine and reading the heartbeat message;
determining whether the RBD virtual machine needs to update the dynamic library or not by analyzing the heartbeat message;
if the RBD virtual machine needs to update the dynamic library, the administrator imports an IP list of the computing node into the monitor through the management interface, sends an update command to the monitor after the import is finished, and controls the monitor to sequentially send heartbeat messages containing the latest version information of the dynamic library to the computing node according to the IP list.
2. The method for upgrading RBD virtual machines according to claim 1, further comprising: and when the dynamic libraries of the RBD virtual machines in all the computing nodes are upgraded to the latest version, displaying the upgrading progress through a management interface.
3. The method for upgrading RBD virtual machines in batches according to claim 1, wherein the establishing of a timer in an RBD virtual machine and the setting of a time interval of heartbeat information sent by an RBD virtual machine reading monitor by the timer specifically include:
a timer is established in the RBD virtual machine, the RBD virtual machine is set to read heartbeat information sent by the monitor every 30 seconds through the timer, a version information field is arranged in the heartbeat information, and the latest dynamic library version information of the RBD virtual machine is stored in the version information field.
4. The method for upgrading RBD virtual machines in batches according to claim 3, wherein the starting of the RBD virtual machines and the reading of the heartbeat messages specifically comprises:
starting an RBD virtual machine and executing a volume opening action;
and after the volume is opened, establishing heartbeat connection with the monitor, and reading heartbeat information sent by the monitor every 30 seconds.
5. The method for upgrading RBD virtual machines in batches according to claim 4, wherein said determining whether the RBD virtual machines need to upgrade the dynamic library by parsing the heartbeat message specifically comprises: reading a version information field of the heartbeat information, acquiring latest dynamic library version information of the RBD virtual machine, and if the latest dynamic library version information of the RBD virtual machine is different from the dynamic library version information in the current RBD virtual machine, determining that the RBD virtual machine needs to upgrade a dynamic library; otherwise, the RBD virtual machine does not need to update the dynamic library.
6. The method for upgrading RBD virtual machines in batches according to claim 5, wherein the monitor sends heartbeat messages containing the latest version information of the dynamic library to the compute nodes in sequence according to the IP list, and specifically comprises:
after receiving the upgrading command, the monitor updates the version information field in the heartbeat information to be sent to the first computing node in the IP list into the latest dynamic library version information of the RBD virtual machine, and after the updating is finished, the monitor sends the heartbeat information to all the computing nodes in the IP list;
after waiting for 90 seconds, the monitor counts the upgrading states of all RBD virtual machines on the first computing node, updates the version information field in the heartbeat information to be sent to the second computing node in the IP list into the latest dynamic library version information of the RBD virtual machines, and sends heartbeat information to all computing nodes in the IP list after the updating is finished; and repeating the steps until version information fields in the heartbeat information sent to all the computing nodes in the IP list are the latest dynamic library version information of the RBD virtual machine.
7. The batch upgrading method for RBD virtual machines according to claim 2, wherein said displaying the upgrading progress through the management interface specifically comprises:
the RBD virtual machine feeds back the upgrading state to the monitor through the heartbeat message, the monitor forwards the upgrading state to the management interface, and the upgrading progress is displayed through the management interface.
8. A system for batch upgrading of RBD virtual machines is characterized by comprising:
the timing module is used for establishing a timer in the RBD virtual machine and setting a time interval for reading heartbeat information sent by the monitor by the RBD virtual machine through the timer;
the heartbeat message acquisition module is used for starting the RBD virtual machine and reading the heartbeat message;
the heartbeat message analysis module is used for determining whether the RBD virtual machine needs to update the dynamic library or not by analyzing the heartbeat message;
the upgrading module is used for controlling the monitor to sequentially send heartbeat messages containing the latest version information of the dynamic library to the computing nodes according to the IP list;
and the display module is used for displaying the upgrading progress through the management interface.
9. The utility model provides a batch upgrading device of RBD virtual machine which characterized in that includes:
the memory is used for storing a batch upgrading program of the RBD virtual machine;
a processor, configured to implement the steps of the batch upgrade method for RBD virtual machines according to any one of claims 1 to 7 when executing the batch upgrade program for RBD virtual machines.
10. A readable storage medium, characterized by: the readable storage medium stores a batch upgrade program of RBD virtual machines, and the batch upgrade program of RBD virtual machines realizes the steps of the batch upgrade method of RBD virtual machines according to any one of claims 1 to 7 when being executed by a processor.
CN202110597893.2A 2021-05-31 2021-05-31 Batch upgrading method, system and device for RBD virtual machines and readable storage medium Pending CN113467814A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110597893.2A CN113467814A (en) 2021-05-31 2021-05-31 Batch upgrading method, system and device for RBD virtual machines and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110597893.2A CN113467814A (en) 2021-05-31 2021-05-31 Batch upgrading method, system and device for RBD virtual machines and readable storage medium

Publications (1)

Publication Number Publication Date
CN113467814A true CN113467814A (en) 2021-10-01

Family

ID=77871716

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110597893.2A Pending CN113467814A (en) 2021-05-31 2021-05-31 Batch upgrading method, system and device for RBD virtual machines and readable storage medium

Country Status (1)

Country Link
CN (1) CN113467814A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114115944A (en) * 2021-11-19 2022-03-01 苏州浪潮智能科技有限公司 Method, system, equipment and storage medium for batch upgrading of RBD (role-based directory service) clients

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114115944A (en) * 2021-11-19 2022-03-01 苏州浪潮智能科技有限公司 Method, system, equipment and storage medium for batch upgrading of RBD (role-based directory service) clients
CN114115944B (en) * 2021-11-19 2024-01-09 苏州浪潮智能科技有限公司 RBD client batch upgrading method, system, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108062367B (en) Data list uploading method and terminal thereof
CN108683718A (en) Method, apparatus, electronic equipment and the storage medium that data increment synchronizes
TW201814609A (en) Information pushing
CN107103004A (en) Data processing method, apparatus and system in webpage
CN111866160A (en) Multi-machine control method, device, equipment and storage medium
CN109062592A (en) A kind of method and system that game numerical value is synchronous
CN113467814A (en) Batch upgrading method, system and device for RBD virtual machines and readable storage medium
CN109525466A (en) Back end monitor method and device
CN112044061B (en) Game picture processing method and device, electronic equipment and storage medium
CN112087327B (en) Information state acquisition method and apparatus, storage medium, and electronic apparatus
CN113449031A (en) Data synchronization management method and device and server
CN111092774A (en) Configuration method and equipment of acquisition gateway
CN112069190B (en) Batch data acquisition method, device, equipment and medium
CN115270743A (en) Form data processing method and device
CN114356970B (en) Storage system resource caching method and device
CN113792058B (en) Index data processing method and device, electronic equipment and storage medium
CN115080325A (en) PSU (power system unit) testing method, system, device and medium based on PDU (protocol data Unit)
CN112787868B (en) Information synchronization method and device
CN213581775U (en) Intelligent home system
CN114024862A (en) Physical switch visual configuration method, system and device
CN111459484B (en) Method for simulating back-end data during separate development of front end and back end of webpage
CN114827967A (en) Software updating method, Bluetooth device and storage medium
CN111831380A (en) Task execution method and device, storage medium and electronic device
CN114048206A (en) Configuration consistency checking method, system and device for large-scale cluster
CN114020503A (en) Optimization method, system and device for transparent fault switching of distributed file system

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