ansible: Install libcurl3-gnutls from bookworm-backports
authorKienan Stewart <kstewart@efficios.com>
Mon, 6 Nov 2023 20:28:26 +0000 (15:28 -0500)
committerKienan Stewart <kstewart@efficios.com>
Mon, 6 Nov 2023 21:12:58 +0000 (16:12 -0500)
In the CI builds, we're seeing an issue where certain projects hang
and fail to checkout the gerrit refs.

Eg. ```
git init .
git fetch --tags --force --progress -- \
  https://review.lttng.org/babeltrace \
  +refs/heads/*:refs/remotes/origin/*
git fetch --tags --force --progress -- \
  https://review.lttng.org/babeltrace \
  refs/changes/*:refs/changes/*
```

Not all repositories are affected. There seems to be some type of
content in the gerrit repository that triggers the issue.
After some testing, the version of libcurl3-gnutls available in
bookworm-backports (8.4.0-2~bpo12+1) doesn't seem to be affected
while the version in Debian bookworm (7.88.1-10+deb12u4) fails.

Fetches via SSH are not affected.

Refs #1532

Change-Id: If4b8ca62d5a512c7cccc2225b180b91d3832987d
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
automation/ansible/roles/common/tasks/setup-Debian.yml

index c1420e501c85308a674a2951e7cdd9987f9cef94..d0df1c170a59e04e1e36a7075f229fce2b3a00cd 100644 (file)
     name:
       - prometheus-node-exporter
       - prometheus-node-exporter-collectors
+
+- name: Work-around for git hanging during checkouts
+  # @see https://support.efficios.com/issues/1532
+  when: ansible_distribution_release == 'bookworm'
+  block:
+    - name: Add bookworm-backports pref
+      ansible.builtin.copy:
+        dest: /etc/apt/preferences.d/bookworm-backports.pref
+        content: "Package: curl libcurl3* libcurl4*\nPin: release n=bookworm-backports\nPin-Priority: 600\n"
+    - name: Enable bookworm backports
+      ansible.builtin.apt_repository:
+        repo: 'deb http://deb.debian.org/debian bookworm-backports main'
+    - ansible.builtin.apt:
+        upgrade: 'yes'
This page took 0.023606 seconds and 4 git commands to generate.