[Devel] [PATCH libvzctl] scripts: Allow to r/w on old ploop instances in devtmpfs
Cyrill Gorcunov
gorcunov at virtuozzo.com
Tue May 31 07:11:29 PDT 2016
https://jira.sw.ru/browse/PSBM-47753
Signed-off-by: Cyrill Gorcunov <gorcunov at 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
More information about the Devel
mailing list