From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BFB8422301 for ; Wed, 8 May 2024 06:50:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715151042; cv=none; b=bBFCtbLrur11ZRRErlPCjtm1rgSsXXLVldknnFN+8vS56ZPKsLklhG7gwCiqTYddA2ftyVqEXqrBqVcMwCpNgnb1ak/ZH9DAHamzh3f9c10gNT8ayZ6mC4Wqlpy4iaZWbXAaTXn78WN5giwP7XKfuDU4MHSUR8ZDBF48SE0ASIY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715151042; c=relaxed/simple; bh=ewPzRDOytVM1zUfJLBLshz3vNTT/W3eeQUN9ujbYcgU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ECPJZ9Hae62uTWdEIarOv4Qp4u9ay279cPR79fY4OwrjBJLfmdRMt7EczSZaXZjNoshBaQ6nTZrWpSsrhKHg3BUnAeGSQLkgfeL2iHNKeX+feO/FWM1fQDeuW/y2iBkg5lgHtonE1+YRrxt8gzph7mSvAWUIX27fTsb2HN/8RwE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=hKZIFgBc; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="hKZIFgBc" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=BNAvEqB/d/787g1o8Xws9OhQ2yH/Nt2iLY71Vvvd3l0=; b=hKZIFgBcNneM7FIfyse+8pr5S0 7mHd8snmWrIPwOAIBLCGOqxpTkXmIF15DW4yUEmWiVlxf/nsIUr+lAve3jnRQ7RTP98Qd2n++y78q 9TfuZ+3ff3m2GplbUMqv+IdzNEdA9Qx6LObWLDLJU2zUIwiumZ7xonwhPKtNfKin514RJwubzwX5i LOj/1iOYAWTIuybcUG6sbLfTB4URpPYLf6wqyToiLACR1duuBtr7BZ4Djooqpyd+ewkFAW8L3hJq8 r76/hxjger18M05wKiYD91c7CNn1GJKQpVNSsSr3vfxDtLdR2eOnTojW/SUg25VG2Kr6RuzDGUTxS MEtyJjyA==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4b8S-0000000EIkN-0eqN; Wed, 08 May 2024 06:50:40 +0000 From: Luis Chamberlain To: kdevops@lists.linux.dev Cc: mcgrof@kernel.org Subject: [PATCH 04/10] guestfs: check for virt-builder failure Date: Tue, 7 May 2024 23:50:32 -0700 Message-ID: <20240508065039.3408637-5-mcgrof@kernel.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240508065039.3408637-1-mcgrof@kernel.org> References: <20240508065039.3408637-1-mcgrof@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Luis Chamberlain When virt-builder fails we were not capturing the failure and just kept moving forward with guest initialization. Ensure we go to jail; do not pass Go, do not collect $200. Signed-off-by: Luis Chamberlain --- scripts/bringup_guestfs.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh index 17fabcecf0d2..f90ed499051b 100755 --- a/scripts/bringup_guestfs.sh +++ b/scripts/bringup_guestfs.sh @@ -86,6 +86,10 @@ _EOT echo "Generating new base image for ${OS_VERSION}" virt-builder ${OS_VERSION} --arch `uname -m` -o $BASE_IMAGE --size 20G --format raw --commands-from-file $cmdfile + if [[ $? -ne 0 ]]; then + echo "Failed to build custom image $BASE_IMAGE" + exit 1 + fi fi # FIXME: is there a yaml equivalent of jq? -- 2.43.0