CN113253931B - Method suitable for automatically switching and using cloud data disk for rabbitmq - Google Patents

Method suitable for automatically switching and using cloud data disk for rabbitmq Download PDF

Info

Publication number
CN113253931B
CN113253931B CN202110553587.9A CN202110553587A CN113253931B CN 113253931 B CN113253931 B CN 113253931B CN 202110553587 A CN202110553587 A CN 202110553587A CN 113253931 B CN113253931 B CN 113253931B
Authority
CN
China
Prior art keywords
rabbitmq
instance
disk
processor
data
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
CN202110553587.9A
Other languages
Chinese (zh)
Other versions
CN113253931A (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.)
Unicloud Technology Co Ltd
Original Assignee
Unicloud 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 Unicloud Technology Co Ltd filed Critical Unicloud Technology Co Ltd
Priority to CN202110553587.9A priority Critical patent/CN113253931B/en
Publication of CN113253931A publication Critical patent/CN113253931A/en
Application granted granted Critical
Publication of CN113253931B publication Critical patent/CN113253931B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Abstract

The invention provides a method suitable for automatically switching and using a cloud data disk by a rabbitmq, which comprises the following steps: s1, judging whether the user configures the data disc for the example by UCA, and adding a dataDisk field in the delivery list for marking the data disc information; s2, the calculation layer receives the delivery order, starts to search and create the corresponding instance, and writes the delivery order information into the appointed position in the instance; s3, checking whether the delivery list has a data disc through the agent, and if so, continuing to execute the switching operation; s4, firstly calling an fdisk command through an agent to format the system disk, and hanging the disk under an incoming/data directory; s5, modifying the RabbitMQ data storage position through agent, and restarting the instance. The invention has the beneficial effects that: a method suitable for automatically switching and using a cloud data disk by a rabbitmq can automatically judge whether a user configures a system disk for an example; if the data disk exists, mounting and switching of the data disk can be automatically realized.

Description

