JP6319770B2 - Container migration system and method - Google Patents
Container migration system and method Download PDFInfo
- Publication number
- JP6319770B2 JP6319770B2 JP2015147591A JP2015147591A JP6319770B2 JP 6319770 B2 JP6319770 B2 JP 6319770B2 JP 2015147591 A JP2015147591 A JP 2015147591A JP 2015147591 A JP2015147591 A JP 2015147591A JP 6319770 B2 JP6319770 B2 JP 6319770B2
- Authority
- JP
- Japan
- Prior art keywords
- container
- computer
- synchronization processing
- processing unit
- switching
- 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
Links
Images
Description
本発明は、コンテナ型仮想化技術に関する。 The present invention relates to container-type virtualization technology.
コンテナ型仮想化技術は、オペレーティングシステム(OS:Operating System)上に、論理的に名前空間やCPU・メモリ等のサーバリソースが分離された独立した仮想的な環境を作り出す仮想化技術である。この分離された仮想化環境はコンテナと呼ばれ、コンテナ毎にリソースの利用やファイルシステムへのアクセスが制御される。コンテナ型仮想化技術では、OS側(コンテナの外部)から見ると、コンテナに含まれないプロセスと同じように、コンテナ内部に透過的にアクセス可能であり、仮想環境の内部を監視・操作したり状態を取得したりできるという特徴がある。また、OS側から透過的にアクセス可能であるため、OS側からシグナル等を送出することで、コンテナ内部のプロセスに直接的に操作を加えることが可能であるという特徴がある。一方、同じ目的を持つハイパーバイザ型仮想化では、計算機上で仮想的な計算機をエミュレーションすることで仮想的な環境を作り出すため、OS側から仮想環境の内部にアクセスすることはできない(非特許文献1〜6参照)。 The container-type virtualization technology is a virtualization technology that creates an independent virtual environment in which server resources such as a name space and CPU / memory are logically separated on an operating system (OS). This separated virtual environment is called a container, and resource use and access to the file system are controlled for each container. In the container-type virtualization technology, from the OS side (outside of the container), the inside of the container can be transparently accessed like the processes not included in the container, and the inside of the virtual environment can be monitored and operated. There is a feature that the state can be acquired. In addition, since it can be transparently accessed from the OS side, it is possible to directly add an operation to the process inside the container by sending a signal or the like from the OS side. On the other hand, in the hypervisor type virtualization having the same purpose, a virtual environment is created by emulating a virtual computer on a computer, and therefore the inside of the virtual environment cannot be accessed from the OS side (non-patent document). 1-6).
現在開発が進められている、コンテナ型仮想化技術におけるライブマイグレーション(あるサーバで動作しているコンテナを他のサーバで動作させること)では、コンテナを一時停止して、メモリの内容やコンテナの状態(ソケット,システムコール,シグナル,セッション,PID(Process ID)/PPID(Parent Process ID)など)をダンプし、ダンプデータとコンテナのイメージファイル等をマイグレーション先のサーバに移動して、それらを元にコンテナを復元し、動作を再開することでマイグレーションを実現する(非特許文献7〜12参照)。 In live migration in container-type virtualization technology that is currently being developed (running a container running on one server on another server), the container is paused, and the memory contents and container status (Sockets, system calls, signals, sessions, PID (Process ID) / PPID (Parent Process ID), etc.) are dumped, and the dump data and container image files are moved to the migration destination server. The migration is realized by restoring the container and restarting the operation (see Non-Patent Documents 7 to 12).
上記マイグレーション処理において、コンテナからダンプを生成・再生する技術としてはCheckpoint/Restart(CR)技術が知られている。CR技術は、プロセスの一時停止、プロセスのチェックポイントの作成、プロセスのダンプの生成、ダンプを元にプロセスを復元するものである(非特許文献13〜17参照)。 In the migration process, Checkpoint / Restart (CR) technology is known as a technology for generating / reproducing a dump from a container. The CR technique is a process suspension, creation of a process checkpoint, generation of a process dump, and restoration of a process based on the dump (see Non-Patent Documents 13 to 17).
しかし、上述した既存のライブマイグレーション方式では、コンテナの停止から再開までの停止時間が長いという問題がある。具体的には、上述した既存のライブマイグレーション方式では、マイグレーション元のコンテナを停止してダンプをディスクストレージ上に書き出し、マイグレーション先のサーバにダンプを転送し、マイグレーション先のサーバにおいて転送されたダンプをメモリ上に展開して、コンテナを再生して動作を再開するという手順を踏む。この処理時間中、コンテナは停止状態にあるため、コンテナの停止から再開までに要する停止時間が長いというものである。このようにコンテナの停止時間が長いと、コンテナ上で動作するプロセスの通信セッションが切断されてしまうなど種々の問題が発生するおそれがある。 However, the above-described existing live migration method has a problem that the stop time from the stop of the container to the restart is long. Specifically, in the existing live migration method described above, the migration source container is stopped, a dump is written on the disk storage, the dump is transferred to the migration destination server, and the dump transferred at the migration destination server is saved. The procedure is to expand on the memory, play the container, and resume operation. Since the container is in a stopped state during this processing time, the stop time required from the stop to the restart of the container is long. As described above, when the stop time of the container is long, various problems such as disconnection of a communication session of a process operating on the container may occur.
本発明は上記事情に鑑みてなされたものであり、その目的とするところは、コンテナの停止時間を短くすることができるコンテナのマイグレーションシステム及び方法を提供することにある。 The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a container migration system and method capable of shortening the stop time of the container.
上記目的を達成するために、本願発明は、コンテナ型仮想化技術により仮想化環境であるコンテナを構築可能な第1及び第2のコンピュータを備え、前記第1のコンピュータ上に構築されたコンテナを前記第2のコンピュータにマイグレーションさせるコンテナのマイグレーションシステムであって、前記第1及び第2のコンピュータは、前記第1のコンピュータのコンテナを第2のコンピュータに反復的に差分同期させる同期処理部と、同期処理部による同期処理が開始されてからコンテナの動作を前記第1のコンピュータから前記第2のコンピュータに切り替える時期(切替時期)を判定する切替時期判定手段とを備え、前記第1のコンピュータの同期処理部は、前記切替時期判定手段により切替時期と判定されると前記第1のコンピュータにおけるコンテナの動作を停止させ、最後の差分同期処理を実行し、前記第1のコンピュータにおけるコンテナを削除し、前記第2のコンピュータの同期処理部は、前記第1のコンピュータと最後の差分同期処理の後に、第2のコンピュータにおいてコンテナの動作を開始させることを特徴とする。 In order to achieve the above object, the present invention comprises first and second computers capable of constructing a container which is a virtual environment by container-type virtualization technology, and a container constructed on the first computer is provided. A container migration system for migrating to the second computer, wherein the first and second computers include a synchronization processing unit that repeatedly and differentially synchronizes the container of the first computer with the second computer; Switching time determination means for determining a time (switching time) for switching the operation of the container from the first computer to the second computer after the synchronization processing by the synchronization processing unit is started. The synchronization processing unit is configured to switch the first computer when the switching time determining unit determines that the switching time is reached. The container operation in the computer is stopped, the last difference synchronization process is executed, the container in the first computer is deleted, and the synchronization processing unit of the second computer is synchronized with the first computer in the last difference synchronization. After the processing, the operation of the container is started in the second computer.
本発明によれば、差分同期処理の実行中でも第1のコンピュータにおいてコンテナの動作が継続するので、コンテナの停止時間を短くすることができる。 According to the present invention, since the operation of the container continues in the first computer even during the execution of the differential synchronization process, the stop time of the container can be shortened.
本発明の一実施の形態に係るマイグレーションシステムについて図面を参照して説明する。図1はコンテナのマイグレーションシステムの構成図、図2はコンテナ・ホスト機能部の構成図である。 A migration system according to an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a configuration diagram of a container migration system, and FIG. 2 is a configuration diagram of a container / host function unit.
図1に示すように、第1のサーバ100及び第2のサーバ200は、ネットワーク機能部110,210を介してネットワーク300と接続している。各サーバ100,200は、OS120,220と、コンテナ・ホスト機能部130,230とを備えており、このコンテナ・ホスト機能部130,230によりOS120,220上にプロセスレベルでリソースが分離された仮想化環境である1つ以上のコンテナ190,290が構築される。
As shown in FIG. 1, the
ここでコンテナ・ホスト機能部130,230により構築されるコンテナ190,290の特徴について説明する。OS120,220やコンテナ・ホスト機能部130,230は、コンテナ内部の情報や内部のプロセス間のやりとりを透過的にアクセス可能である。また、OS120,220やコンテナ・ホスト機能部130,230は、シグナルを送出して直接的にコンテナ内部のプロセスに対する種々の操作(例えば強制終了など)が可能である。また、コンテナ内部のプロセスは、コンテナ内部から外部へのやりとりも全て透過的にアクセス可能である。
Here, characteristics of the
コンテナに含まれるプロレスに関する情報としては、PID,PPID,UID(User ID),GID(Group ID),ulimit,rusage,メモリ使用量,CPU使用率,CPU使用時間,一定時間以内に更新されたメモリアドレス,プロセスグループの情報,プロセス間通信の内容,プロセス間共有メモリの内容,シグナル・シグナルハンドラ,システムコール,ロックしているファイル,標準入出力,スレッド,TCP(Transmission Control Protocol)ソケット,UDP(User Datagram Protocol)ソケット,その他のソケット,ファイルI/O,コンテナに紐付いている仮想NIC(Network Interface Card)に関する情報などが挙げられる。なお、コンテナに紐付いている仮想NICに関する情報の詳細としては、バッファ使用量等,到来しているパケット数,送信パケット数などが挙げられる。 Information related to wrestling contained in the container includes PID, PPID, UID (User ID), GID (Group ID), limit, usage, memory usage, CPU usage rate, CPU usage time, and memory updated within a certain time Address, process group information, interprocess communication content, interprocess shared memory content, signal / signal handler, system call, locked file, standard input / output, thread, TCP (Transmission Control Protocol) socket, UDP ( User Datagram Protocol) socket, other sockets, file I / O, information on virtual NIC (Network Interface Card) associated with the container, and the like. Note that details of the information related to the virtual NIC associated with the container include the amount of packets used, the number of incoming packets, the number of transmitted packets, and the like.
コンテナ・ホスト機能部130,230の詳細について図2を参照して説明する。ここでは、第1のサーバ100のコンテナ・ホスト機能部130について説明するが、第2のサーバ200のコンテナ・ホスト機能部230も同一の構成である。
Details of the container
コンテナ・ホスト機能部130は、図2に示すように、コンテナ管理部131と、マイグレーション制御部135とを備えている。
As shown in FIG. 2, the container /
コンテナ管理部131は、コンテナの生成・開始・再生・再開・停止・削除などコンテナの管理を行う。ここで、コンテナの生成及び再生とは、ダンプやイメージファイルなどをサーバのメモリ上に展開して、コンテナを実行できるよう環境を構築することを意味する。また、コンテナの開始・再開とは、メモリ上に展開されたコンテナを動作させることを意味する。また、コンテナの停止とは、メモリ上のコンテナは維持しつつ、その動作のみを停止することを意味する。また、コンテナの削除とは、停止されたコンテナをメモリ上から消去又はコンテナが占有していたメモリを解放することを意味する。
The
マイグレーション制御部135は、自身のサーバと他のサーバ間との間でのコンテナのマイグレーション処理を制御する。マイグレーション制御部135は、他のサーバとの間で同期処理を行う同期処理部136と、マイグレーション元のサーバのコンテナを停止させ、マイグレーション先のサーバでコンテナの動作を開始させる時期を判定する切替時期判定部137とを備えている。
The
同期処理部136は他のサーバとの間でコンテナの差分同期処理を行う。ここで差分同期処理の方法としては、マイグレーション元のサーバにおいてメモリの内容やコンテナの状態(ソケット,システムコール,シグナル,セッション,PID/PPIDなど)をダンプし、マイグレーション先のサーバに転送し、マイグレーション先のサーバにおいてダンプを適用することにより処理される。なお、コンテナを生成するためのベースイメージをマイグレーション元のサーバとマイグレーション先のサーバの双方で既に有している又は入手可能な場合には、ベースイメージとダンプの差分を初回分として転送し、マイグレーション先において当該差分とベースイメージから初回分のダンプを再現することにより、転送データ量を小さくすることができる。
The
同期処理部136は、自身のサーバがマイグレーション元のサーバである場合と、自身のサーバがマイグレーション先のサーバである場合とで動作が異なる。自身のサーバがマイグレーション元のサーバである場合の動作について図3のフローチャートを参照して説明する。
The operation of the
同期処理部136は、まず初回のダンプを生成し、マイグレーション先のサーバの同期処理部に転送する(ステップS11)。以降、同期処理部136は、切替時期判定部137から切替開始信号を受信するまで、差分ダンプを生成し、マイグレーション先のサーバの同期処理部に転送する処理を反復的に繰り返す(ステップS12,S13)。差分ダンプの生成・転送処理は、所定時間毎であってもよいし更にサーバの動作状況に応じて行うようにしてもよい。そして同期処理部136は、切替時期判定部137から切替開始信号を受信すると、コンテナ管理部131に対してコンテナを停止するよう指示し(ステップS14)、最後の差分ダンプを生成し、マイグレーション先のサーバの同期処理部に転送する(ステップS15)。最後に同期処理部136は、コンテナ管理部131に対してコンテナを削除するよう指示する(ステップS16)。
The
自身のサーバがマイグレーション先のサーバである場合、同期処理部136は、マイグレーション元のサーバから初回のダンプを受信すると記憶手段に記憶し、その後に差分ダンプを受信すると順次記憶手段に差分ダンプを適用し、最後のダンプを受信・適用したらコンテナ管理部131に対して記憶手段に記憶したダンプからコンテナを再生・再開するよう指示する。または、同期処理部136は、マイグレーション元のサーバから初回ダンプを受信するとコンテナ管理部131に対して初回ダンプからコンテナを再生するよう指示し、その後に差分ダンプを受信するとコンテナに差分ダンプを適用し、最後のダンプを受信・適用したらコンテナ管理部131に対してコンテナを再開するよう指示する。
When the own server is the migration destination server, the
切替時期判定部137は、自身のサーバがマイグレーション元のサーバである場合に、自身の同期処理部136による同期処理が開始されてからコンテナの動作をマイグレーション先のサーバに切り替える時期(切替時期)を判定する。当該判定処理としては、マイグレーション対象であるコンテナの活動状況など自身のサーバの状況を監視し、所定の活動状況になったら切替時期であると判定する又は現在の活動状況から将来の活動状況を推定して切替時期を判定するものや、対象のコンテナに切替時期情報を問い合わせて該切替時期情報から切替時期を判定するものなどが挙げられる。
When the own server is the migration source server, the switching
切替時期判定部137の判定処理のより具体的なアルゴリズムとしては、(a)コンテナの活動量を考慮して切換タイミングを検出するアルゴリズム、(b)コンテナにマイグレーションの可否を確認するアルゴリズム、(c)コンテナの状態を考慮するアルゴリズム、(d)コンテナの通信状態を考慮するアルゴリズムなどが挙げられる。前記(a)のコンテナの活動量は、具体的には、後述する(c)や(d)で挙げる値の他、同期処理部136で生成する差分ダンプのサイズなどをパラメータとして、何れか1つのパラメータ又は複数のパラメータを組み合わせて算出した評価値である。また、前記(b)のアルゴリズムでは、コンテナ内のプロセス側に予め問合せに対して応答する手段を設けておく。
More specific algorithms for the determination process of the switching
上記(a)のアルゴリズムの具体例として、図4に未来のコンテナの活動量を推定して切換タイミングを検出するもの、図5に現在のコンテナの活動量を計算して切換タイミングを検出するもの、図6に差分ダンプのサイズが十分小さくなったタイミングで切り替えるもの、についてフローチャートを示す。 As a specific example of the algorithm of (a) above, FIG. 4 estimates the future container activity amount and detects the switching timing, and FIG. 5 calculates the current container activity amount and detects the switching timing. FIG. 6 shows a flowchart for switching at the timing when the size of the differential dump becomes sufficiently small.
上記(b)のアルゴリズムの具体例として、図7にコンテナにマイグレーションの可否を確認するもの、図8にコンテナにマイグレーション可能な時刻を確認するもの、についてフローチャートを示す。 As specific examples of the algorithm of (b) above, FIG. 7 shows a flowchart of what confirms whether or not migration to a container is possible, and FIG.
上記(c)のアルゴリズムの具体例として、図9にコンテナのCPU使用率が一定以下のタイミングで切り替えるもの、図10にコンテナのストレージI/Oが一定以下のタイミングで切り替えるもの、図11にコンテナがロックするファイル数が一定以下のタイミングで切り替えるもの、についてフローチャートを示す。 As a specific example of the algorithm of (c) above, FIG. 9 shows a case where the CPU usage rate of the container is switched at a timing below a certain level, FIG. 10 shows a case where the storage I / O of the container is switched at a timing below a certain level, and FIG. Shows a flow chart for switching at a timing when the number of files to be locked is below a certain level.
上記(d)のアルゴリズムの具体例として、図12にコンテナの仮想NICのバッファ使用率が一定以下のタイミングで切り替えるもの、図13にコンテナ内部のプロセスが作成したソケットが解消されるタイミングで切り替えるもの、図14にコンテナ内部のESTABLISHED状態のソケットが一定数以下のタイミングで切り替えるもの、図15にTCPソケットの受信・送信バッファの使用率が一定以下のタイミングで切り替えるもの、についてフローチャートを示す。 As a specific example of the algorithm of (d) above, FIG. 12 switches when the virtual NIC buffer usage rate is below a certain level, and FIG. 13 switches when the socket created by the process inside the container is eliminated. FIG. 14 shows a flowchart for switching the ESTABLISHED socket inside the container at a timing of a predetermined number or less, and FIG. 15 switching the timing of the TCP socket reception / transmission buffer usage rate at a predetermined timing or less.
次に、本実施の形態に係るマイグレーションシステムにおけるマイグレーションの動作について図16を参照して説明する。図16は、第1のサーバ100から第2のサーバ200にコンテナをマイグレーションする場合を示している。
Next, the migration operation in the migration system according to the present embodiment will be described with reference to FIG. FIG. 16 shows a case where a container is migrated from the
まず、(1)第1のサーバ100は、実行中のコンテナを停止せずにダンプを生成し、メモリ上に保持し、(2)ネットワーク300を介してダンプを第2のサーバ200に転送する。次に、(3)実行中のコンテナと第1のサーバ100上のダンプを差分同期し、(4)第1のサーバ100と第2のサーバ200のダンプの差分同期を行い、同期がとれたら前記(3)を実行する、という手順を繰り返し行う。一方、(5)第1のサーバ100では、コンテナの状態等を監視し、最適なタイミングでコンテナを停止させる。次に、(6)停止したコンテナと第2のサーバ200のダンプを差分同期し、(7)第2のサーバ200においてコンテナを再生する。(8)第1のサーバ100ではコンテナを削除し、(9)第2のサーバ200ではコンテナを再開する。
First, (1) the
本実施の形態によれば、差分同期処理の実行中でも第1のコンピュータにおいてコンテナの動作が継続するので、コンテナの停止時間を短くすることができる。 According to the present embodiment, since the operation of the container continues in the first computer even during the execution of the differential synchronization process, the stop time of the container can be shortened.
本発明に実施例1について図17のシーケンスチャートを参照して説明する。実施例1はコンテナの再生を最後に行う場合の例である。 The first embodiment of the present invention will be described with reference to the sequence chart of FIG. The first embodiment is an example in the case where container regeneration is performed last.
第1のサーバ100の同期処理部136は、第2のサーバ200の同期処理部236に対して、ライブマイグレーションの依頼、ライブマイグレーション対象のコンテナが消費するリソース量などを通知する(ステップS101)。同期処理部236は、リソース量の要求を満たすか判断し(ステップS102)、同期処理部136に対して「許可」を通知する(ステップS103)。なお、リソース量の要求を満たさない場合ライブマイグレーションを拒否し、ライブマイグレーションは失敗となる。
The
次に、同期処理部136は、コンテナのダンプを生成し、記憶装置に保持し(ステップS104)、ダンプを同期処理部236に転送する(ステップS105)。同期処理部236は、受信したダンプを記憶手段に記憶し(ステップS106)、同期完了を同期処理部136に通知する(ステップS107)。同期処理部236は、切替時期判定部137に対して差分同期開始を通知する(ステップS108)。切替時期判定部137は、切替タイミングの検出アルゴリズムを実行して、コンテナ切換開始のタイミングを検出する(ステップS109)。
Next, the
同期処理部136は、コンテナの更新差分から差分ダンプを生成し(ステップS110)、差分ダンプを同期処理部236に転送する(ステップS111)。同期処理部236は、記憶装置に保持しているダンプに受信した差分ダンプを適用し(ステップS112)、差分同期完了を同期処理部136に通知する(ステップS113)。このステップS110〜S113までの処理は、切替時期判定部137が切換開始のタイミングを通知(ステップS114)まで繰り返し実行する。
The
切替時期判定部137が切換開始のタイミングを通知すると(ステップS114)、同期処理部136は、コンテナを停止する(ステップS115)。次に、同期処理部136は、コンテナの更新差分から差分ダンプを生成し(ステップS116)、差分ダンプを同期処理部236に転送する(ステップS117)。同期処理部236は、記憶装置に保持しているダンプに受信した差分ダンプを適用し(ステップS118)、差分同期完了を同期処理部136に通知する(ステップS119)。
When the switching
この後に、第1のサーバ100の同期処理部136はコンテナを削除し(ステップS120)、第2のサーバ200の同期処理部236は記憶装置に保持しているダンプを再生し、最後にコンテナを再開する(ステップS121)。
After this, the
なお、上記シーケンスにおいてダンプを記憶保持する記憶装置としてはメモリが望ましいが、任意の記憶装置でもよい。 In addition, although a memory is desirable as a storage device that stores and holds the dump in the above sequence, any storage device may be used.
本発明に実施例2について図18のシーケンスチャートを参照して説明する。実施例2はコンテナの再生を最初に行う場合の例である。 A second embodiment of the present invention will be described with reference to the sequence chart of FIG. The second embodiment is an example when the container is first played back.
第1のサーバ100の同期処理部136は、第2のサーバ200の同期処理部236に対して、ライブマイグレーションの依頼、ライブマイグレーション対象のコンテナが消費するリソース量などを通知する(ステップS201)。同期処理部236は、リソース量の要求を満たすか判断し(ステップS202)、同期処理部136に対して「許可」を通知する(ステップS203)。なお、リソース量の要求を満たさない場合ライブマイグレーションを拒否し、ライブマイグレーションは失敗となる。
The
次に、同期処理部136は、コンテナのダンプを生成し、記憶装置に保持し(ステップS204)、ダンプを同期処理部236に転送する(ステップS205)。同期処理部236は、ダンプからコンテナを再生する(ステップS206)。ただし、この時点では同期処理部236は、コンテナは停止の状態とする。次に、同期処理部236は、同期完了を同期処理部136に通知する(ステップS207)。同期処理部236は、切替時期判定部137に対して差分同期開始を通知する(ステップS208)。切替時期判定部137は、切替タイミングの検出アルゴリズムを実行して、コンテナ切換開始のタイミングを検出する(ステップS209)。
Next, the
同期処理部136は、コンテナの更新差分から差分ダンプを生成し(ステップS210)、差分ダンプを同期処理部236に転送する(ステップS211)。同期処理部236は、コンテナに差分ダンプを適用し(ステップS212)、差分同期完了を同期処理部136に通知する(ステップS213)。このステップS210〜S213までの処理は、切替時期判定部137が切換開始のタイミングを通知(ステップS214)まで繰り返し実行する。
The
切替時期判定部137が切換開始のタイミングを通知すると(ステップS214)、同期処理部136は、コンテナを停止する(ステップS215)。次に、同期処理部136は、コンテナの更新差分から差分ダンプを生成し(ステップS216)、差分ダンプを同期処理部236に転送する(ステップS217)。同期処理部236は、コンテナに差分ダンプを適用し(ステップS218)、差分同期完了を同期処理部136に通知する(ステップS219)。
When the switching
この後に、第1のサーバ100の同期処理部136はコンテナを削除し(ステップS220)、第2のサーバ200の同期処理部236はコンテナを再開する(ステップS221)。
Thereafter, the
本発明に実施例3について図19のシーケンスチャートを参照して説明する。実施例3は、コンテナのベースとなるダンプ(ベースイメージ)を使用して転送するデータ量を低減するものであり、且つ、コンテナの再生を最後に行う場合の例である。 A third embodiment of the present invention will be described with reference to the sequence chart of FIG. The third embodiment is an example in which the amount of data to be transferred is reduced by using a dump (base image) serving as a base of the container, and the container is played back last.
第1のサーバ100の同期処理部136は、第2のサーバ200の同期処理部236に対して、ライブマイグレーションの依頼、ライブマイグレーション対象のコンテナが消費するリソース量などを通知する(ステップS301)ここで、ライブマイグレーションの依頼には、マイグレーション対象のコンテナを生成する際に用いたベースイメージを識別する識別情報を含む。同期処理部236は、リソース量の要求を満たすか判断し(ステップS302)、同期処理部136に対して「許可」且つ「ベースイメージが使用可能」であることを通知する(ステップS303)。なお、リソース量の要求を満たさない場合ライブマイグレーションを拒否し、ライブマイグレーションは失敗となる。
The
次に、同期処理部136は、コンテナのダンプを生成して記憶装置に保持し、ベースイメージとの差分を取得し(ステップS304)、ベースイメージとの差分を同期処理部236に転送する(ステップS305)。同期処理部236は、自身で別途入手したベースイメージに同期処理部136から受信した差分を適用してダンプを生成し、記憶装置に保持し(ステップS306)、同期完了を同期処理部136に通知する(ステップS307)。同期処理部236は、切替時期判定部137に対して差分同期開始を通知する(ステップS308)。切替時期判定部137は、切替タイミングの検出アルゴリズムを実行して、コンテナ切換開始のタイミングを検出する(ステップS309)。
Next, the
同期処理部136は、コンテナの更新差分から差分ダンプを生成し(ステップS310)、差分ダンプを同期処理部236に転送する(ステップS311)。同期処理部236は、記憶装置に保持しているダンプに受信した差分ダンプを適用し(ステップS312)、差分同期完了を同期処理部136に通知する(ステップS313)。このステップS310〜S313までの処理は、切替時期判定部137が切換開始のタイミングを通知(ステップS314)まで繰り返し実行する。
The
切替時期判定部137が切換開始のタイミングを通知すると(ステップS314)、同期処理部136は、コンテナを停止する(ステップS315)。次に、同期処理部136は、コンテナの更新差分から差分ダンプを生成し(ステップS316)、差分ダンプを同期処理部236に転送する(ステップS317)。同期処理部236は、記憶装置に保持しているダンプに受信した差分ダンプを適用し(ステップS318)、差分同期完了を同期処理部136に通知する(ステップS319)。
When the switching
この後に、第1のサーバ100の同期処理部136はコンテナを削除し(ステップS320)、第2のサーバ200の同期処理部236は記憶装置に保持しているダンプを再生し、最後にコンテナを再開する(ステップS321)。
Thereafter, the
なお、上記シーケンスにおいてダンプを記憶保持する記憶装置としてはメモリが望ましいが、任意の記憶装置でもよい。 In addition, although a memory is desirable as a storage device that stores and holds the dump in the above sequence, any storage device may be used.
本発明に実施例4について図20のシーケンスチャートを参照して説明する。実施例4は、コンテナのベースとなるダンプ(ベースイメージ)を使用して転送するデータ量を低減するものであり、且つ、コンテナの再生を最初に行う場合の例である。 A fourth embodiment of the present invention will be described with reference to the sequence chart of FIG. The fourth embodiment is an example in which the amount of data to be transferred is reduced using a dump (base image) serving as a base of the container, and the container is first reproduced.
第1のサーバ100の同期処理部136は、第2のサーバ200の同期処理部236に対して、ライブマイグレーションの依頼、ライブマイグレーション対象のコンテナが消費するリソース量などを通知する(ステップS401)。ここで、ライブマイグレーションの依頼には、マイグレーション対象のコンテナを生成する際に用いたベースイメージを識別する識別情報を含む。同期処理部236は、リソース量の要求を満たすか判断し(ステップS402)、同期処理部136に対して「許可」且つ「ベースイメージが使用可能」であることを通知する(ステップS403)。なお、リソース量の要求を満たさない場合ライブマイグレーションを拒否し、ライブマイグレーションは失敗となる。
The
次に、同期処理部136は、コンテナのダンプを生成して記憶装置に保持し、ベースイメージとの差分を取得し(ステップS404)、ベースイメージとの差分を同期処理部236に転送する(ステップS405)。同期処理部236は、自身で別途入手したベースイメージに同期処理部136から受信した差分を適用してダンプを生成し、該コンテナを再生する(ステップS406)。ただし、この時点では同期処理部236は、コンテナは停止の状態とする。次に、同期処理部236は、同期完了を同期処理部136に通知する(ステップS407)。同期処理部236は、切替時期判定部137に対して差分同期開始を通知する(ステップS408)。切替時期判定部137は、切替タイミングの検出アルゴリズムを実行して、コンテナ切換開始のタイミングを検出する(ステップS409)。
Next, the
同期処理部136は、コンテナの更新差分から差分ダンプを生成し(ステップS410)、差分ダンプを同期処理部236に転送する(ステップS411)。同期処理部236は、コンテナに差分ダンプを適用し(ステップS412)、差分同期完了を同期処理部136に通知する(ステップS413)。このステップS410〜S413までの処理は、切替時期判定部137が切換開始のタイミングを通知(ステップS414)まで繰り返し実行する。
The
切替時期判定部137が切換開始のタイミングを通知すると(ステップS414)、同期処理部136は、コンテナを停止する(ステップS415)。次に、同期処理部136は、コンテナの更新差分から差分ダンプを生成し(ステップS416)、差分ダンプを同期処理部236に転送する(ステップS417)。同期処理部236は、コンテナに差分ダンプを適用し(ステップS418)、差分同期完了を同期処理部136に通知する(ステップS419)。
When the switching
この後に、第1のサーバ100の同期処理部136はコンテナを削除し(ステップS420)、第2のサーバ200の同期処理部236はコンテナを再開する(ステップS421)。
Thereafter, the
100,200…サーバ
110,210…ネットワーク機能部
120,220…OS
130,230…コンテナ・ホスト機能部
131…コンテナ管理部
135…マイグレーション制御部
136…同期処理部
137…切替時期判定部
190,290…コンテナ
100, 200 ...
DESCRIPTION OF SYMBOLS 130,230 ... Container
Claims (5)
前記第1及び第2のコンピュータは、前記第1のコンピュータのコンテナを第2のコンピュータに反復的に差分同期させる同期処理部と、同期処理部による同期処理が開始されてからコンテナの動作を前記第1のコンピュータから前記第2のコンピュータに切り替える時期(切替時期)を判定する切替時期判定手段とを備え、
前記第1のコンピュータの同期処理部は、前記切替時期判定手段により切替時期と判定されると前記第1のコンピュータにおけるコンテナの動作を停止させ、最後の差分同期処理を実行し、前記第1のコンピュータにおけるコンテナを削除し、
前記第2のコンピュータの同期処理部は、前記第1のコンピュータと最後の差分同期処理の後に、第2のコンピュータにおいてコンテナの動作を開始させる
ことを特徴とするコンテナのマイグレーションシステム。 A container migration system comprising first and second computers capable of constructing a container which is a virtual environment by container-type virtualization technology, and causing the container constructed on the first computer to migrate to the second computer Because
The first and second computers include a synchronization processing unit that repeatedly differentially synchronizes the container of the first computer with the second computer, and the operation of the container after the synchronization processing by the synchronization processing unit is started. Switching time determination means for determining a time (switching time) for switching from the first computer to the second computer,
The synchronization processing unit of the first computer stops the operation of the container in the first computer when the switching time determining unit determines that the switching time is reached, executes the last difference synchronization processing, and executes the first difference synchronization processing. Delete the container on the computer,
The container migration system, wherein the synchronization processing unit of the second computer starts the operation of the container in the second computer after the last difference synchronization processing with the first computer.
ことを特徴とする請求項1記載のコンテナのマイグレーションシステム。 The switching determination means in the first computer acquires an activity status of the container operating in the first computer, and determines a switching timing based on the acquired activity status. Container migration system.
ことを特徴とする請求項2記載のコンテナのマイグレーションシステム。 The container migration system according to claim 2, wherein the switching determination unit in the first computer estimates a future activity status from the acquired activity status, and determines a switching timing based on the estimated activity status.
前記第1のコンピュータにおける切替判定手段は、第1のコンピュータにおいて動作している前記コンテナから切替時期情報を取得し、該切替時期情報に基づき切替時期を判定する
ことを特徴とする請求項1記載のコンテナのマイグレーションシステム。 The application relating to the process in the container includes means for responding to switching time information used for controlling the switching time,
The switching determination means in the first computer acquires switching timing information from the container operating in the first computer, and determines the switching timing based on the switching timing information. Container migration system.
前記第1及び第2のコンピュータは、前記第1のコンピュータのコンテナを第2のコンピュータに反復的に差分同期させる同期処理部と、同期処理部による同期処理が開始されてからコンテナの動作を前記第1のコンピュータから前記第2のコンピュータに切り替える時期(切替時期)を判定する切替時期判定手段とを備え、
前記第1及び第2のコンピュータの同期処理部が、前記第1のコンピュータのコンテナを第2のコンピュータに反復的に差分同期させるステップと、
前記第1及び第2のコンピュータの切替時期判定手段が、前記第1のコンピュータの同期処理部による同期処理が開始されてからコンテナの動作を前記第1のコンピュータから前記第2のコンピュータに切り替える時期(切替時期)を判定するステップと、
前記第1のコンピュータの同期処理部が、前記切替時期判定手段により切替時期と判定されると前記第1のコンピュータにおけるコンテナの動作を停止させ、最後の差分同期処理を実行し、前記第1のコンピュータにおけるコンテナを削除するステップと、
前記第2のコンピュータの同期処理部が、前記第1のコンピュータと最後の差分同期処理の後に、第2のコンピュータにおいてコンテナの動作を開始させるステップとを備えた
ことを特徴とするコンテナのマイグレーション方法。 A container migration method comprising first and second computers capable of constructing a container that is a virtual environment using container-type virtualization technology, and causing the container constructed on the first computer to migrate to the second computer Because
The first and second computers include a synchronization processing unit that repeatedly differentially synchronizes the container of the first computer with the second computer, and the operation of the container after the synchronization processing by the synchronization processing unit is started. Switching time determination means for determining a time (switching time) for switching from the first computer to the second computer,
The synchronization processing unit of the first and second computers repeatedly differentially synchronizes the container of the first computer with the second computer;
When the first and second computer switching timing determining means switches the operation of the container from the first computer to the second computer after the synchronization processing by the synchronization processing unit of the first computer is started. Determining (switching time);
When the synchronization processing unit of the first computer determines that the switching time is determined by the switching time determination unit, the operation of the container in the first computer is stopped, the last difference synchronization processing is executed, and the first computer Deleting the container on the computer;
A container migration method, wherein the synchronization processing unit of the second computer includes a step of starting the operation of the container in the second computer after the last difference synchronization processing with the first computer. .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015147591A JP6319770B2 (en) | 2015-07-27 | 2015-07-27 | Container migration system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015147591A JP6319770B2 (en) | 2015-07-27 | 2015-07-27 | Container migration system and method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2017027496A JP2017027496A (en) | 2017-02-02 |
JP6319770B2 true JP6319770B2 (en) | 2018-05-09 |
Family
ID=57949835
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015147591A Active JP6319770B2 (en) | 2015-07-27 | 2015-07-27 | Container migration system and method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6319770B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6833649B2 (en) * | 2017-09-22 | 2021-02-24 | 株式会社日立産機システム | Programmable controller and control system |
CN107728947A (en) * | 2017-10-13 | 2018-02-23 | 郑州云海信息技术有限公司 | A kind of cold moving method of container and system |
CN108880898B (en) * | 2018-06-29 | 2020-09-08 | 新华三技术有限公司 | Main and standby container system switching method and device |
JP7197783B2 (en) * | 2019-01-11 | 2022-12-28 | 富士通株式会社 | Information processing system, management device and management program |
JP7327057B2 (en) | 2019-09-30 | 2023-08-16 | 日本電気株式会社 | CONTAINER CONTROL DEVICE, CONTAINER CONTROL METHOD, AND CONTAINER CONTROL PROGRAM |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5454135B2 (en) * | 2009-12-25 | 2014-03-26 | 富士通株式会社 | Virtual machine movement control device, virtual machine movement control method, and virtual machine movement control program |
US9015709B2 (en) * | 2011-03-08 | 2015-04-21 | Rackspace Us, Inc. | Hypervisor-agnostic method of configuring a virtual machine |
EP2804100B1 (en) * | 2012-01-10 | 2020-04-29 | Fujitsu Limited | Virtual machine management program, method and device |
JP2013182303A (en) * | 2012-02-29 | 2013-09-12 | Nec Corp | Virtual machine management system, method and program |
JP6044131B2 (en) * | 2012-06-25 | 2016-12-14 | 富士通株式会社 | Program, management server, and virtual machine migration control method |
WO2014010213A1 (en) * | 2012-07-11 | 2014-01-16 | 日本電気株式会社 | Migration system, migration method and non-transitory computer-readable medium storing control program |
WO2015197564A1 (en) * | 2014-06-23 | 2015-12-30 | Getclouder Ltd. | Cloud hosting systems featuring scaling and load balancing with containers |
-
2015
- 2015-07-27 JP JP2015147591A patent/JP6319770B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2017027496A (en) | 2017-02-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3762826B1 (en) | Live migration of virtual machines in distributed computing systems | |
JP6319770B2 (en) | Container migration system and method | |
US9110693B1 (en) | VM mobility over distance | |
US20190384678A1 (en) | System and method for managing backup and restore of objects over cloud platforms | |
EP2965200B1 (en) | Method and system for providing a roaming remote desktop | |
US9244676B2 (en) | Virtual machine based controller and upgrade mechanism | |
RU2653292C2 (en) | Service migration across cluster boundaries | |
US20130263131A1 (en) | Global computing interface | |
US11809901B2 (en) | Migrating the runtime state of a container between two nodes | |
JPWO2016121830A1 (en) | Virtual network function management apparatus, system, healing method and program | |
US11496414B2 (en) | Interoperable cloud based media processing using dynamic network interface | |
JP2007183747A (en) | Method and system for system movement between physical servers | |
US9378039B2 (en) | Virtual machine storage replication schemes | |
CN113196237A (en) | Container migration in a computing system | |
CN110347483B (en) | Method and device for migrating physical machine to virtual machine and storage medium | |
US11356534B2 (en) | Function repository selection mode and signaling for cloud based processing | |
EP3939235A1 (en) | Method and apparatus for envelope descriptor in moving picture experts group network based media processing | |
US11544108B2 (en) | Method and apparatus for functional improvements to moving picture experts group network based media processing | |
CN109634713B (en) | Virtual machine starting method and device | |
CN110134489B (en) | Application migration method, device, system, storage medium and application cloud application tool | |
US10686654B2 (en) | Configuration management as a service | |
US20220229687A1 (en) | Non-disruptive container runtime changes | |
US9485308B2 (en) | Zero copy volume reconstruction | |
US10585690B2 (en) | Online promote disk using mirror driver | |
CN116302337A (en) | Virtual machine migration method, device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170621 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20180319 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20180328 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180328 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6319770 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |