From db37491d79a4dad036b7927e322fb717b72483d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Lehmann?= Date: Wed, 2 Sep 2026 14:36:21 +0200 Subject: [PATCH] tools: install tmp-ci.repo on hosts before update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This repository is disabled by default and can be activated when needed. Signed-off-by: Gaƫtan Lehmann --- lib/tools/tasks/update.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/tools/tasks/update.py b/lib/tools/tasks/update.py index 574dc2963..8ae133626 100644 --- a/lib/tools/tasks/update.py +++ b/lib/tools/tasks/update.py @@ -8,6 +8,7 @@ from collections.abc import Generator from concurrent.futures import ThreadPoolExecutor, as_completed from contextlib import contextmanager +from textwrap import dedent from lib.host import Host from lib.pool import NotAMasterHostError, Pool @@ -142,11 +143,24 @@ def _sync_users_repo(host: Host) -> None: logger.info(f"[{host}] Downloading {repo_url} to {repo_file}") host.ssh(f"curl -fsS -o {repo_file} '{repo_url}'") +def _install_tmp_ci_repo(host: Host) -> None: + """Install the tmp-ci.repo file on the host.""" + repo_file = '/etc/yum.repos.d/tmp-ci.repo' + logger.info(f"[{host}] Writing {repo_file}") + host.create_file(repo_file, dedent("""\ + [xcp-ng-tmp-ci] + name=XCP-ng tmp CI + baseurl=http://repos.lyon.vates.team/repos/tmp-ci/8.3/ + enabled=0 + gpgcheck=0 + """)) + def _update_host(host: Host, enablerepos: list[str], disablerepos: list[str] = [], reboot: bool = True) -> None: """Update a host, with the mirrors.xcp-ng.org baseurl removed during the update.""" with _pinned_updates_repo(host): _sync_users_repo(host) + _install_tmp_ci_repo(host) host.update(enablerepos, disablerepos=disablerepos, reboot=reboot) def update_pools(inventory: Inventory, reboot: bool = True, parallel: bool = False) -> None: