vzmigrate: fix ploop-based CT migration wrt symlinks
If VE_ROOT or VE_PRIVATE is a symlink (or there's a symlink in one of
it's components), function get_ploop_info() is not working, since kernel
displays canonicalized paths in /proc/mounts and other files.
For example, if /vz is a symlink to /var/lib/vz and VE_ROOT is
/vz/root/$VEID, get_ploop_info() will fail.
To fix, canonicalize VE_ROOT and VE_PRIVATE in get_ploop_info() using
readlink -f.
Proper solution would be to add required fields to vzlist, something
like -o device, top_delta etc. But this commit fixes the problem.
https://bugzilla.openvz.org/2475
Reported-by: Paparaciz <helpaz@gmail.com>
Reported-by: Kalin Bogatzevski <kalin@bul.net>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed