From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (unknown [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 2AA2A80275 for ; Mon, 31 Aug 2026 23:41:57 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 67VNekxK031933; Tue, 1 Sep 2026 02:40:47 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 67VNekxK031933 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="PHsf89Ru" Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 67VNedne031911 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Tue, 1 Sep 2026 02:40:39 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 67VNedne031911 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-49b0d7a07acso1976535e9.3 for ; Mon, 31 Aug 2026 16:40:39 -0700 (PDT) X-Gm-Message-State: AFuF++miFLXZbE4uz8yYXlkU5Dre3/1Sh//CyMr1dDv+BO4jTxqjapI7 KJF/mLQBs4aH24iAb+RDmCRxyGKFVz5Ps5HxJlMyP35GXX+3Ad9uxl2iDXU4eho2vGr728eJToj SS6I1ZltoIFUl2qGCQcyHILj0phOLQmtvD3bop9+iz5/ZKsbSGQBuew== X-Gm-Gg: AR+sD12JtPU1MYHerIgS8wRefawTDyRMdkWUG03xKyYhU18WzGAW7/t+Uiqy6tRoAMr tn8G5DKN0CUgv7/CulmFT/1BwclM+kPgiAJ3trl9UxBUbbRAOJ8UIIoigpT0MB/dGMIz+eet0Xe NDKTI2wtuCtY9RXTlPQhAt7F+/h0zDbks60iGZReBkZt/tLtDkWxXIr9/Fhdbons2JmhRaMHGEy 8fz9Mh3bHyZiwdyjv/wbidScQ26p/MZv9lsZaaiNH5hNsefOihmUmE+oKEz6fmNzVr/aXUudQXu JswOEoVHlv0exOUrUqis0OmpYBYeTyVPYnKI4Kgth2PEVnBRSz34UOIVdUzHyfvd+Pk9jGmeNHM BeVvSLHGkRMPwn1x+IXaTy7Knzg== X-Received: by 2002:a05:600c:b85:b0:49c:c96a:d36b with SMTP id 5b1f17b1804b1-49cc96ad411mr365132625e9.12.1788219639228; Mon, 31 Aug 2026 16:40:39 -0700 (PDT) X-Received: by 2002:a05:600c:b85:b0:49c:c96a:d36b with SMTP id 5b1f17b1804b1-49cc96ad411mr365132255e9.12.1788219638813; Mon, 31 Aug 2026 16:40:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1788219638; cv=none; d=google.com; s=arc-20260327; b=CgSvQv/X0rQG7e5nFlbrH5bLJ63AowBvpPKi54BCnYmoTGz0VdSu+onD6tMIJH7yIo 0O4pC3c3trER5LV0EBh1Zv0tIXRbAuF7Km0cXib07btJgeqsdsbPeEJ9uwifWsnkJh9m 0Xu9N391lJXqz0+Kbjg0wqhc0/cXPRXdB2jNMDxIS20CJVmiDdTEf7sNqf1UlfaIN8mP bMiTvED0Ys7S/Ee5n1lp63aVUBRSSxkUU/IXvdavzEs4vd8iMlhX64cNmqaRJ0gZXqXv gEC3bqHBvvbAidu1MV+3VqvhgSEyP3AUZZNBQRx7lEYcZOOsj3En9uaU6a55ZI8KgtSF tuSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ehi+8RZImo7DnBeDNQAubx3vvYCXR2G7C7Ia4ygDaak=; fh=WpT6aB7RBAGHZeWZzqAr71yzRFbPTYkPWKsRagLn48Q=; b=jCKvs50aL6B43Lw3/j87W6VUQHfNBAGxKNm7dhWH7dAGsO83xehaKCpX1lH9x+6jFw shSvnq67rjZ/VPTmmWRVRI7k6AprwM1c2znm47VgJfYCysrSqVMH8L+UEowVSHBPZJfh fV0EdZAmYCTS2B7fN+Rv145s3XMF02MAGhrrkHKjKy/QVG9U+nvk6/warvOIQMaYZkps Nmb8T2Te3GWaRoIXuoCMtT2WglcNE3BliVYWt1csGnq3uBdcEKsLazD1MnbcUyry8xA4 LLebUj2qRPOemS+bEpuvzNV7w7nbWrhYM4eHnhcLsHY2L61ktJYa/3hFr3ZyKaxGAZxY DJPQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=PHsf89Ru; spf=pass (google.com: domain of eva.kurchatova@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=eva.kurchatova@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id 5b1f17b1804b1-49cdce45380si18543835e9.13.2026.08.31.16.40.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2026 16:40:38 -0700 (PDT) Received-SPF: pass (google.com: domain of eva.kurchatova@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=PHsf89Ru; spf=pass (google.com: domain of eva.kurchatova@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=eva.kurchatova@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=ehi+8RZImo7DnBeDNQAubx3vvYCXR2G7C7Ia4ygDaak=; b=PHsf89RurUBz kMGPQC6tkuAbXZIxQPGqXIUP7iUZAdx/+9jI+4BMNMc/O7wPZlcbpKsvfVEPacAgubSNjpNuc1Cpy jC3OTcj1VeEG6SWPjy5JjJSIN2nSEJl5Go9671Fr7KBg/9AdraAttZBDzsZJ6SXAx9n3BR2QFlPYT Trn+T4PDSEKQV8QTV6zSRIzvEanJ2B7RUNcEy6WHs824KIaROI2zg0+8anC7RFSeoaFtiNEyFO9Wa mfrpvunxTr5fpTsCPRDAKiydCDMjuGv7z1Y07IPgAEbl3QtXyX1r1zqorFtrCOo3T883xot+wH8T9 KMprvI1wwZTsLZFYApy6ZQ==; Received: from ch-vpn.virtuozzo.com ([130.117.225.6] helo=LekKit-T14) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1x1BZr-00AjTr-27; Tue, 01 Sep 2026 01:40:29 +0200 From: Eva Kurchatova To: khorenko@virtuozzo.com Date: Tue, 1 Sep 2026 02:39:52 +0300 Message-ID: <20260831234036.1649006-3-eva.kurchatova@virtuozzo.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260831234036.1649006-1-eva.kurchatova@virtuozzo.com> References: <20260831234036.1649006-1-eva.kurchatova@virtuozzo.com> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH vz10 3/3] selftests: bonding: do not build on the namespaces of a killed run X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org lag_setup2x2() creates lag_node1 and lag_node2 and then moves a veth into each with ip link set dev lag1 netns lag_node1 down name eth0 which asks for the move, the state and the rename in one request. The namespaces are removed by lag_cleanup() from an exit trap, so a run that is killed instead, by the timeout of the suite for one, leaves them behind. The next run then finds them: ip netns add fails, the veth is moved into a namespace that already has an eth0, the rename fails after the move has been committed, and the kernel says so: A link change request failed with some changes committed already. Interface lag1 may have been left with an inconsistent configuration, please check. What is left is half a topology, and a bond built on it does not come back: TEST: mode (2) bond recovery [FAIL] Bond failed to recover Only some of the cases fail, which is what makes it look like a timing problem. With lag_node1 and lag_node2 left over on purpose, one case of the seven in mode-2-recovery-updelay.sh fails; with them removed first, three runs of seven pass, and so does mode-1-recovery-updelay.sh, which uses the same library. https://virtuozzo.atlassian.net/browse/VSTOR-139651 Feature: fix selftests Signed-off-by: Eva Kurchatova --- .../selftests/drivers/net/bonding/lag_lib.sh | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/drivers/net/bonding/lag_lib.sh b/tools/testing/selftests/drivers/net/bonding/lag_lib.sh index bf9bcd1b5ec0..7ac6c4d055eb 100644 --- a/tools/testing/selftests/drivers/net/bonding/lag_lib.sh +++ b/tools/testing/selftests/drivers/net/bonding/lag_lib.sh @@ -90,9 +90,18 @@ lag_setup2x2() local state=${1:-down} local namespaces="lag_node1 lag_node2" - # create namespaces + # create namespaces. A run of one of these tests that was killed, + # by the timeout of the suite for one, does not get to its cleanup + # and leaves these behind; the ip link set below then moves a veth + # into a namespace that already has an eth0, fails on the rename it + # is asked for in the same request, and leaves half a topology: + # A link change request failed with some changes committed already. + # Interface lag1 may have been left with an inconsistent + # configuration, please check. + # Take what is left over before building on top of it. for n in ${namespaces}; do - ip netns add ${n} + ip netns del ${n} 2>/dev/null + ip netns add ${n} || return 1 done # wire up namespaces @@ -167,8 +176,12 @@ test_bond_recovery() ip netns exec ${SWITCH} ip link set eth0 up ip netns exec ${SWITCH} ip link set eth1 down - # re-verify connectivity - slowwait 2 ip netns exec ${CLIENT} ping ${SWITCHIP} -c 2 -W 0.1 &> /dev/null + # re-verify connectivity. With no member up the bond is supposed to + # bring one up at once instead of waiting out updelay, so this must + # stay below the smallest updelay the callers rely on, 5000ms, while + # leaving enough room for a busy machine: two seconds is not enough + # and the case with updelay 1000 fails now and then. + slowwait 4 ip netns exec ${CLIENT} ping ${SWITCHIP} -c 2 -W 0.1 &> /dev/null local rc=$? check_err $rc "Bond failed to recover" -- 2.55.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel