CN117112140A - Docker container migration system based on cloud - Google Patents

Docker container migration system based on cloud Download PDF

Info

Publication number
CN117112140A
CN117112140A CN202311160271.9A CN202311160271A CN117112140A CN 117112140 A CN117112140 A CN 117112140A CN 202311160271 A CN202311160271 A CN 202311160271A CN 117112140 A CN117112140 A CN 117112140A
Authority
CN
China
Prior art keywords
container
migration
data
unit
migrated
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
CN202311160271.9A
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.)
Fujian Kexing Thai Data Technology Co ltd
Original Assignee
Fujian Kexing Thai 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 Fujian Kexing Thai Data Technology Co ltd filed Critical Fujian Kexing Thai Data Technology Co ltd
Priority to CN202311160271.9A priority Critical patent/CN117112140A/en
Publication of CN117112140A publication Critical patent/CN117112140A/en
Pending legal-status Critical Current

Links

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
    • 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/4557Distribution of virtual machine instances; Migration and load balancing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A Docker container migration system based on cloud relates to the technical field of Docker, and comprises: the system comprises a container data positioning module, a container environment adjusting module, a container migration module and a container management module, wherein the container data positioning module is used for positioning data of a container in a source server, meanwhile, the environment of a target server is adjusted, in the migration process, migrated data are verified, rollback and repair are carried out when problems occur so as to keep the integrity and accuracy of the migrated data to avoid easy migration failure after data errors, on the other hand, when the migrated data are normal, the migrated data are cleared according to the positioning of the data in a list, no data remain in the source server after the migration is completed, and the problems that the migration failure is easy to occur after the data errors occur in the conventional cloud-based Docker container thermal migration and the container operation error is caused by the environment deletion of the target server are solved.

Description

