[Devel] [PATCH libvzctl] scripts: vz-rst-action -- Clear @pseudosuper at the very late stage

Cyrill Gorcunov gorcunov at openvz.org
Thu Feb 18 10:16:19 PST 2016


We use this protection when restoring AIO tails, so
that it's too early to drop this flag at setup
namespace phase. Rather make very late one.

https://jira.sw.ru/browse/PSBM-42488

Tested-by: Kirill Tkhai <ktkhai at virtuozzo.com>
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 scripts/vz-rst-action.in | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/vz-rst-action.in b/scripts/vz-rst-action.in
index 56f60a9..e255997 100755
--- a/scripts/vz-rst-action.in
+++ b/scripts/vz-rst-action.in
@@ -68,10 +68,14 @@ case "$CRTOOLS_SCRIPT_ACTION" in
 	ln -s /proc/$pid/ns/net $VE_NETNS_FILE
 
 	if [ -n "$VEID" ]; then
-		cgset -r ve.pseudosuper="0" $VEID
 		cgset -r ve.state="START $pid" $VEID || exit
 	fi
 	;;
+"post-restore")
+	if [ -n "$VEID" ]; then
+		cgset -r ve.pseudosuper="0" $VEID
+	fi
+	;;
 "post-setup-namespaces")
 	restore_devices
 	;;
-- 
2.5.0



More information about the Devel mailing list