CN107515782A - Implementation method of the container across host migration under a kind of Docker environment - Google Patents

Implementation method of the container across host migration under a kind of Docker environment Download PDF

Info

Publication number
CN107515782A
CN107515782A CN201710617032.XA CN201710617032A CN107515782A CN 107515782 A CN107515782 A CN 107515782A CN 201710617032 A CN201710617032 A CN 201710617032A CN 107515782 A CN107515782 A CN 107515782A
Authority
CN
China
Prior art keywords
container
host
main frame
docker
source
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
CN201710617032.XA
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.)
BEIJING SKYCLOUD RONGCHUANG SOFTWARE TECHNOLOGY Co Ltd
Original Assignee
BEIJING SKYCLOUD RONGCHUANG SOFTWARE 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 BEIJING SKYCLOUD RONGCHUANG SOFTWARE TECHNOLOGY Co Ltd filed Critical BEIJING SKYCLOUD RONGCHUANG SOFTWARE TECHNOLOGY Co Ltd
Priority to CN201710617032.XA priority Critical patent/CN107515782A/en
Publication of CN107515782A publication Critical patent/CN107515782A/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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • G06F9/4856Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0709Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a distributed system consisting of a plurality of standalone computer nodes, e.g. clusters, client-server systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions

Landscapes

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

Abstract

The invention discloses container under a kind of Docker environment across the implementation method of host migration, belong to cloud computing platform management domain.The present invention is analyzed by being realized to Docker container platforms, determine preserving type and lookup mode of the container file system in host work catalogue, by in the file system migration of container to new main frame, and the incidence relation of container and mirror image is re-established on new main frame, so that container newly-built on new main frame possesses the former various resources of container identical, migrated by container, when main frame breaks down in container cluster, the container of carrier state on failed host is dispatched on other main frames and run, and ensure that the operation completed in the container is still effective, improve the availability of container cluster.

Description