Docker container migration system based on cloud
Technical Field
The application relates to the technical field of dockers, in particular to a Docker container migration system based on a cloud.
Background
Cloud-based Docker refers to running Docker containers on a cloud computing platform, and deploying, managing and maintaining the containers through infrastructure and services provided by the cloud platform. The method has the advantages that development, deployment and management of the application program are organically combined with cloud computing resources, more efficient and flexible application program development and deployment processes are realized, static migration and dynamic migration can be divided when a Docker container in a cloud end is migrated, the container of a source server is required to be closed immediately, so that the whole cloud service can be suspended, the dynamic migration is also called thermal migration, the client access can be ensured not to be interrupted, normal use can still be realized in the migration process, in the thermal migration process, migration failure is easy to occur after data errors occur in the migration process due to the fact that the container is still normally provided with service, meanwhile, the problem that the container is in error due to the fact that the environment of a target server is lost in the container migration is solved, and therefore the problem that how to improve the stability of migration and keep normal operation is solved.
Disclosure of Invention
The embodiment of the application provides a cloud-based Docker container migration system, which is used for solving the problem of how to improve migration stability so as to keep successful container migration and normal operation.
A cloud-based Docker container migration system, comprising:
the container data positioning module is used for positioning the data of the container to be migrated and generating a list;
the container environment adjusting module is used for adjusting the configuration environment of the migration target server according to the parameters of the migration container;
the container migration module is used for migrating the container to be migrated in the source server to the target server according to the list;
and the container management module is used for managing the migration process of the container so as to keep the container working normally.
Further, the container data positioning module includes:
the scanning unit is used for scanning the data of the container to be migrated;
the data positioning unit is used for positioning the scanned data of the container to be migrated;
and the list management unit is used for generating a data list and managing the list.
Further, the container environment adjustment module includes:
the container environment scanning unit is used for scanning the environment of the container to be migrated;
and the container environment adjusting unit is used for adjusting the environment in the target server.
Further, the container migration module includes:
the migration unit is used for migrating the container to be migrated to the target server;
the detection unit is used for detecting the migration process;
and the cleaning unit is used for cleaning the migration completion part in the source server.
Furthermore, the migration unit migrates the containers in a distributed and parallel migration mode.
Further, the number of distributed parallelism can be dynamically adjusted according to the container state.
Further, the container management module includes:
the bridging unit is used for bridging the container migrated in the source server with the target server so as to keep the normal operation of the container;
the container monitoring unit is used for carrying out rollback on the migration process when the detection unit detects that the migration data is abnormal;
and the repairing unit is used for repairing the abnormal part of the migration data, and continuing migration after the repairing is completed.
The technical scheme provided by the embodiment of the application has the beneficial effects that at least:
according to the method, the device and the system, the container in the source server is subjected to data positioning, the environment of the target server is regulated, the migrated data is verified in the migration process, rollback and repair are carried out when problems occur so as to keep the migrated data intact and accurate and avoid migration failure easily caused by data errors, on the other hand, when the migrated data are normal, the migrated data are removed according to the positioning of the data in the list, no data remain in the source server after the migration is completed, and the problems that the migration failure easily occurs after the data errors occur in the conventional cloud-based Docker container thermal migration and the container operation errors are caused by the target server environment loss are solved.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
The technical scheme of the application is further described in detail through the drawings and the embodiments.
Drawings
The accompanying drawings are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate the application and together with the embodiments of the application, serve to explain the application. In the drawings:
fig. 1 is a schematic structural diagram of a cloud-based Docker container migration system according to an embodiment of the present disclosure;
fig. 2 is a flow chart of a cloud-based Docker container migration method according to an embodiment of the present application.
Reference numerals:
1. a container data positioning module; 11. a scanning unit; 12. a data positioning unit; 13. a list management unit; 2. a container environment adjustment module; 21. a container environment scanning unit; 22. a container environment adjustment unit; 3. a container migration module; 31. a migration unit; 32. a detection unit; 33. a cleaning unit; 4. a container management module; 41. a bridging unit; 42. a container monitoring unit; 43. and (5) repairing the unit.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Example 1
As shown in fig. 1, an embodiment of the present application provides a cloud-based Docker container migration system, including: a container data positioning module 1, a container environment adjusting module 2, a container migration module 3 and a container management module 4.
The container data positioning module 1 is used for positioning the data of the container to be migrated and generating a list, and the container data positioning module 1 comprises a scanning unit 11, a data positioning unit 12 and a list management unit 13;
specifically, the scanning unit 11 is configured to scan data of the container to be migrated;
in one embodiment, the scanning unit 11 detects the container, and scans out parameters of all data of the container, including path and occupied space size, etc.;
specifically, the data positioning unit 12 is configured to position the scanned data of the container to be migrated;
in one embodiment, the path of all data of the container is extracted according to the scanning result to obtain the positioning information of all data;
specifically, the manifest management unit 13 is configured to generate a data manifest and manage the manifest;
in one embodiment, a list of all data is generated based on the location information of all data and the corresponding parameters.
The container environment adjusting module 2 is used for adjusting the configuration environment of the migration target server according to the parameters of the migration container;
specifically, the container environment adjustment module 2 includes a container environment scanning unit 21 and a container environment adjustment unit 22;
specifically, the container environment scanning unit 21 is configured to scan an environment of a container to be migrated;
in one embodiment, the container environment scanning unit 21 scans the environment of the container to be migrated to obtain the environment library parameters;
in another example, the container environment scanning unit 21 scans the environment of the container to be migrated to obtain the first environment library parameter, and the container environment scanning unit 21 scans the environment in the target server to obtain the second environment library parameter.
Specifically, the container environment adjustment unit 22 is configured to adjust an environment in the target server;
in one embodiment, the environment in the target server is adjusted by obtaining environment library parameters after scanning according to the environment of the container to be migrated;
in another embodiment, a different portion of the second environmental library parameter than the first environmental library parameter is identified and adjusted to be consistent with the first environmental library parameter.
The container migration module 3 is configured to migrate a container to be migrated in the source server to the target server according to the manifest, where the container migration module 3 includes a migration unit 31, a detection unit 32, and a cleaning unit 33;
specifically, the migration unit 31 is configured to migrate a container to be migrated to a target server;
in one embodiment, the migration unit 31 migrates the container to be migrated in the source server to the target server according to the manifest, in this process, the migration unit 31 divides the manifest into a plurality of migration blocks, and sequentially migrates according to the order of the blocks;
in another embodiment, the migration unit 31 migrates the container to be migrated in the source server to the target server according to the manifest, in which process, the migration unit 31 divides the manifest into a plurality of migration blocks, and migrates according to the dynamic status of the blocks;
for example, when there are blocks and no writing and reading operations, the migration unit 31 preferentially migrates the blocks, and during the migration process, multiple blocks can be migrated simultaneously, that is, the container is migrated in a distributed and parallel migration manner;
in the above example, when the container is migrated in a distributed parallel migration manner, the number of distributed parallel (the number of migration blocks at the same time) is adjusted according to the current state of the container, which specifically includes the container data interaction amount and the resource occupation amount, when the data interaction amount and the resource occupation amount are high, the distributed parallel number is reduced, and when the data interaction amount and the resource occupation amount are low, the distributed parallel number is increased, so as to avoid the influence on the service provided by the current Docker container caused by occupying excessive resources and reduce the probability of data loss or error.
Specifically, the detecting unit 32 is configured to detect a migration process, so as to find that data in the migration process is abnormal;
specifically, the cleaning unit 33 is configured to clean the migration completed portion in the source server;
it should be noted that, after the data is migrated to the target server and the new data is not stored in the current data location to be cleaned, the data in the current location is cleaned.
The container management module 4 is configured to manage a migration process of the container so as to keep the container working normally, where the container management module 4 includes a bridge unit 41, a container monitoring unit 42, and a repairing unit 43;
specifically, the bridging unit 41 is configured to bridge between the container migrated in the source server and the target server, so as to maintain the normal operation of the container;
in one example, the container to be migrated in the source server is defined as a container a, where the container a includes an unmigrated part container a1 and a migrated part container a2, and the container a2 is on the target server, and during the operation of the Docker container, the bridging unit 41 bridges the container a1 with the container a2 to implement the complete function of the container a until the container a is completely migrated to the target server.
Specifically, when the detection unit 32 detects that the migration data is abnormal, the container monitoring unit 42 rolls back the migration process, and the repairing unit 43 is configured to repair the abnormal portion of the migration data, and continue to migrate after the repair is completed;
in one example, a container to be migrated in the source server is defined as a container a, the container a includes an unmigrated partial container a1 and a migrated partial container a2, the container a2 is on the target server, a fixed period is set as a cache in the migration process of the Docker container, when the current migration data is detected to be abnormal, the current abnormal data on the target server is cleared and returned to the abnormal data, the migration is performed in the source server again, and the repair can be automatically performed when the data is in error so as to avoid the migration failure.
According to the method, the data positioning is carried out on the Docker container in the source server through the container data positioning module 1, the container environment adjusting module 2 can adjust the environment of the target server, in the process of migrating the Docker container by the container migration module 3, migrated data are verified, rollback and repair are carried out when problems occur, so that the migrated data are kept complete and accurate to avoid migration failure easily caused by data errors, on the other hand, when the migrated data are normal, the migrated data are cleared according to the positioning of the data in the list, no data remain in the source server after migration is completed, and the problems that the migration failure easily occurs after the data errors occur in the conventional cloud-based Docker container and the container operation errors are caused by the environment deletion of the target server are solved.
Example two
As shown in fig. 2, an embodiment of the present application provides a cloud-based dock container migration method, which includes the following steps:
s1, scanning a Docker container to be migrated in a source server, positioning all data of the Docker container and generating a list;
s2, dividing the list into a plurality of migration blocks, and preferentially migrating the blocks when writing and reading operations are not performed on the migration blocks;
s3, setting a fixed period as a cache, detecting the migrated data in the migration process, and if the data in the migration process is abnormal, removing the current abnormal data on the target server and returning to the abnormal data before the data is migrated in the source server again;
s4, after the data is migrated to the target server and the new data is not stored in the current data position to be cleaned, cleaning the data in the current position.
According to the cloud-based Docker container migration method provided by the application, the data is positioned in the container in the source server, the environment of the target server is regulated, in the migration process, the migrated data is verified, rollback and repair are carried out when problems occur so as to keep the migrated data intact and accurate to avoid easy migration failure after data errors, on the other hand, when the migrated data are normal, the migrated data are cleared according to the positioning of the data in the list, no data remain in the source server after the migration is completed, the migration speed is high by adopting a distributed parallel migration mode, and the problems that the existing cloud-based Docker container is easy to cause migration failure after data errors occur and the container operation errors are caused by the environmental loss of the target server are solved
It should be understood that the specific order or hierarchy of steps in the processes disclosed are examples of exemplary approaches. Based on design preferences, it is understood that the specific order or hierarchy of steps in the processes may be rearranged without departing from the scope of the present disclosure. The accompanying method claims present elements of the various steps in a sample order, and are not meant to be limited to the specific order or hierarchy presented.
In the foregoing detailed description, various features are grouped together in a single embodiment for the purpose of streamlining the disclosure. This method of disclosure is not to be interpreted as reflecting an intention that the claimed embodiments of the subject matter require more features than are expressly recited in each claim. Rather, as the following claims reflect, application lies in less than all features of a single disclosed embodiment. Thus the following claims are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate preferred embodiment of this application.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. 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 disclosure.
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 RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. The processor and the storage medium may reside as discrete components in a user terminal.
For a software implementation, the techniques described in this disclosure may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described herein. These software codes may be stored in memory units and executed by processors. The memory unit may be implemented within the processor or external to the processor, in which case it can be communicatively coupled to the processor via various means as is known in the art.
The foregoing description includes examples of one or more embodiments. It is, of course, not possible to describe every conceivable combination of components or methodologies for purposes of describing the aforementioned embodiments, but one of ordinary skill in the art may recognize that many further combinations and permutations of various embodiments are possible. Accordingly, the embodiments described herein are intended to embrace all such alterations, modifications and variations that fall within the scope of the appended claims. Furthermore, as used in the specification or claims, the term "comprising" is intended to be inclusive in a manner similar to the term "comprising," as interpreted when employed as a transitional word in a claim. Furthermore, any use of the term "or" in the specification of the claims is intended to mean "non-exclusive or".

Claims (7)

1. A cloud-based Docker container migration system, comprising:
the container data positioning module is used for positioning the data of the container to be migrated and generating a list;
the container environment adjusting module is used for adjusting the configuration environment of the migration target server according to the parameters of the migration container;
the container migration module is used for migrating the container to be migrated in the source server to the target server according to the list;
and the container management module is used for managing the migration process of the container so as to keep the container working normally.
2. The cloud-based Docker container migration system of claim 1, wherein the container data positioning module comprises:
the scanning unit is used for scanning the data of the container to be migrated;
the data positioning unit is used for positioning the scanned data of the container to be migrated;
and the list management unit is used for generating a data list and managing the list.
3. The cloud-based Docker container migration system of claim 1, wherein the container environment adjustment module comprises:
the container environment scanning unit is used for scanning the environment of the container to be migrated;
and the container environment adjusting unit is used for adjusting the environment in the target server.
4. The cloud-based Docker container migration system of claim 1, wherein the container migration module comprises:
the migration unit is used for migrating the container to be migrated to the target server;
the detection unit is used for detecting the migration process;
and the cleaning unit is used for cleaning the migration completion part in the source server.
5. The cloud-based Docker container migration system of claim 4, wherein the migration unit migrates containers in a distributed and parallel migration manner.
6. The cloud-based Docker container migration system of claim 5, wherein the number of distributed parallelism is dynamically adjustable based on container status.
7. The cloud-based Docker container migration system of claim 4, wherein the container management module comprises:
the bridging unit is used for bridging the container migrated in the source server with the target server so as to keep the normal operation of the container;
the container monitoring unit is used for carrying out rollback on the migration process when the detection unit detects that the migration data is abnormal;
and the repairing unit is used for repairing the abnormal part of the migration data, and continuing migration after the repairing is completed.
CN202311160271.9A 2023-09-11 2023-09-11 Docker container migration system based on cloud Pending CN117112140A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311160271.9A CN117112140A (en) 2023-09-11 2023-09-11 Docker container migration system based on cloud

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311160271.9A CN117112140A (en) 2023-09-11 2023-09-11 Docker container migration system based on cloud

