From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DE292214801 for ; Thu, 4 Sep 2025 15:15:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756998943; cv=none; b=FkDPZhqxzTgplBEWh4CAUDTOqekGvhFrvLU36nOT5R/Q/ugSx/zS2yCS5uGsyqjZsGHq5AcVDdNJ/OQSMc8Igo7U1/8ny6RhiLmxp+lAg5nwvCS4GnpVDifYZR+T+UqbtTs+4pfJeFK2wHXKlUq3IXivzXg3/PurKsdlWMn309c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756998943; c=relaxed/simple; bh=j6IO+lQNERNhGtXgjqu7P5d05CHo5Sy/i5W3aTpJ8T4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YzTSnZiyrqqFOviZXHLWmK06bgoZJBOQlaK7KcP6Q3V3T6WNwpJd0EAUkjuvixGOEdcAZ+UJ9JaYtb7MnF77KpEjMemwcW4sRwes2XDKw3gKCBZGqOJgoTV9wbD1ZyZnNHl65a9r3th33KJ5hPzHNPh8YV8hdacmFyPM7eYLAvs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nE5K4Uue; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nE5K4Uue" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 777F8C4CEF6; Thu, 4 Sep 2025 15:15:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1756998943; bh=j6IO+lQNERNhGtXgjqu7P5d05CHo5Sy/i5W3aTpJ8T4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nE5K4UueEh4mNoZjDfYk4M2cJvfjTRtoe6el5FrUlaQU3u51qXlXiHekjmrX1PH8p nPd9INkTz6X1WGVyEpGaVHQw+AnuuD3H6Ee9yGgxjmLsIP4+L3MB+1NZDqKN8Ho0J3 gFV1ojlBQJemLQPfQGpBcD/sA3bLVokbmXPGwpdL5Pya6Ax+JQqLmQwR2/4NVXuSlp OubPGWaKteHrLZujBfDOBNq7s9M9QpKfieqRcOIFh/HuhJTNdLfL95aDykdJ2oPyxl tKesX6IqyLuWmFB2gL//EFfuplXXmkTyehd4VUc5nmMXcEDFXS+flxZ/TsuKmGZiQg lVTfIZAsQOvnw== From: Chuck Lever To: Cc: Chuck Lever , Luis Chamberlain Subject: [PATCH v3 29/36] ltp: Replace /opt with a symlink to data partition Date: Thu, 4 Sep 2025 11:15:17 -0400 Message-ID: <20250904151526.1596282-30-cel@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250904151526.1596282-1-cel@kernel.org> References: <20250904151526.1596282-1-cel@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 From: Chuck Lever The size of some cloud OS images is too small for the ltp installation (eg, the RHEL 8 OS image on Azure is about 10GB). This causes the ltp workflow to fail 100% of the time during the test build step. A simple solution is to replace /opt with a symlink to /data/opt, as kdevops can make /data large enough to hold the ltp install. Reviewed-by: Luis Chamberlain Signed-off-by: Chuck Lever --- playbooks/roles/ltp/tasks/main.yml | 45 +++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/playbooks/roles/ltp/tasks/main.yml b/playbooks/roles/ltp/tasks/main.yml index 830ec30515f0..1b966771f757 100644 --- a/playbooks/roles/ltp/tasks/main.yml +++ b/playbooks/roles/ltp/tasks/main.yml @@ -162,15 +162,52 @@ target: all jobs: "{{ ansible_processor_nproc }}" -- name: Ensure /opt has correct permissions - tags: ["ltp"] +- name: Set the pathname of the install directory + tags: ["build", "ltp"] + ansible.builtin.set_fact: + ltp_install_dir: "{{ data_path }}/opt" + +- name: Remove existing ltp install directory + tags: ["build", "ltp"] become: true become_flags: "su - -c" become_method: ansible.builtin.sudo ansible.builtin.file: - state: directory - path: "/opt" + path: "{{ ltp_install_dir }}" + state: absent + +- name: Create a fresh ltp install directory + tags: ["build", "ltp"] + become: true + become_flags: "su - -c" + become_method: ansible.builtin.sudo + ansible.builtin.file: + path: "{{ ltp_install_dir }}" + owner: "root" + group: "root" mode: "u=rwx,g=rwx,o=rwxt" + state: directory + +- name: Remove /opt + tags: ["build", "ltp"] + become: true + become_flags: "su - -c" + become_method: ansible.builtin.sudo + ansible.builtin.file: + path: "/opt" + state: absent + +- name: Replace /opt with a symlink + tags: ["build", "ltp"] + become: true + become_flags: "su - -c" + become_method: ansible.builtin.sudo + ansible.builtin.file: + src: "{{ ltp_install_dir }}" + dest: "/opt" + owner: "root" + group: "root" + state: link - name: Install ltp on the test systems tags: ["ltp"] -- 2.51.0