summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-12-07 16:09:36 +0000
committerGerrit Code Review <review@openstack.org>2018-12-07 16:09:36 +0000
commit041f8b1314474fb67d5662ba9adc8be65c9402ef (patch)
tree6288297303229515056d084c0ccb9e07bdecd071
parent52d0f41853b424a2a22581ed08d846563087203e (diff)
parent1fe046829149c946b0501c0c548e98aa61f1f172 (diff)
Merge "Remove async jobs to debug and possible async instability"
-rw-r--r--playbooks/loci-builder.yaml54
-rw-r--r--playbooks/post.yaml15
2 files changed, 1 insertions, 68 deletions
diff --git a/playbooks/loci-builder.yaml b/playbooks/loci-builder.yaml
index 6218ce0..1756c91 100644
--- a/playbooks/loci-builder.yaml
+++ b/playbooks/loci-builder.yaml
@@ -17,45 +17,19 @@
17 repository: 172.17.0.1:5000/loci/requirements 17 repository: 172.17.0.1:5000/loci/requirements
18 push: yes 18 push: yes
19 with_items: "{{ distros }}" 19 with_items: "{{ distros }}"
20 async: 1000
21 poll: 0
22 register: pull
23
24 - async_status:
25 jid: "{{ item.ansible_job_id }}"
26 with_items: "{{ pull.results }}"
27 register: pull_result
28 until:
29 - pull_result.finished is defined
30 - pull_result.finished
31 retries: 1000
32 delay: 5
33 when: 20 when:
34 - reuse_requirements | bool 21 - reuse_requirements | bool
35 - project != 'requirements' 22 - project != 'requirements'
36 23
37 - name: Build base images 24 - name: Build base images
38 block: 25 block:
39 - name: "Build base image for {{ item.name }} asynchronously" 26 - name: "Build base image for {{ item.name }}"
40 docker_image: 27 docker_image:
41 path: "{{ loci_src_dir }}/dockerfiles/{{ item.name }}" 28 path: "{{ loci_src_dir }}/dockerfiles/{{ item.name }}"
42 name: base 29 name: base
43 tag: "{{ item.name }}" 30 tag: "{{ item.name }}"
44 buildargs: "{{ item.buildargs.base }}" 31 buildargs: "{{ item.buildargs.base }}"
45 with_items: "{{ distros }}" 32 with_items: "{{ distros }}"
46 async: 1000
47 poll: 0
48 register: base
49
50 - async_status:
51 jid: "{{ item.ansible_job_id }}"
52 with_items: "{{ base.results }}"
53 register: base_result
54 until:
55 - base_result.finished is defined
56 - base_result.finished
57 retries: 1000
58 delay: 5
59 33
60 - name: Build requirements image 34 - name: Build requirements image
61 block: 35 block:
@@ -69,19 +43,6 @@
69 pull: False 43 pull: False
70 buildargs: "{{ item.buildargs.requirements }}" 44 buildargs: "{{ item.buildargs.requirements }}"
71 with_items: "{{ distros }}" 45 with_items: "{{ distros }}"
72 async: 1000
73 poll: 0
74 register: build
75
76 - async_status:
77 jid: "{{ item.ansible_job_id }}"
78 with_items: "{{ build.results }}"
79 register: build_result
80 until:
81 - build_result.finished is defined
82 - build_result.finished
83 retries: 1000
84 delay: 5
85 when: 46 when:
86 - (not reuse_requirements) | bool 47 - (not reuse_requirements) | bool
87 - project != 'requirements' 48 - project != 'requirements'
@@ -96,16 +57,3 @@
96 pull: False 57 pull: False
97 buildargs: "{{ item.buildargs.project }}" 58 buildargs: "{{ item.buildargs.project }}"
98 with_items: "{{ distros }}" 59 with_items: "{{ distros }}"
99 async: 1000
100 poll: 0
101 register: build
102
103 - async_status:
104 jid: "{{ item.ansible_job_id }}"
105 with_items: "{{ build.results }}"
106 register: build_result
107 until:
108 - build_result.finished is defined
109 - build_result.finished
110 retries: 1000
111 delay: 5
diff --git a/playbooks/post.yaml b/playbooks/post.yaml
index 453886a..77a680e 100644
--- a/playbooks/post.yaml
+++ b/playbooks/post.yaml
@@ -1,20 +1,5 @@
1- hosts: all 1- hosts: all
2 tasks: 2 tasks:
3 - name: Collect logs
4 block:
5 # FIXME: https://github.com/ansible/ansible/issues/14131
6 # This issue closed on October 11, 2018. Patch will be released
7 # with Ansible 2.8 release.
8 - command: cp -r /home/zuul/.ansible_async /logs/async_logs
9 # FIXME: running this is causing the gate to hang
10 #- command: journalctl -xb -u docker.service
11 # register: docker_daemon_log
12 # no_log: True
13 #- copy:
14 # content: "{{ docker_daemon_log.stdout }}"
15 # dest: /logs/docker_daemon.log
16 become: true
17
18 - name: Copy logs 3 - name: Copy logs
19 synchronize: 4 synchronize:
20 src: /logs 5 src: /logs