From c6842c875d894fc6cba52ad6f5296a7eb4ec21c0 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Thu, 30 Aug 2018 16:12:14 +1000 Subject: [PATCH] wheel-index: only create index once We saw what looks very much like the index generation racing, with "mv" unable to close the index file ... Move to a linear strategy so that each host finishes each task before moving on. Then add run_once to the index generation so only one of the hosts in a python2/3 situation creates the index file. Change-Id: I3761dd9d2ab752e66bcccdd2434405f11535b95f --- playbooks/publish/wheel-mirror.yaml | 2 +- roles/copy-wheels/tasks/main.yaml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/playbooks/publish/wheel-mirror.yaml b/playbooks/publish/wheel-mirror.yaml index 8babfa5591..7531d8a4a0 100644 --- a/playbooks/publish/wheel-mirror.yaml +++ b/playbooks/publish/wheel-mirror.yaml @@ -1,5 +1,5 @@ - hosts: all - strategy: free + strategy: linear pre_tasks: - name: Generate AFS slug - CentOS diff --git a/roles/copy-wheels/tasks/main.yaml b/roles/copy-wheels/tasks/main.yaml index cc3dccd24b..cd9adc870c 100644 --- a/roles/copy-wheels/tasks/main.yaml +++ b/roles/copy-wheels/tasks/main.yaml @@ -3,3 +3,7 @@ - name: Rebuild mirror index script: wheel-index.sh {{ afs_dir }} + # With multiple python2/3 builds, we only need one host to generate + # the final index. All hosts should be finished copying under + # linear strategy. + run_once: True