From Fedora Project Wiki
 
(27 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Checkpoint/Restore
= Checkpoint/Restore =


== Summary ==
== Summary ==
Line 10: Line 10:


== Owner ==
== Owner ==
<!--This should link to your home wiki page so we know who you are-->
* Name: [[User:adrian| Adrian Reber]]
* Name: [[User:FASAcountName| Your Name]]


<!-- Include you email address that you can be reached should people want to contact you about helping with your feature, status is requested, or  technical issues need to be resolved-->
* Email: <adrian@lisas.de>
* Email: <your email address so we can contact you, invite you to meetings, etc.>


== Current status ==
== Current status ==
* Targeted release: [[Releases/<number> | Fedora <number> ]]  
* Targeted release: [[Releases/19 | Fedora 19 ]]  
* Last updated: (DATE)
* Last updated: 2013-01-22
* Percentage of completion: XX%
* Percentage of completion: 100%


<!-- CHANGE THE "FedoraVersion" TEMPLATES ABOVE TO PLAIN NUMBERS WHEN YOU COMPLETE YOUR PAGE. -->
== Detailed Description ==
Checkpointing/restore, as mentioned above, can be used for fault tolerance and load distribution.


== Detailed Description ==
Fedora can offer checkpoint/restore by using CRIU (Checkpoint/Restore In Userspace). [http://criu.org/ CRIU] has been developed with the goal to be accepted by upstream and most patches necessary have already been accepted (as of 2012-10-24) in the kernel. The current release (0.3) of the userspace tools (crtools) offers the ability to checkpoint/restore containers and thus offering the ability to migrate containers.
<!-- Expand on the summary, if appropriate. A couple sentences suffices to explain the goal, but the more details you can provide the better. -->
 
To offer the checkpoint/restore functionality the package crtools has been imported into Fedora and following options have been enabled in the kernel RPM (as of 2013-01-30):
 
<pre>
diff --git a/config-x86_64-generic b/config-x86_64-generic
index 342b862..c5f8cf9 100644
--- a/config-x86_64-generic
+++ b/config-x86_64-generic
@@ -1,5 +1,8 @@
CONFIG_64BIT=y
+CONFIG_EXPERT=y
+CONFIG_CHECKPOINT_RESTORE=y
+CONFIG_NAMESPACES=y
# CONFIG_X86_X32 is not set
# CONFIG_MK8 is not set
# CONFIG_MPSC is not set
</pre>


== Benefit to Fedora ==
== Benefit to Fedora ==
<!-- What is the benefit to the platform?  If this is a major capability update, what has changed?  If this is a new feature, what capabilities does it bring? Why will Fedora become a better distribution or project because of this feature?-->
Fedora offers the possibility to checkpoint/restore processes.


== Scope ==
== Scope ==
<!-- What work do the developers have to accomplish to complete the feature in time for release? Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
* add the crtools package to Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=869618 (done)
* activate the three kernel options mentioned above (CONFIG_EXPERT, CONFIG_NAMESPACES, CONFIG_CHECKPOINT_RESTORE) (done)


== How To Test ==
== How To Test ==
<!-- This does not need to be a full-fledged document.  Describe the dimensions of tests that this feature is expected to pass when it is done.  If it needs to be tested with different hardware or software configurations, indicate them.  The more specific you can be, the better the community testing can be.
A process should be able to be dumped with following command:


Remember that you are writing this how to for interested testers to use to check out your feature - documenting what you do for testing is OK, but it's much better to document what *I* can do to test your feature.
<pre>crtools dump -D <destination-directory> -t <PID></pre>


A good "how to test" should answer these four questions:
and restored with following command:


0. What special hardware / data / etc. is needed (if any)?
<pre>crtools restore -D <destination-directory> -t <PID></pre>
1. How do I prepare my system to test this feature? What packages
need to be installed, config files edited, etc.?
2. What specific actions do I perform to check that the feature is
working like it's supposed to?
3. What are the expected results of those actions?
-->


== User Experience ==
== User Experience ==
<!-- If this feature is noticeable by its target audience, how will their experiences change as a result?  Describe what they will see or notice. -->
Users can easily checkpoint and restore processes with the crtools package:
 
<pre>crtools dump -D <destination-directory> -t <PID></pre>
 
<pre>crtools restore -D <destination-directory> -t <PID></pre>


== Dependencies ==
== Dependencies ==
<!-- What other packages (RPMs) depend on this package?  Are there changes outside the developers' control on which completion of this feature depends?  In other words, completion of another feature owned by someone else and might cause you to not be able to finish on time or that you would need to coordinate?  Other upstream projects like the kernel (if this is not a kernel feature)? -->
* add the crtools package to Fedora (done)
* activate the three kernel options mentioned above (CONFIG_EXPERT, CONFIG_NAMESPACES, CONFIG_CHECKPOINT_RESTORE), if the kernel maintainers agree to enable those options (done)


== Contingency Plan ==
== Contingency Plan ==
<!-- If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as "None necessary, revert to previous release behaviour."  Or it might not.  If you feature is not completed in time we want to assure others that other parts of Fedora will not be in jeopardy.  -->
* disable kernel options


== Documentation ==
== Documentation ==
<!-- Is there upstream documentation on this feature, or notes you have written yourself?  Link to that material here so other interested developers can get involved. -->
Users can easily checkpoint and restore processes with the crtools package:
*
 
<pre>crtools dump -D <destination-directory> -t <PID></pre>
 
<pre>crtools restore -D <destination-directory> -t <PID></pre>
 
http://criu.org/


== Release Notes ==
== Release Notes ==
<!-- The Fedora Release Notes inform end-users about what is new in the release.  Examples of past release notes are here: http://docs.fedoraproject.org/release-notes/ -->
<!-- The Fedora Release Notes inform end-users about what is new in the release.  Examples of past release notes are here: http://docs.fedoraproject.org/release-notes/ -->
<!-- The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns.  If there are any such changes involved in this feature, indicate them here.  You can also link to upstream documentation if it satisfies this need.  This information forms the basis of the release notes edited by the documentation team and shipped with the release. -->
<!-- The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns.  If there are any such changes involved in this feature, indicate them here.  You can also link to upstream documentation if it satisfies this need.  This information forms the basis of the release notes edited by the documentation team and shipped with the release. -->
*
* The CRIU (Checkpoint/Restore in User-space) projects offers a user-space implementation of process and process group checkpoint/restore. With the user-space tools crtools included in this release it is possible checkpoint processes and restore them at a later time again (e.g. after a crash) or migrate the checkpointed process or process group to another system. CRIU aims to be as transparent as possible so that no instrumentation or re-compilation of the process to be checkpointed is necessary.


== Comments and Discussion ==
== Comments and Discussion ==
* See [[Talk:Features/Your_Feature_Name]] <!-- This adds a link to the "discussion" tab associated with your page.  This provides the ability to have ongoing comments or conversation without bogging down the main feature page -->
* See [[Talk:Features/Checkpoint_Restore]]
 


[[Category:FeaturePageIncomplete]]
[[Category:FeatureAcceptedF19]]
<!-- When your feature page is completed and ready for review -->
<!-- When your feature page is completed and ready for review -->
<!-- remove Category:FeaturePageIncomplete and change it to Category:FeatureReadyForWrangler -->
<!-- remove Category:FeaturePageIncomplete and change it to Category:FeatureReadyForWrangler -->
<!-- After review, the feature wrangler will move your page to Category:FeatureReadyForFesco... if it still needs more work it will move back to Category:FeaturePageIncomplete-->
<!-- After review, the feature wrangler will move your page to Category:FeatureReadyForFesco... if it still needs more work it will move back to Category:FeaturePageIncomplete-->
<!-- A pretty picture of the page category usage is at: https://fedoraproject.org/wiki/Features/Policy/Process -->
<!-- A pretty picture of the page category usage is at: https://fedoraproject.org/wiki/Features/Policy/Process -->

Latest revision as of 09:48, 5 February 2013

Checkpoint/Restore

Summary

Add support to checkpoint and restore processes. Checkpointing processes can be used for fault tolerance and/or load balancing.

Checkpointing a process in regular intervals can help to restart a process if it might crash to resume/restart/restore the calculation without too much data lost. Providing this ability transparent at the OS level removes the need to implement this functionality for all processes manually.

Checkpointing and restoring a process to another system can be used to migrate a process, process tree or container to another system to distribute the load during the runtime and also for maintenance without service interruption like it is possible with virtual machines.

Owner

  • Email: <adrian@lisas.de>

Current status

  • Targeted release: Fedora 19
  • Last updated: 2013-01-22
  • Percentage of completion: 100%

Detailed Description

Checkpointing/restore, as mentioned above, can be used for fault tolerance and load distribution.

Fedora can offer checkpoint/restore by using CRIU (Checkpoint/Restore In Userspace). CRIU has been developed with the goal to be accepted by upstream and most patches necessary have already been accepted (as of 2012-10-24) in the kernel. The current release (0.3) of the userspace tools (crtools) offers the ability to checkpoint/restore containers and thus offering the ability to migrate containers.

To offer the checkpoint/restore functionality the package crtools has been imported into Fedora and following options have been enabled in the kernel RPM (as of 2013-01-30):

diff --git a/config-x86_64-generic b/config-x86_64-generic
index 342b862..c5f8cf9 100644
--- a/config-x86_64-generic
+++ b/config-x86_64-generic
@@ -1,5 +1,8 @@
 CONFIG_64BIT=y
 
+CONFIG_EXPERT=y
+CONFIG_CHECKPOINT_RESTORE=y
+CONFIG_NAMESPACES=y
 # CONFIG_X86_X32 is not set
 # CONFIG_MK8 is not set
 # CONFIG_MPSC is not set

Benefit to Fedora

Fedora offers the possibility to checkpoint/restore processes.

Scope

How To Test

A process should be able to be dumped with following command:

crtools dump -D <destination-directory> -t <PID>

and restored with following command:

crtools restore -D <destination-directory> -t <PID>

User Experience

Users can easily checkpoint and restore processes with the crtools package:

crtools dump -D <destination-directory> -t <PID>
crtools restore -D <destination-directory> -t <PID>

Dependencies

  • add the crtools package to Fedora (done)
  • activate the three kernel options mentioned above (CONFIG_EXPERT, CONFIG_NAMESPACES, CONFIG_CHECKPOINT_RESTORE), if the kernel maintainers agree to enable those options (done)

Contingency Plan

  • disable kernel options

Documentation

Users can easily checkpoint and restore processes with the crtools package:

crtools dump -D <destination-directory> -t <PID>
crtools restore -D <destination-directory> -t <PID>

http://criu.org/

Release Notes

  • The CRIU (Checkpoint/Restore in User-space) projects offers a user-space implementation of process and process group checkpoint/restore. With the user-space tools crtools included in this release it is possible checkpoint processes and restore them at a later time again (e.g. after a crash) or migrate the checkpointed process or process group to another system. CRIU aims to be as transparent as possible so that no instrumentation or re-compilation of the process to be checkpointed is necessary.

Comments and Discussion