[CRIU] [PATCH v2 09/17] action-scripts: ACT_POST_NET_LOCK stage added
Stanislav Kinsburskiy
skinsbursky at virtuozzo.com
Thu May 19 02:23:45 PDT 2016
This stage is required for NFS migration to add additional iptables rules
to allow NFS ports. Without this any request to a file, located on NFS, will
stuck.
This stage is executed right _after_ network lock.
Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
criu/action-scripts.c | 1 +
criu/include/action-scripts.h | 1 +
criu/net.c | 4 +++-
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/criu/action-scripts.c b/criu/action-scripts.c
index 500e239..ca0fe62 100644
--- a/criu/action-scripts.c
+++ b/criu/action-scripts.c
@@ -23,6 +23,7 @@ static const char *action_names[ACT_MAX] = {
[ ACT_SETUP_NS ] = "setup-namespaces",
[ ACT_POST_SETUP_NS ] = "post-setup-namespaces",
[ ACT_POST_RESUME ] = "post-resume",
+ [ ACT_POST_NET_LOCK ] = "post-network-lock",
};
struct script {
diff --git a/criu/include/action-scripts.h b/criu/include/action-scripts.h
index 4d56300..47cb48f 100644
--- a/criu/include/action-scripts.h
+++ b/criu/include/action-scripts.h
@@ -11,6 +11,7 @@ enum script_actions {
ACT_SETUP_NS = 6,
ACT_POST_SETUP_NS = 7,
ACT_POST_RESUME = 8,
+ ACT_POST_NET_LOCK = 9,
ACT_MAX
};
diff --git a/criu/net.c b/criu/net.c
index 59c1161..ea5c3ca 100644
--- a/criu/net.c
+++ b/criu/net.c
@@ -1580,7 +1580,9 @@ int network_lock(void)
if (run_scripts(ACT_NET_LOCK))
return -1;
- return network_lock_internal();
+ if (network_lock_internal())
+ return -1;
+ return run_scripts(ACT_POST_NET_LOCK);
}
void network_unlock(void)
More information about the CRIU
mailing list