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 24652309DB5 for ; Tue, 2 Sep 2025 13:54:44 +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=1756821284; cv=none; b=JLLsvSQdWrWqZIrWaNXk/cu6kV/3n4unjIngYgpxEC03n+wH0cXpvLoaLuXvOGsHpxIafbvL0LicFiaV3vZ7jodh2k4rtRnxeMJx6/+yKQY/j8g7+KNxVLmzWXKeYKHpMlWd+IX1aiEDgJcZwXTv/q8OWHEWUkBj5lY4fcH4Doc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756821284; c=relaxed/simple; bh=hIruddNVVp1kW0x2qjc7/hGbDlVg/QPAf5Xxk5lIvd0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oB3669dnIjC0Muqrjx3+0kdgsS3Khu52Uzi5MC/kbf/LtwVYQOAsbIm2h8NytnbBzvt/AsQOSurv2r46wYivePjj5M9tmYIgcPar5nZ+5ZoGLb5eM148DnEbbQZ2R6x+rVUa2hKUlcZUYMMbpCP+rOAFfQUMAwm+8ueOeoY1PfI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mUIB0+mL; 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="mUIB0+mL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3BAFC4CEF6; Tue, 2 Sep 2025 13:54:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1756821284; bh=hIruddNVVp1kW0x2qjc7/hGbDlVg/QPAf5Xxk5lIvd0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mUIB0+mLofv9J7UHy+RylqnmraYinzWCZSlbpP4B5SBKC9Itd1gVMQx368eeC6YyU 4fp5MZ5Jr9dNSkI/r6488EuBxg/taWp2291ZAZTPsd5DPIMZaxDximA/fBOjY+14Ty cvEP59QpmCsZMXjMOkVlRvuZceiBCg4vdldble6IeZpH8e0vztLkN85gpxOPrKsRWG R4IRGFW7ChbYCK49lIAF8XRgIUjJt11WLPs3zINnl2fmKR9QkAKkx86fLG9BRyN1Bi SMX5FRU17p6t7tcB7lfrvAIEBP3MtGuJlhUoX2CUm1td8BIwhue+/K8rA9E+8aHuit B5RLIHsVRjpjw== From: Chuck Lever To: Cc: Chuck Lever Subject: [PATCH v2 30/37] ltp: Replace /opt with a symlink to data partition Date: Tue, 2 Sep 2025 09:54:17 -0400 Message-ID: <20250902135426.815079-31-cel@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250902135426.815079-1-cel@kernel.org> References: <20250902135426.815079-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 install. 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