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 48D772F49EF for ; Wed, 27 Aug 2025 03:57:48 +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=1756267069; cv=none; b=hSAV3SiuIf0VNOhYZuhwvuMqf7bMhHA3lMTbj5gEp7zAwD98+3OJcrg9VhTZDoRmN4hnQF2xCBRvXd2+GiT5OI8JucvixZVwhDFGid11BtTTUiuhgMxHyTNoQ6APlBT4qqpgiKuV4sRdFXRwFh4In7IuxQjzDcrj7eKDCD4d24U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756267069; c=relaxed/simple; bh=Hdo3wgVFo1BhIgyn13oNHci/FpOSSuH7lDWvs+d0bh8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PcXescIzsmmHCMhmKwtbRVUVQNTKsaU78S9/3HefLVld/6a4Cru3ns4sqDft6SvZnMa8DGQBAHXPquYhrbF/6oJh5oGUrBQcTk1qEbhRFZhbedz0f+O8exYo/HbLgclHNHS6IuNg5G2ksh6MCGmU8MGWg1lAemMceSa9jkM4MOs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine 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=sYK9zU8/; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine 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="sYK9zU8/" 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=bdYzALq2sZTdvp9TVE2Q4vPxybgX2P02/w5zfqHiY+k=; b=sYK9zU8/gwZrS6/gxX3u7sMNnQ MajDUqQ97cBn9/1R0OMXu/Lfd/zMWtk+2V31LAMkkSgWXTnBo+XuGnQhsGXa55wiy/RS/bGDnRbN4 DBnyMWuLcfFAtRrrO8O8ZpYHgHMMRhva7yHJ77SYIOuA2o1PTMHP5OK0m205HYu+E7WTbh2Dts29x kSeLw63SJFrr1S/jboJMxREXO7TeOSyyRnLjmwNYZZ3Qi1x7weLH3/j4et0vfXxqbuM4uBCZwbaxX Xo4NL8g1zIspvUMdJV3kK9FomjrzJ0B5TNI22FtYQTU4rQnLXJTYBFZRQtmtd6Gi5ysDVI2nzIaS9 YrYvNmhA==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1ur7IB-0000000DuA9-3soF; Wed, 27 Aug 2025 03:57:47 +0000 From: Luis Chamberlain To: Chuck Lever , Daniel Gomez , kdevops@lists.linux.dev Cc: Luis Chamberlain Subject: [RFT 2/4] guestfs: fix custom image bringup failure for Debian 13 Date: Tue, 26 Aug 2025 20:57:45 -0700 Message-ID: <20250827035747.3314144-3-mcgrof@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250827035747.3314144-1-mcgrof@kernel.org> References: <20250827035747.3314144-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 using custom images (like Debian 13 daily builds), the base_image role would incorrectly attempt to build the image using virt-builder even though a custom image workflow was configured. This failed because "debian-13-generic-amd64-daily" is not a valid virt-builder template. The issue had two root causes: 1. The base-image.yml task would run even when custom images were configured, attempting to use virt-builder with an invalid template 2. The custom-image.yml task prepared the custom image but never copied it to the base_image_pathname location expected by subsequent tasks Fix both issues by: - Adding a condition to skip base-image.yml when using custom images - Copying the prepared custom image to the base_image_pathname location This ensures custom images are properly downloaded, prepared with the kdevops user configuration, and placed in the expected location for VM provisioning. Fixes: df31e8f55d7d ("guestfs: fix custom image partition not expanded after disk resize") Generated-by: Claude AI Signed-off-by: Luis Chamberlain --- playbooks/roles/base_image/tasks/custom-image.yml | 11 +++++++++++ playbooks/roles/base_image/tasks/main.yml | 1 + 2 files changed, 12 insertions(+) diff --git a/playbooks/roles/base_image/tasks/custom-image.yml b/playbooks/roles/base_image/tasks/custom-image.yml index 207a5fa1..296424bc 100644 --- a/playbooks/roles/base_image/tasks/custom-image.yml +++ b/playbooks/roles/base_image/tasks/custom-image.yml @@ -281,3 +281,14 @@ - "--no-compression" - "{{ custom_image_dir }}" changed_when: true + +- name: Copy custom image to base image location + become: true + become_method: ansible.builtin.sudo + ansible.builtin.copy: + src: "{{ custom_image }}" + dest: "{{ base_image_pathname }}" + remote_src: true + mode: "u=rw,g=r,o=r" + when: + - custom_image_stat.stat.exists or custom_image_download is changed diff --git a/playbooks/roles/base_image/tasks/main.yml b/playbooks/roles/base_image/tasks/main.yml index 37907d71..05ab68bd 100644 --- a/playbooks/roles/base_image/tasks/main.yml +++ b/playbooks/roles/base_image/tasks/main.yml @@ -17,3 +17,4 @@ file: "{{ role_path }}/tasks/base-image.yml" when: - not result.stat.exists + - not guestfs_has_custom_raw_image|bool -- 2.50.1