Method suitable for automatically switching and using cloud data disk for rabbitmq
Technical Field
The invention belongs to the technical field of public clouds, and particularly relates to a method suitable for automatically switching and using a cloud data disk for rabbitmq.
Background
The invention is suitable for a scheme that RabbitMQ automatically switches a cloud data disk, solves the problem that the RabbitMQ occupies the space of a system hard disk, and is similar to an Alice cloud switching scheme.
Disclosure of Invention
In view of the above, the present invention is directed to a method for automatically switching to use a cloud data disk for rabbitmq, so as to solve the above disadvantages.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a method for automatically switching to use a cloud data disk by rabbitmq comprises the following steps:
s1, judging whether the user configures the data disc for the example by UCA, and adding a dataDisk field in the delivery list for marking the data disc information;
s2, the calculation layer receives the delivery order, starts to search and create the corresponding instance, and writes the delivery order information into the appointed position in the instance;
s3, checking whether the delivery list has a data disc through the agent, and if so, continuing to execute the switching operation;
s4, firstly calling an fdisk command through an agent to format the system disk, and hanging the disk under an incoming/data directory;
s5, modifying the RabbitMQ data storage position through agent, and restarting the instance.
Further, before proceeding to steps S1-S5, the following definitions need to be made:
the creation instruction issued by creating a RabbitMQ defines "delivery order";
the user creates a program for clicking a creation button on the cloud service and issuing a delivery order, which is defined as 'UCA';
a program for processing a delivery order is defined as a "computation layer";
the RabbitMQ created is defined as an 'instance';
the program that responds to the system level operation in the example is defined as "agent";
the target cloud data disk needing switching is defined as a data disk, and the source hard disk is defined as a system disk.
Further, in step S1, when the user creates an instance, the rabbitmq name created by the user has a delivery list, which includes the specification of the user configured instance, including the number of CPU cores, the size of the memory, the number of nodes, and whether the data disk exists and the size of the data disk.
Further, step S2 starts to find a new instance in the process of creating a corresponding instance, and if the new instance is created, there is no process of finding a corresponding instance, which is just creation; if the existing instance is modified, the management network IP, the user name, the password and other information of the corresponding instance are inquired in a database through the instance ID in the delivery list.
An electronic device comprises a processor and a memory which is connected with the processor in a communication mode and is used for storing executable instructions of the processor, wherein the processor is used for executing the method suitable for rabbitmq automatic switching to use the cloud data disk.
A server comprising at least one processor, and a memory communicatively coupled to the processor, the memory storing instructions executable by the at least one processor, the instructions being executable by the processor to cause the at least one processor to perform a method adapted for rabbitmq automatic switching use of cloud data disks.
A computer-readable storage medium storing a computer program which, when executed by a processor, implements a method for automatically switching use of a cloud data disk for rabbitmq.
Compared with the prior art, the method for automatically switching to use the cloud data disk by the rabbitmq has the following beneficial effects:
(1) the method for automatically switching the use of the cloud data disk suitable for rabbitmq can automatically judge whether a user configures a system disk for an example;
(2) according to the method for automatically switching the rabbitmq to use the cloud data disk, if the data disk exists, mounting and switching of the data disk can be automatically realized;
(3) the method for automatically switching the use of the cloud data disk by the rabbitmq does not influence the data integrity in the operation process;
(4) the method for automatically switching and using the cloud data disk suitable for rabbitmq effectively avoids downtime caused by too much occupied hard disk space of the example.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an embodiment of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a schematic diagram of a method for automatically switching to use a cloud data disk for rabbitmq according to an embodiment of the present invention.
Detailed Description
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
A method for automatically switching to use a cloud data disk by rabbitmq comprises the following steps:
s1, judging whether the user configures the data disc for the example by UCA, and adding a dataDisk field in the delivery list for marking the data disc information;
s2, the calculation layer receives the delivery order, starts to search and create the corresponding instance, and writes the delivery order information into the appointed position in the instance;
s3, checking whether the delivery list has the data disc through the agent, if so, continuing to execute the switching operation, and checking whether the delivery list has the data disc through the agent:
the delivered delivery order is in a JSON format, and in order to realize JSON multi-level searching, a quick query method is realized:
Figure BDA0003076259300000041
Figure BDA0003076259300000051
in this way, information of the data disc in the delivery order can be quickly acquired, for example, the example delivery order is as follows:
Figure BDA0003076259300000052
Figure BDA0003076259300000061
Figure BDA0003076259300000071
Figure BDA0003076259300000081
the code of the data disc obtained by the method is as follows: dev. get ("deliver units. resources. test-redis-11390.properties. nodes. datadisk"), that is, the hierarchical relationship, compared with the traditional obtaining method, the method can obtain the parameters in one step, and has high efficiency, good fault tolerance and neat code.
S4, firstly calling an fdisk command through an agent to format the system disk, and hanging the disk under an incoming/data directory;
s5, modifying the RabbitMQ data storage position through agent, and restarting the instance.
Before proceeding to steps S1-S5, the following definitions need to be made:
the creation instruction issued by creating a RabbitMQ defines "delivery order";
the user creates a program for clicking a creation button on the cloud service and issuing a delivery order, which is defined as 'UCA';
a program for processing a delivery order is defined as a "computation layer";
the RabbitMQ created is defined as an 'instance';
the program that responds to the system level operation in the example is defined as "agent";
the target cloud data disk needing switching is defined as a data disk, and the source hard disk is defined as a system disk.
In step S1, when the user creates an instance, the rabbitmq name created by the user is a delivery order, which includes the specification of the instance configured by the user, including the number of CPU cores, the size of the memory, the number of nodes, and whether or not the data disk exists and the size of the data disk.
Step S2, if an instance is newly created in the process of finding and creating a corresponding instance, there is no process of finding and creating a corresponding instance, but only creating; if the existing instance is modified, the management network IP, the user name, the password and other information of the corresponding instance are inquired in a database through the instance ID in the delivery list.
An electronic device comprises a processor and a memory which is connected with the processor in a communication mode and is used for storing executable instructions of the processor, wherein the processor is used for executing the method suitable for rabbitmq automatic switching to use the cloud data disk.
A server comprising at least one processor, and a memory communicatively coupled to the processor, the memory storing instructions executable by the at least one processor, the instructions being executable by the processor to cause the at least one processor to perform a method adapted for rabbitmq automatic switching use of cloud data disks.
A computer-readable storage medium storing a computer program which, when executed by a processor, implements a method for automatically switching use of a cloud data disk for rabbitmq.
Those of ordinary skill in the art will appreciate that the elements and method steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of clearly illustrating the 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 several embodiments provided in the present application, it should be understood that the disclosed method and system may be implemented in other ways. For example, the above described division of elements is merely a logical division, and other divisions may be realized, for example, multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not executed. The units may or may not be physically separate, and components displayed as units may or may not be physical units, that is, 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 of the present invention.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present invention, and they should be construed as being included in the following claims and description.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (7)

