• Pavel Tikhomirov's avatar
    kdat: if iptables-restore has xtable lock support do wait on lock · ee7d3bec
    Pavel Tikhomirov authored
    On VZ7 we have a problem in random tests on iptables restore when
    running tests in parallel(one iptables-restore instance tries to lock
    xtables lock and fails while other instance(some iptables* command) is
    already holding the lock):
    
    ================== Run zdtm/static/socket_udp_shutdown in ns ===================
    Start test
    ./socket_udp_shutdown --pidfile=socket_udp_shutdown.pid --outfile=socket_udp_shutdown.out
    Run criu dump
    Run criu restore
    =[log]=> dump/zdtm/static/socket_udp_shutdown/77/1/restore.log
    ------------------------ grep Error ------------------------
    (00.158864)      1: 	Running ip rule delete table local
    (00.167319)      1: 	Running ip rule restore
    (00.175647)      1: 	Running iptables-restore for iptables-restore
    Another app is currently holding the xtables lock. Perhaps you want to use the -w option?
    (00.185245)      1: Error (criu/util.c:719): exited, status=4
    (00.185289)      1: Error (criu/net.c:1739): iptables-restore failed
    (00.185301)      1: Error (criu/net.c:2382): Can't create net_ns
    (00.185370)      1: Error (criu/util.c:1412): Can't wait or bad status: errno=0, status=65280(00.187281) Error (criu/mount.c:2944): mnt: Can't remove the directory /tmp/.criu.mntns.Ai5EG9: No such file or directory
    (00.187298) uns: calling exit_usernsd (-1, 1)
    (00.187344) uns: daemon calls 0x466a40 (93, -1, 1)
    (00.187361) uns: `- daemon exits w/ 0
    (00.188375) uns: daemon stopped
    (00.188390) Error (criu/cr-restore.c:2450): Restoring FAILED.
    ------------------------ ERROR OVER ------------------------
    Test zdtm/static/socket_udp_shutdown FAIL at CRIU restore
    
    https://ci.openvz.org/job/CRIU/job/CRIU-virtuozzo/job/criu-dev/2873
    
    It happens now in every test-suit run on VZ7 host as we had updated to
    1.4.21-18 iptables package, which has patches for xlocks support in
    iptables-restore ported:
    
    * Mon Apr 24 2017 Thomas Woerner <twoerner@redhat.com> 1.4.21-18 - Add
    support for --wait options to restore commands (RHBZ#1438597)
    
    Whether these patches are ported to other distribution packages we'll
    have these problem in other distributions.
    
    Just add -w to wait lock on iptables-restore as older versions does not
    error on invalid option, just warning is printed.
    Signed-off-by: 's avatarPavel Tikhomirov <ptikhomirov@virtuozzo.com>
    Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    ee7d3bec
Name
Last commit
Last update
Documentation Loading commit data...
compel Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
include/common Loading commit data...
lib Loading commit data...
scripts Loading commit data...
soccr Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.compel Loading commit data...
Makefile.config Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...