Tox/Zuul: Ignore STX mirror unreachable error
The install-stx-custom-deps playbook that is used to pull STX versions of dependencies before running the py39 zuul job would fail if the STX mirror was unreachable. Even worse, the error message would simply say "Failed to update apt cache: unknown reason" Changes: - More logs when running apt update - Will no longer fail if STX mirror is unreachable Test Plan: pass: works when STX mirror is reachable pass: works when STX mirror is unreachable Closes-Bug: 2117173 Change-Id: Ia51feb681e5579e620adb20158b60a148dc2c6ee Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com>
This commit is contained in:
@@ -1,10 +1,29 @@
|
||||
---
|
||||
- name: Add STX master repo
|
||||
apt_repository:
|
||||
filename: "{{ stx_master_tag }}"
|
||||
repo: "deb [trusted=yes] {{ stx_master_repo }} /"
|
||||
- name: Assert STX master apt repo file exists
|
||||
file:
|
||||
path: "{{ stx_master_repo_file }}"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0644"
|
||||
state: "touch"
|
||||
become: true
|
||||
|
||||
- name: Configure STX master apt repo
|
||||
lineinfile:
|
||||
line: "deb [trusted=yes] {{ stx_master_repo }} /"
|
||||
state: "present"
|
||||
path: "{{ stx_master_repo_file }}"
|
||||
become: true
|
||||
|
||||
# Using this instead of ansible's "apt_repository"
|
||||
# because it provides better logs.
|
||||
# Note it DOES NOT FAIL the playbook, even if some repo can't be reached
|
||||
- name: Apt update
|
||||
command: "apt update"
|
||||
become: true
|
||||
|
||||
# This will still fail if one of the required pkgs can't
|
||||
# be found on any reachable apt repo
|
||||
- name: Install dependencies from STX master package repo
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
|
@@ -1,6 +1,8 @@
|
||||
---
|
||||
stx_master_repo: "https://mirror.starlingx.windriver.com/mirror/starlingx/master/debian/monolithic/latest_build/outputs/std/packages"
|
||||
|
||||
stx_master_repo_file: "/etc/apt/sources.list.d/stx_master_repo.list"
|
||||
|
||||
stx_master_tag: stxmaster
|
||||
|
||||
stx_master_deps:
|
||||
|
Reference in New Issue
Block a user