user-cr: Add --netns switch to user-cr checkpoint
PATCH 1/1 user-cr: Add --netns switch to user-cr checkpoint
This allows the caller to set the CHECKPOINT_NETNS flag on the checkpoint operation, thus triggering the checkpoint of network namespaces.
--- app-checkpoint.h | 1 + checkpoint-main.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletions(-)
app-checkpoint.h +1 -0
@@ -5,6 +5,7 @@ struct app_checkpoint_args {int uerrfd;int container;int verbose; +int flags; };struct app_restart_args {
checkpoint-main.c +7 -1
@@ -30,6 +30,7 @@ static char usage_str[] =" -l,--logfile=FILE write error and debug data to FILE (default=none)\n" " --logile-fd=FD write error and debug data to file descriptor FD\n" " -c,--container require the PID is a container-init\n" +" -N,--netns checkpoint network namespace(s)\n" " -v,--verbose verbose output\n" "" ;
@@ -61,9 +62,10 @@ static void parse_args(struct app_checkpoint_args *args, int argc, char *argv[]) { "logfile-fd", required_argument, NULL, 2 }, { "container", no_argument, NULL, 'c' }, { "verbose", no_argument, NULL, 'v' }, + { "netns", no_argument, NULL, 'N' }, { NULL, 0, NULL, 0 } }; -static char optc[] ="hvco:l:" ; +static char optc[] ="hvco:l:N" ;char *output;char *logfile;
@@ -109,6 +111,9 @@ static void parse_args(struct app_checkpoint_args *args, int argc, char *argv[])case 'v' : args->verbose =1 ;break ; +case 'N' : + args->flags |=CHECKPOINT_NETNS ; +break ;default :usage (usage_str); }
@@ -164,6 +169,7 @@ int main(int argc, char *argv[])exit (1 ); } + flags = args.flags;if (!args.container) flags |=CHECKPOINT_SUBTREE ;
Signature · 1 line
1.6.3.3
A message that is not in the archive (sent off-list or not yet received): 1270215495-4371-1-git-send-email-danms-r/[email protected]
Serge E. Hallyn
Acked-byQuoted 4 lines · Dan Smith
This allows the caller to set the
CHECKPOINT_NETNSflag on the checkpoint operation, thus triggering the checkpoint of network namespaces.Signed-off-by Dan Smith <danms-r/[email protected]>
Quoted 66 lines
--- app-checkpoint.h | 1 + checkpoint-main.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletions(-)app-checkpoint.h +1
-0@@ -5,6 +5,7 @@ struct app_checkpoint_args {int uerrfd;int container;int verbose; +int flags; };struct app_restart_args {checkpoint-main.c +7
-1@@ -30,6 +30,7 @@ static char usage_str[] =" -l,--logfile=FILE write error and debug data to FILE (default=none)\n" " --logile-fd=FD write error and debug data to file descriptor FD\n" " -c,--container require the PID is a container-init\n" +" -N,--netns checkpoint network namespace(s)\n" " -v,--verbose verbose output\n" "" ;@@ -61,9 +62,10 @@ static void parse_args(struct app_checkpoint_args *args, int argc, char *argv[]) { "logfile-fd", required_argument, NULL, 2 }, { "container", no_argument, NULL, 'c' }, { "verbose", no_argument, NULL, 'v' }, + { "netns", no_argument, NULL, 'N' }, { NULL, 0, NULL, 0 } }; -static char optc[] ="hvco:l:" ; +static char optc[] ="hvco:l:N" ;char *output;char *logfile;@@ -109,6 +111,9 @@ static void parse_args(struct app_checkpoint_args *args, int argc, char *argv[])case 'v' : args->verbose =1 ;break ; +case 'N' : + args->flags |=CHECKPOINT_NETNS ; +break ;default :usage (usage_str); }@@ -164,6 +169,7 @@ int main(int argc, char *argv[])exit (1 ); } + flags = args.flags;if (!args.container) flags |=CHECKPOINT_SUBTREE ;Signature · 6 lines
1.6.3.3 _______________________________________________ Containers mailing list Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org https://lists.linux-foundation.org/mailman/listinfo/containers
A message that is not in the archive (sent off-list or not yet received): 20100405132402.GD32049-r/[email protected]
Pulled, thanks.
Quoted 79 lines · Serge E. Hallyn
Quoted 4 lines · Dan Smith
This allows the caller to set the
CHECKPOINT_NETNSflag on the checkpoint operation, thus triggering the checkpoint of network namespaces.Signed-off-by Dan Smith <danms-r/[email protected]>Quoted 66 lines
--- app-checkpoint.h | 1 + checkpoint-main.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletions(-)app-checkpoint.h +1
-0@@ -5,6 +5,7 @@ struct app_checkpoint_args {int uerrfd;int container;int verbose; +int flags; };struct app_restart_args {checkpoint-main.c +7
-1@@ -30,6 +30,7 @@ static char usage_str[] =" -l,--logfile=FILE write error and debug data to FILE (default=none)\n" " --logile-fd=FD write error and debug data to file descriptor FD\n" " -c,--container require the PID is a container-init\n" +" -N,--netns checkpoint network namespace(s)\n" " -v,--verbose verbose output\n" "" ;@@ -61,9 +62,10 @@ static void parse_args(struct app_checkpoint_args *args, int argc, char *argv[]) { "logfile-fd", required_argument, NULL, 2 }, { "container", no_argument, NULL, 'c' }, { "verbose", no_argument, NULL, 'v' }, + { "netns", no_argument, NULL, 'N' }, { NULL, 0, NULL, 0 } }; -static char optc[] ="hvco:l:" ; +static char optc[] ="hvco:l:N" ;char *output;char *logfile;@@ -109,6 +111,9 @@ static void parse_args(struct app_checkpoint_args *args, int argc, char *argv[])case 'v' : args->verbose =1 ;break ; +case 'N' : + args->flags |=CHECKPOINT_NETNS ; +break ;default :usage (usage_str); }@@ -164,6 +169,7 @@ int main(int argc, char *argv[])exit (1 ); } + flags = args.flags;if (!args.container) flags |=CHECKPOINT_SUBTREE ;Signature · 6 lines
1.6.3.3 _______________________________________________ Containers mailing list Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org https://lists.linux-foundation.org/mailman/listinfo/containers_______________________________________________
Containers mailing list Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
https://lists.linux-foundation.org/mailman/listinfo/containers