Publications (1)

Publication Number Publication Date
CN117112140A true CN117112140A (en) 2023-11-24

Family

ID=88802086

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311160271.9A Pending CN117112140A (en) 2023-09-11 2023-09-11 Docker container migration system based on cloud

Country Status (1)

Country Link
CN (1) CN117112140A (en)

Similar Documents

Publication Publication Date Title
US20060282471A1 (en) Error checking file system metadata while the file system remains available
CN102929750B (en) Nonvolatile media dirty region tracking
JPH09274541A (en) Storage device, control method for the same, storage system and control method for the same
CN108319617B (en) Method and device for determining master-slave difference of database and switching control method and device
US7730358B2 (en) Stress testing method of file system
US11726970B2 (en) Incremental transfer of database segments
CN111125040A (en) Method, apparatus and storage medium for managing redo log
CN109753378A (en) A kind of partition method of memory failure, device, system and readable storage medium storing program for executing
US6438714B1 (en) Method and apparatus for testing large arrays of storage devices
CN117112140A (en) Docker container migration system based on cloud
CN115359834B (en) Disk arbitration region detection method, device, equipment and readable storage medium
US10586039B2 (en) Information processing apparatus
US11682429B2 (en) System and method for write-retry management
US20100169572A1 (en) Data storage method, apparatus and system for interrupted write recovery
CN113470725B (en) Method and device for testing dynamic random access memory
CN111930707B (en) Method and system for correcting drive letter of windows cloud migration
JP3841595B2 (en) Storage device alternation processing time judgment test method
CN114780208A (en) Method, system, device and storage medium for verifying backup validity of multi-platform virtual machine
CN109344011B (en) Data backup method and device
US20210342085A1 (en) Method for storage management, device and computer program product
CN109947365B (en) Distributed storage data verification method and device
KR102468381B1 (en) Apparatus and method for checking storage medium for parallelism of storage devices and computer program for the same
CN112799711B (en) Method and device for merging container images, computer equipment and storage medium
CN110908602A (en) Data writing method, device, equipment and storage medium of distributed storage system
CN112562774B (en) Storage device mounting method and device, computer device and storage medium

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