Implementation method of the container across host migration under a kind of Docker environment
Technical field
The invention belongs to cloud computing platform management domain, more particularly to container under a kind of Docker environment across host migration Implementation method.
Background technology
Cloud computing is a kind of pattern paid by usage amount, and this pattern provides network available, easily, on demand and visited Ask, into configurable computing resources shared pool (resource includes network, server, storage, application software, service), these moneys Source can quickly be provided, and need to only put into seldom management work, or carry out seldom interact with service supplier.With cloud meter That calculates popularizes, and enterprise is successively by business migration to cloud platform.Container technique using Docker as representative, which has, starts speed The features such as degree is fast, and resource utilization is high, and performance cost is small, is used widely in cloud platform at present.
Docker uses client-server (C/S) architecture mode, is held using long-range API to manage and create Docker Device.Docker containers are created by Docker mirror images.The resource that Docker containers need mainly includes CPU, internal memory, container mirror Picture, network and storage volume etc..Docker creates container by dockerrun orders, and the order can first check incoming upon execution The legitimacy of parameter, and the various resources needed according to incoming parametric distribution container, and start after container success is created and hold Device.File system in container is realized by increasing by one layer of writable layer in read-only mirror image file system.Docker passes through network Plug-in unit realizes across the main frame unified management of capacitor network, and data file caused by user program is preserved by storage volume.Docker Container main information is stored under its working directory.
At present in Docker container migrating technology, if want to save user is operated in a reservoir, it is necessary to which system is first Container is saved as into mirror image, or preserves the checkpoint (Checkpoint) of container, then starts container on new main frame and completes to move Move.But above two method all consumes and preserves substantial amounts of computing resource and storage resource.If main frame breaks down suddenly, also Do not export mirror image or preserve checkpoint, will be unable to realize the migration that container is stateful.Docker and its management cluster are real at present Existing technology praises highly container stateless, even if main frame breaks down, the container run thereon also can be at any time in other main frame weights Open, this requires that container does not store the related data of any state in itself.
The content of the invention
In view of the drawbacks described above of prior art, the technical problems to be solved by the invention are to provide a kind of in main frame appearance In the case of failure, container is moved on new main frame, and modification that user carried out in former container or configuration can be retained Method.
To achieve the above object, the invention provides container under a kind of Docker environment across host migration implementation method, Comprise the following steps:
Step 1, according to source host title, determine the working directory position of source host container;
Step 2, according to source container ID, determine source container writable layer ID;
Step 3, according to storage driving title, determine directory location where the file of change is actually occurred in the writable layer of source;
Step 4, catalogue where the file for actually occurring change is packaged into tar files;
Step 5, the working directory position for determining destination host container;
Step 6, according to target container ID, determine target container writable layer ID;
Step 7, according to storage driving title, determine catalogue position where the file of change is actually occurred in target writable layer Put;
Step 8, file in step 7 deleted, and the tar files generated in step 4 are unpacked to destination folder;
Step 9, start target container.
Preferably, after the step 9, in addition to the step of renewal target container information.
The beneficial effects of the invention are as follows:The present invention provides a kind of high availability mechanism for container for cloud management platform, Migrated by container, the container of carrier state on failed host can be dispatched to other in container cluster during main frame failure Run on main frame, and ensure that the operation completed in the container is still effective, improves the availability of container cluster.
Embodiment
With reference to embodiment, the invention will be further described:
Stateful container, is particularly developed, and the container of test has High Availabitity demand at the end of not, that is, ensures main frame event After barrier, container can still be run on new main frame, and the modification made before to container is not lost.Therefore, the present invention proposes Across the host migration method of container of High Availabitity based on Docker.Management system sends order to the dockerd on destination host, One container is moved into destination host from failed host.Specific transition process is as follows:
Step 1, according to source host title, determine the working directory position of source host container;
Step 2, according to source container ID, determine source container writable layer ID;
Step 3, according to storage driving title, determine directory location where the file of change is actually occurred in the writable layer of source;
Step 4, catalogue where the file for actually occurring change is packaged into tar files;
Step 5, the working directory position for determining destination host container;
Step 6, according to target container ID, determine target container writable layer ID;
Step 7, according to storage driving title, determine catalogue position where the file of change is actually occurred in target writable layer Put;
Step 8, file in step 7 deleted, and the tar files generated in step 4 are unpacked to destination folder;
Step 9, start target container.
Step 10, source container information is changed, updates target container information.
Preferred embodiment of the invention described in detail above.It should be appreciated that one of ordinary skill in the art without Creative work can is needed to make many modifications and variations according to the design of the present invention.Therefore, all technologies in the art Personnel are available by logical analysis, reasoning, or a limited experiment on the basis of existing technology under this invention's idea Technical scheme, all should be in the protection domain being defined in the patent claims.

Claims (2)

1. implementation method of the container across host migration under a kind of Docker environment, it is characterised in that comprise the following steps:
Step 1, according to source host title, determine the working directory position of source host container;
Step 2, according to source container ID, determine source container writable layer ID;
Step 3, according to storage driving title, determine directory location where the file of change is actually occurred in the writable layer of source;
Step 4, catalogue where the file for actually occurring change is packaged into tar files;
Step 5, the working directory position for determining destination host container;
Step 6, according to target container ID, determine target container writable layer ID;
Step 7, according to storage driving title, determine directory location where the file of change is actually occurred in target writable layer;
Step 8, file in step 7 deleted, and the tar files generated in step 4 are unpacked to destination folder;
Step 9, start target container.
2. under a kind of Docker environment as claimed in claim 1 container across host migration implementation method, it is characterized in that:It is described After step 9, in addition to the step of renewal target container information.
CN201710617032.XA 2017-07-26 2017-07-26 Implementation method of the container across host migration under a kind of Docker environment Pending CN107515782A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710617032.XA CN107515782A (en) 2017-07-26 2017-07-26 Implementation method of the container across host migration under a kind of Docker environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710617032.XA CN107515782A (en) 2017-07-26 2017-07-26 Implementation method of the container across host migration under a kind of Docker environment

Publications (1)

Publication Number Publication Date
CN107515782A true CN107515782A (en) 2017-12-26

Family

