Skip to content

Commit

Permalink
checkpoint: Add the missing options
Browse files Browse the repository at this point in the history
Add the missing command-line options as documented for runc:
https://github.com/opencontainers/runc/blob/main/man/runc-checkpoint.8.md

(This does not mean that they are necessarily implemented)

Signed-off-by: Christophe de Dinechin <[email protected]>
  • Loading branch information
c3d committed Mar 3, 2023
1 parent 74a499f commit eea81cd
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions crates/liboci-cli/src/checkpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use clap::Parser;
use std::path::PathBuf;

/// Checkpoint a running container
/// Reference: https://github.com/opencontainers/runc/blob/main/man/runc-checkpoint.8.md
#[derive(Parser, Debug)]
pub struct Checkpoint {
#[clap(value_parser = clap::builder::NonEmptyStringValueParser::new(), required = true)]
Expand All @@ -27,4 +28,28 @@ pub struct Checkpoint {
/// Path for saving work files and logs
#[clap(long)]
pub work_path: Option<PathBuf>,
/// Path for previous criu image file in pre-dump
#[clap(long)]
pub parent_path: Option<PathBuf>,
/// Use lazy migration mechanism
#[clap(long)]
pub lazy_pages: bool,
/// Pass a file descriptor fd to criu
#[clap(long)]
pub status_fd: Option<u32>, // TODO: Is u32 the right type?
/// Start a page server at the given URL
#[clap(long)]
pub page_server: Option<String>,
/// Do a pre-dump
#[clap(long)]
pub pre_dump: bool,
/// Cgroups mode
#[clap(long)]
pub manage_cgroups_mode: Option<String>,
/// Checkpoint a namespace, but don't save its properties
#[clap(long)]
pub empty_ns: bool,
/// Enable auto-deduplication
#[clap(long)]
pub auto_dedup: bool,
}

0 comments on commit eea81cd

Please sign in to comment.