1. A method for automatically switching to use a cloud data disk for rabbitmq is characterized by comprising the following steps:
s1, judging whether the user configures the data disc for the instance through UCA, and adding a dataDisk field in the delivery list for marking the data disc information, wherein the dataDisk is the data disc;
s2, the calculation layer receives the delivery order, starts to search and create the corresponding instance, and writes the delivery order information into the appointed position in the instance;
s3, checking whether the delivery list has a data disc through the agent, and if so, continuing to execute the switching operation;
s4, firstly calling an fdisk command through an agent to format the system disk, and hanging the disk under an incoming/data directory;
s5, modifying the RabbitMQ data storage position through agent, and restarting the instance.
2. The method for automatically switching the use of the cloud data disk for rabbitmq according to claim 1, wherein the following definitions are required before steps S1-S5 are performed:
the creation instruction issued by creating a RabbitMQ defines "delivery order";
the user creates a program for clicking a creation button on the cloud service and issuing a delivery order, which is defined as 'UCA';
a program for processing a delivery order is defined as a "computation layer";
the RabbitMQ created is defined as an 'instance';
the program that responds to the system level operation in the example is defined as "agent";
the target cloud data disk needing switching is defined as a data disk, and the source hard disk is defined as a system disk.
3. The method for automatically switching the use of the cloud data disk for rabbitmq according to claim 1, wherein: in step S1, when the user creates an instance, the rabbitmq name created by the user is a delivery order, which includes the specification of the instance configured by the user, including the number of CPU cores, the size of the memory, the number of nodes, and whether or not the data disk exists and the size of the data disk.
4. The method for automatically switching the use of the cloud data disk for rabbitmq according to claim 1, wherein: step S2, if an instance is newly created in the process of finding and creating a corresponding instance, there is no process of finding and creating a corresponding instance, but only creating; if the existing instance is modified, the management network IP, the user name, the password and other information of the corresponding instance are inquired in a database through the instance ID in the delivery list.
5. An electronic device comprising a processor and a memory communicatively coupled to the processor and configured to store processor-executable instructions, wherein: the processor is used for executing a method suitable for rabbitmq automatic switching to use the cloud data disk as set forth in any one of the preceding claims 1-4.
6. A server, characterized by: comprising at least one processor, and a memory communicatively coupled to the processor, the memory storing instructions executable by the at least one processor, the instructions being executable by the processor to cause the at least one processor to perform a method for rabbitmq automatic switching use of cloud data disks as recited in any of claims 1-4.
7. A computer-readable storage medium storing a computer program, characterized in that: the computer program, when executed by a processor, implements a method for automatically switching between cloud data disks for rabbitmq use as claimed in any one of claims 1 to 4.
CN202110553587.9A 2021-05-20 2021-05-20 Method suitable for automatically switching and using cloud data disk for rabbitmq Active CN113253931B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110553587.9A CN113253931B (en) 2021-05-20 2021-05-20 Method suitable for automatically switching and using cloud data disk for rabbitmq

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110553587.9A CN113253931B (en) 2021-05-20 2021-05-20 Method suitable for automatically switching and using cloud data disk for rabbitmq

Publications (2)

Publication Number Publication Date
CN113253931A CN113253931A (en) 2021-08-13
CN113253931B true CN113253931B (en) 2022-04-05

Family

ID=77183165

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110553587.9A Active CN113253931B (en) 2021-05-20 2021-05-20 Method suitable for automatically switching and using cloud data disk for rabbitmq

Country Status (1)

Country Link
CN (1) CN113253931B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9634886B2 (en) * 2013-03-14 2017-04-25 Alcatel Lucent Method and apparatus for providing tenant redundancy
CN106557269A (en) * 2015-09-29 2017-04-05 中兴通讯股份有限公司 The method and apparatus of storage cloud disk resource
CN107566511A (en) * 2017-09-20 2018-01-09 郑州云海信息技术有限公司 A kind of method and cloud storage system for realizing cloud storage
US10579449B1 (en) * 2018-11-02 2020-03-03 Dell Products, L.P. Message queue architectures framework converter
CN112732674B (en) * 2021-01-08 2022-08-19 烽火通信科技股份有限公司 Cloud platform service management method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN113253931A (en) 2021-08-13

Similar Documents

Publication Publication Date Title
JP4806357B2 (en) Method, system, and program for identifying, reserving, and logically provisioning resources in a provisioning data processing system
US8762931B2 (en) Generating an encoded package profile
JP2018088293A (en) Database system providing single tenant environment and a plurality of tenant environments
EP2989543B1 (en) Method and device for updating client
US20150215376A1 (en) Systems and methods for deploying legacy software in the cloud
JP2007503628A (en) Fast application notification in clustered computing systems
US10158709B1 (en) Identifying data store requests for asynchronous processing
CN107666493B (en) Database configuration method and equipment thereof
US11347808B1 (en) Dynamically-adaptive bloom-filter
CN103607424A (en) Server connection method and server system
CN111385370B (en) ID allocation method, device, storage medium and ID allocation system
US8713135B1 (en) Managing imaging of computing devices
CN109150608A (en) Interface service upgrade method and system for voice dialogue platform
US7882232B2 (en) Rapid resource provisioning with automated throttling
CN111147605B (en) Service registration method, device and equipment
CN113253931B (en) Method suitable for automatically switching and using cloud data disk for rabbitmq
CN106686031B (en) Method and device for upgrading application to SaaS mode
US11281666B2 (en) Interception of database queries for delegation to an in memory data grid
CN103345500A (en) Data processing method and data processing device
CN114564211A (en) Cluster deployment method, cluster deployment device, equipment and medium
CN111857955A (en) Method for automatically constructing and updating resource configuration information in heterogeneous cloud environment
CN110019113B (en) Database service processing method and database server
CN108701035A (en) The management of application attribute
CN107209882B (en) Multi-stage de-registration for managed devices
US20240028346A1 (en) Linking kubernetes resources with underlying cloud infrastructure

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