ID=60722687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710617032.XA Pending CN107515782A (en) 2017-07-26 2017-07-26 Implementation method of the container across host migration under a kind of Docker environment

Country Status (1)

Country Link
CN (1) CN107515782A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113076176A (en) * 2021-04-06 2021-07-06 中山大学 MPI application performance optimization method and system in container environment
CN116107715A (en) * 2023-02-02 2023-05-12 北京天云融创软件技术有限公司 Method for running Docker container task and task scheduler

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239493A (en) * 2014-09-09 2014-12-24 北京京东尚科信息技术有限公司 Cross-cluster data migration method and system
CN105224466A (en) * 2015-11-17 2016-01-06 广州亦云信息技术有限公司 A kind of integration test method based on Docker and system
CN105607954A (en) * 2015-12-21 2016-05-25 华南师范大学 Stateful container online migration method and apparatus
CN106201502A (en) * 2016-07-06 2016-12-07 中国银联股份有限公司 A kind of across host application program dispositions method and device
CN106933508A (en) * 2017-02-14 2017-07-07 深信服科技股份有限公司 The moving method and device of application container

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239493A (en) * 2014-09-09 2014-12-24 北京京东尚科信息技术有限公司 Cross-cluster data migration method and system
CN105224466A (en) * 2015-11-17 2016-01-06 广州亦云信息技术有限公司 A kind of integration test method based on Docker and system
CN105607954A (en) * 2015-12-21 2016-05-25 华南师范大学 Stateful container online migration method and apparatus
CN106201502A (en) * 2016-07-06 2016-12-07 中国银联股份有限公司 A kind of across host application program dispositions method and device
CN106933508A (en) * 2017-02-14 2017-07-07 深信服科技股份有限公司 The moving method and device of application container

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113076176A (en) * 2021-04-06 2021-07-06 中山大学 MPI application performance optimization method and system in container environment
CN113076176B (en) * 2021-04-06 2024-06-18 中山大学 MPI application performance optimization method and system in container environment
CN116107715A (en) * 2023-02-02 2023-05-12 北京天云融创软件技术有限公司 Method for running Docker container task and task scheduler
CN116107715B (en) * 2023-02-02 2023-09-26 北京天云融创软件技术有限公司 Method for running Docker container task and task scheduler

Similar Documents

Publication Publication Date Title
US10904321B2 (en) Migrating legacy applications to a multi-tenant computing environment
US10614046B2 (en) Scalable distributed storage architecture
CN103368767B (en) For disposing the method and system of software application in the Internet cloud of fault tolerant
US9311501B2 (en) Using different secure erase algorithms to erase chunks from a file associated with different security levels
US8789043B2 (en) Optimized placement planning for virtual machines in a network by breaking relocation graph into one or more cores to apply different solutions
US20140310455A1 (en) System, method and computer program product for deduplication aware quality of service over data tiering
US20150370845A1 (en) Storage device data migration
US20160224580A1 (en) Filesystem with isolated independent filesets
US9727332B2 (en) Information technology resource management
CN108509152A (en) A kind of method and device for realizing the storage of container runtime data
US10223146B2 (en) Rearrangement management for a shared pool of configurable computing resources
US11868310B2 (en) Composite storage of objects in multi-tenant devices
US20190339889A1 (en) Creating a structurally aware block storage system
US9729466B2 (en) Information technology resource management
US9535854B2 (en) Building an undo log for in-memory blocks of data
US9195614B2 (en) Instantaneous save/restore of virtual machines with persistent memory
CN107515782A (en) Implementation method of the container across host migration under a kind of Docker environment
US20210303530A1 (en) Providing enhanced security for object access in object-based datastores
US9229659B2 (en) Identifying and accessing reference data in an in-memory data grid
US9665308B2 (en) Optimization of the copying of change recorded data by using spare flash capacity
US11841833B2 (en) File reorganization
CN115454562A (en) Identifying resource lock ownership across cluster computing environments
US20200341677A1 (en) Heat value tracking
US11620059B1 (en) Optimization of file system snapshot performance in hybrid storage deployments
US11797522B2 (en) Database log writing based on log pipeline contention

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20171226