vz7/vz9: update version and targets.list for u213.18.0.X is for u20 and old vz9 builds
3.18.1.X is for u21 and new vz9 builds
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
cgroud: unblock SIGTERM in cgroupd parent to eliminate possible raceI see that sometimes in jenkins criu is still unable to terminate
cgroupd, waitpid hangs after kill(SIGTERM), but I can kill cgrould with
SIGTERM manually. There is a race window if SIGTERM is sent too early
before cgroupd have set default behaviour for it, let's try to fix it.
https://jira.vzint.dev/browse/PSBM-147000
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Feature: Jenkins
zdtm: cleanup session04 test processes on successWhen we run it from vzt-cpt that can lead to leftover processes after
test finishes.
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Feature: Pid & User namespaces
spfs: do not umount original mountSpfs remembers original spfs mount id (update_spfs_info) and later
checks it (is_mnt_fd) on fd/map/cwd/root/exe replacement, so fd openned
on bindmount of spfs is not swapped back to nfs. We can workaround it by
leaving original spfs mount in restored mntns.
note: Right fix here should be to collect in spfs all ids of all spfs
mounts belonging to one superblock and replace all fds from all tho...
spfs: do mount request from mount namespace of nfs mountSpfs takes mount namespace from root task pid and saves it, that's why
we need to change root task mount namespace for the time of request.
https://jira.vzint.dev/browse/PSBM-147276
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Feature: SPFS
mount-v2: bind dev proc and sysfs for spfs into restored mount namespaceWe need to mount spfs in restored mount namespace, but to do so spfs
manager requires those helper filesystems. We mount them outside of
restored root so they will dissapear after pivot_root.
https://jira.vzint.dev/browse/PSBM-147276
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Feature: SPFS
mount: skip source check for autofs mounts in bindmount searchWe see that autofs_revisit_options can re-read changed options about
autofs, it means that we should not rely on it when checking bindmounts.
https://jira.vzint.dev/browse/PSBM-148081
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Feature: Auto mounts
Revert "soccr: do not disable tcp repair when sending unsent data"We tried this patch as a w/a for PSBM-147346, but it broke tests in
other places, so let's revert it to get reproduce of the original issue
back.
https://jira.vzint.dev/browse/PSBM-148050
Reverts: 126815fc5 ("soccr: do not disable tcp repair when sending unsent data")
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Feature: Tcp Repair
sk-unix: ignore closed or non-empty in-flight socketsHere is another hacky patch, it basically reverts mainstream patch:
dca55d281 ("criu: fail migration if data was sent to an in-flight socket")
Leave the error messages about the problem to still be aware of it.
It is error-prone to do so, but we lived without this safety check for
some time, so we can fix it properly later and revert it to unblock
tests for now.
https://jira.vzint.dev/browse/...
soccr: do not disable tcp repair when sending unsent dataDisabling tcp repair here can lead to tcp_reset() in kernel for the
socket and after that we would get ECONNRESET and EIO when sending to
this socket.
This is more a work around as I don't fully understand why we see this
problem, it seemed that nothing changed in this area in 3.18 rebase.
https://jira.vzint.dev/browse/PSBM-147346
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
F...
filesystems: do binfmt_misc_restore only onceOne can mount binfmt_misc filesystem in container several times with
different sources:
mount -t binfmt_misc binfmt_misc_1 /mnt/binfmt1/
mount -t binfmt_misc binfmt_misc_2 /mnt/binfmt2/
But though the source is different content would be the same as
binfmt_misc is virtualized per ve cgroup, so it's enough to restore
content once.
note: Before rebase to 3.18 criu, we just ignored source check...
mount-v2: copy flags to wide mount helpersIf helper bind-mount has zero flags, our flags restore code may fail on
trying to restore those zero flags, if bind-source had some locked
flags, for instance for external mount bind-source.
https://jira.vzint.dev/browse/PSBM-148010
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Feature: Mounts
overlayfs: fix error handling in __overlayfs_mountDon't leak nsfd and orig_nsfd on error path.
Fixes: 6ce4dd6bb ("overlayfs: do mount in mntns of lower/upper/workdir mounts")
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Feature: Overlayfs
zdtm: add overlayfs_nestedns testThis test does same as overlayfs test but in nested mount namespace.
https://jira.vzint.dev/browse/PSBM-147254
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Feature: Overlayfs
overlayfs: do mount in mntns of lower/upper/workdir mountsWe have VZ specific kernel feature for overlayfs to show mount ids of
original lower/upper/work source mounts. So when restoring overlayfs, we
need to make those shown mount ids belong to restored mntns, else we
would have trouble on next c/r.
https://jira.vzint.dev/browse/PSBM-147254
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Feature: Overlayfs
mount-v2: add remove_plain_mountpoint helperWill use it for mounting overlayfs mount in mntns of lower mount.
https://jira.vzint.dev/browse/PSBM-147254
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Feature: Overlayfs
mount-v2: export bind_plain_to_other_mntns helperWill use it for mounting overlayfs mount in mntns of lower mount.
https://jira.vzint.dev/browse/PSBM-147254
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Feature: Overlayfs
mount-v2: export create_plain_mountpoint helperWill use it for mounting overlayfs mount in mntns of lower mount.
https://jira.vzint.dev/browse/PSBM-147254
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Feature: Overlayfs
overlayfs: replace ret with exit_code in __overlayfs_mountThe "ret" variable is for receiving returned value from nested function,
"exit_code" is a proper name for what we want to return.
https://jira.vzint.dev/browse/PSBM-147254
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Feature: Overlayfs
overlayfs: remove cwd recovery in overlayfs_mountNow we don't need this inside call_in_child_process.
https://jira.vzint.dev/browse/PSBM-147254
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Feature: Overlayfs
overlayfs: call overlayfs_mount in child processLet's call overlayfs_mount via call_in_child_process, to be able to
switch to desired mount namespace.
https://jira.vzint.dev/browse/PSBM-147254
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Feature: Overlayfs
vz7: systemd-autofs-restart.sh: fix error condition checkWhen fixing lint errors at rebase, $? result check was replaced by using
the comand in if condition directly but logic was broken as now error
hangling branch triggers when command is succesful, let's fix that by
inverting the condition.
https://jira.vzint.dev/browse/PSBM-147268
Fixes: 458370e42 ("vz7: scripts: check service mountpoint is not empty in systemd-autofs-restart.sh")
Signed-off-by:...
zdtm: add mount_complex_sharing02 testThis test checks that sharing can be copied to all mounts right. Even
when it can't be copied without some helper mounts, meaning that in
parent sharing group we have narrower mount then in child sharing group.
We have here 4 external mounts with same sharing and with different
roots src/a, src/b, src/c and src/d.
And for each of them we have 5 levels of slave sharing groups, where on
upper l...
mount: add wide mounts for sharing groups where requiredIn general, if we ommit corner cases like multiple external mounts with
same sharing group, to restore all mounts of one sharing group we should
have a mount ("wide" mount) in it with root covering all other mounts of
this sharing group and all mounts of it's descendants.
When we have sharing group without "wide" mount we can restore it by
creating helper "wide" mount.
This helper "wide" moun...
mount: search covering mounts for sharing groupsIn general, if we ommit corner cases like multiple external mounts with
same sharing group, to restore all mounts of one sharing group we should
have a mount ("wide" mount) in it with root covering all other mounts of
this sharing group and all mounts of it's descendants.
By searching covering mounts for each sharing group we can understand if
this sharing group has such a single "wide" mount ...
mount: search covering mounts for each superblockHaving this information should help creating helper wide mounts for
sharing group restore.
https://jira.vzint.dev/browse/PSBM-147120
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Feature: Mounts
mount: introduce covering mounts functionalityThis is designed for chosing, for the set of mounts, a minimal set of
mounts which covers all other mounts in terms of mount's root. Meaning
that any particular mount from set has a mount in covering set there
covering mount root is a subpath of the particular mount root.
For instance, if we have mounts with roots:
/a
/a/b
/c/d
/c/d/e
/f/g
/f/h
covering mounts for the...
mount-v2: introduce custom detect_is_dirWe plan to add helper mounts which can only detect their dir/file status
just before they are mounted and also they can't get this status from
mountpoint as regular mounts. Thus we need a custom detect_is_dir
callback for them.
https://jira.vzint.dev/browse/PSBM-147120
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Feature: Mounts
mount: introduce helper mount typesWe plan to add more types of helper mounts. There are already a lot
of them and there is no easy way to distinguish types. So let's
explicitly mark them.
At the same time make the check in clean_cr_time_mounts cleaner, as we
are interested only in cr_time mounts there.
https://jira.vzint.dev/browse/PSBM-147120
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Feature: Mounts
mount-v2: rework can_mount_now_v2This unwraps complex combined (!fsroot_mounted(mi) && !mi->bind &&
!mi->need_plugin) condition to separate conditions. This way we can call
check_unix_bindmount_ready() for bindmounts and mi->fstype->can_mount()
for fsroot mounts, which is much more logical. For instance when we have
an overlay mount which can already be bind-mounted from other overlay
mount, there is no point to check complex ...
zdtm: add scm10 test for scm sent unix sk with closed senderhttps://jira.sw.ru/browse/PSBM-143751
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Feature: Unix sockets
sk-unix: resolve fake queuers vs scm fds in unix sockets fallacyLong story short: we face standard "which was first chicken or egg?"
problem here.
1) In add_fake_unix_queuers() for each unpared established unix socket
we want to add a "fake" queuer. And we want to decide at this point
which task should create this queuer and we just try to copy the task
from original socket. But original socket can have no task yet too,
because it can have no open fds, ins...
sk-queue: order unixsk sent to other unixsk after itHere is how we dump nested unix sockets inside unix sockets:
+-> dump_one_unix_fd <-+
+-> dump_sk_queue |
+-> dump_sk_queue_packet |
+-> dump_packet_cmsg |
+-> dump_one_file |
+-> do_dump_gen_file +
+-> queue_packet_entry
+-> list_add_tail(packets_list)
So in the images more deeper unix socket goes stric...
jenkins/zdtm: dont run tests using zdtmtst cgroup concurrentlyElse result can be undefined behaviour.
https://jira.vzint.dev/browse/PSBM-147000
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Feature: Jenkins