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

Signed-off-by: Cyrill Gorcunov <gorcu...@openvz.org>
---
 scripts/vz-rst-action.in | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/scripts/vz-rst-action.in b/scripts/vz-rst-action.in
index c910677..697c25b 100755
--- a/scripts/vz-rst-action.in
+++ b/scripts/vz-rst-action.in
@@ -79,6 +79,18 @@ case "$CRTOOLS_SCRIPT_ACTION" in
 "post-setup-namespaces")
        restore_devices
        if [ -n "$VEID" ]; then
+               #
+               # Temp fix for https://jira.sw.ru/browse/PSBM-47753
+               # The ploop device is changing his minor when migrating
+               # from one machine to another.
+               #
+               # Lets simply allow to read/write into ploops inside
+               # container (each container carries own devtpmfs so
+               # can't access to other's ploop instaces). Otherwise
+               # when we're restoring inotify wathees over container
+               # root which has been on "old" ploop instace, the
+               # kernel prevents us to do so stopping the migration.
+               echo "b 182:* rw" > /sys/fs/cgroup/devices/$VEID/devices.allow
                [ -n "$VE_OS_RELEASE" ] && cgset -r 
ve.os_release="$VE_OS_RELEASE" $VEID
        fi
        ;;
-- 
2.5.5

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to