From patchwork Thu Mar 19 07:32:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 1258009 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=M6Ldp58B; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48jdtc6Rjdz9sPF for ; Thu, 19 Mar 2020 18:33:28 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 339152050E; Thu, 19 Mar 2020 07:33:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wIPWey6KgUO6; Thu, 19 Mar 2020 07:33:24 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id DCC8A204F5; Thu, 19 Mar 2020 07:33:23 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id B6947C18DA; Thu, 19 Mar 2020 07:33:23 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id CE984C07FF for ; Thu, 19 Mar 2020 07:33:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B8617204FE for ; Thu, 19 Mar 2020 07:33:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q5wVayv1VYJT for ; Thu, 19 Mar 2020 07:33:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by silver.osuosl.org (Postfix) with ESMTPS id 9A199204F5 for ; Thu, 19 Mar 2020 07:33:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584603198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/M2rGw2dJ6KiHCONX0tPNUSl8qgxyUYhJl+1JdWDVVU=; b=M6Ldp58B0Fzfgm8WWTjwm5SFWESyA5vWP4goLzf6VjSyKdfDrJ3wsuFUTzkyYwptRPQwxg UZnhymORm4UPooDQgFQiRhZ67HTOJYfYUiFwFjIXNJC6lWsxoVqmeZ0wUKNgffgjNytbhn MHGhbiBG9CqQPUMoQnEcEChIYDCGqhc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-216-TZPDiZK4PYmmkIdE0jEzmQ-1; Thu, 19 Mar 2020 03:32:58 -0400 X-MC-Unique: TZPDiZK4PYmmkIdE0jEzmQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 72938107ACCC; Thu, 19 Mar 2020 07:32:57 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.193.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id E621D6EF9E; Thu, 19 Mar 2020 07:32:55 +0000 (UTC) From: David Marchand To: dev@openvswitch.org Date: Thu, 19 Mar 2020 08:32:40 +0100 Message-Id: <20200319073240.32718-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: i.maximets@ovn.org Subject: [ovs-dev] [PATCH] travis: Fix kernel download retry. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" wget stops retrying to download a file when hitting fatal http errors like 503. But if a previous try had resulted in a partially downloaded ${file}, the next wget call tries to download to ${file}.1. Example: +wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.16.18.tar.xz --2020-03-18 20:51:42-- https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.16.18.tar.xz Resolving cdn.kernel.org (cdn.kernel.org)... 151.101.1.176, 151.101.65.176, 151.101.129.176, ... Connecting to cdn.kernel.org (cdn.kernel.org)|151.101.1.176|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 103076276 (98M) [application/x-xz] Saving to: ‘linux-4.16.18.tar.xz’ linux-4.16.18.tar.x 0%[ ] 13.07K --.-KB/s in 0s 2020-03-18 20:54:44 (133 MB/s) - Read error at byte 13383/103076276 (Connection reset by peer). Retrying. --2020-03-18 20:54:45-- (try: 2) https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.16.18.tar.xz Connecting to cdn.kernel.org (cdn.kernel.org)|151.101.1.176|:443... connected. HTTP request sent, awaiting response... 503 first byte timeout 2020-03-18 20:55:46 ERROR 503: first byte timeout. +wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.16.18.tar.xz --2020-03-18 20:55:46-- https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.16.18.tar.xz Resolving cdn.kernel.org (cdn.kernel.org)... 151.101.1.176, 151.101.65.176, 151.101.129.176, ... Connecting to cdn.kernel.org (cdn.kernel.org)|151.101.1.176|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 103076276 (98M) [application/x-xz] Saving to: ‘linux-4.16.18.tar.xz.1’ linux-4.16.18.tar.x 100%[===================>] 98.30M 186MB/s in 0.5s 2020-03-18 20:55:56 (186 MB/s) - ‘linux-4.16.18.tar.xz.1’ saved [103076276/103076276] Fixes: 048674b45f4b ("travis: Retry kernel download on 503 first byte timeout.") Signed-off-by: David Marchand Acked-by: Kevin Traynor --- .travis/linux-build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh index 359f7773ba..74e1028573 100755 --- a/.travis/linux-build.sh +++ b/.travis/linux-build.sh @@ -35,7 +35,9 @@ function install_kernel() url="${base_url}/linux-${version}.tar.xz" # Download kernel sources. Try direct link on CDN failure. - wget ${url} || wget ${url} || wget ${url/cdn/www} + wget ${url} || + (rm -f linux-${version}.tar.xz && wget ${url}) || + (rm -f linux-${version}.tar.xz && wget ${url/cdn/www}) tar xvf linux-${version}.tar.xz > /dev/null pushd linux-${version}