
Recent runs of the quick-start job have started to fail and the apparent cause is that podman may shut down the ZK pod before the Zuul components have had a chance to release their locks. This can cause the scheduler to need to wait for lock expiration before starting the gerrit event stream, which in turn may cause it to miss important events in the job. To correct this, add a 30 second delay between stopping and starting the containers. When humans run through this sequence, they are likely to be slow enough not to observe this condition, so we only need to fix this in the test playbook (not the actual tutorial instructions). Change-Id: I806d33237058fa6f0a7c7cc22ceec47242cb4ad1
107 lines
2.6 KiB
YAML
107 lines
2.6 KiB
YAML
# Stop the basic tutorial
|
|
- name: Run podman-compose down
|
|
when: not local
|
|
shell:
|
|
cmd: podman-compose -p zuul-tutorial stop
|
|
chdir: src/opendev.org/zuul/zuul/doc/source/examples
|
|
|
|
- name: Run podman-compose down
|
|
when: local
|
|
shell:
|
|
cmd: podman-compose -p zuul-tutorial stop
|
|
chdir: ../../doc/source/examples
|
|
|
|
# Restart with the new config
|
|
- name: Run podman-compose up
|
|
when: not local
|
|
shell:
|
|
cmd: podman-compose -p zuul-tutorial up -d
|
|
chdir: src/opendev.org/zuul/zuul/doc/source/examples
|
|
environment:
|
|
ZUUL_TUTORIAL_CONFIG: "./tracing/etc_zuul/"
|
|
|
|
- name: Run podman-compose up
|
|
when: local
|
|
shell:
|
|
cmd: podman-compose -p zuul-tutorial up -d
|
|
chdir: ../../doc/source/examples
|
|
environment:
|
|
ZUUL_TUTORIAL_CONFIG: "./tracing/etc_zuul/"
|
|
|
|
# Start Jaeger
|
|
- name: Run podman-compose up
|
|
when: not local
|
|
shell:
|
|
cmd: podman-compose -p zuul-tutorial-tracing up -d
|
|
chdir: src/opendev.org/zuul/zuul/doc/source/examples/tracing
|
|
|
|
- name: Run podman-compose up
|
|
when: local
|
|
shell:
|
|
cmd: podman-compose -p zuul-tutorial-tracing up -d
|
|
chdir: ../../doc/source/examples/tracing
|
|
|
|
# Verify that Zuul runs with the new config
|
|
- name: Wait for Zuul
|
|
uri:
|
|
url: http://localhost:9000/api/tenant/example-tenant/status
|
|
method: GET
|
|
return_content: true
|
|
status_code: 200
|
|
body_format: json
|
|
register: result
|
|
retries: 30
|
|
delay: 10
|
|
until: result.status == 200 and result.json["zuul_version"] is defined
|
|
changed_when: false
|
|
|
|
# In case ZK is shutdown first, allow the locks to expire.
|
|
- name: Delay for ZK lock expiration
|
|
wait_for:
|
|
timeout: 30
|
|
delegate_to: localhost
|
|
|
|
- name: Verify that old builds are available
|
|
uri:
|
|
url: "http://localhost:9000/api/tenant/example-tenant/builds"
|
|
method: GET
|
|
return_content: true
|
|
status_code: 200
|
|
body_format: json
|
|
register: result
|
|
failed_when: "result.json | length < 4"
|
|
changed_when: false
|
|
|
|
# Remove the label so Zuul will post again Verified+1 which is what
|
|
# check-pipeline is looking for
|
|
- include_role:
|
|
name: remove-verified
|
|
vars:
|
|
change_id: "{{ changetest1.id }}"
|
|
|
|
# Recheck the change to issue a trace
|
|
- include_role:
|
|
name: recheck-change
|
|
vars:
|
|
change_id: "{{ changetest1.id }}"
|
|
|
|
- include_role:
|
|
name: check-pipeline
|
|
vars:
|
|
title: "test job test1"
|
|
projectname: test1
|
|
check_number: 3
|
|
|
|
- name: Verify tracing information is available
|
|
uri:
|
|
url: http://localhost:16686/api/traces?lookback=1h&service=zuul
|
|
method: GET
|
|
return_content: true
|
|
status_code: 200
|
|
body_format: json
|
|
register: result
|
|
retries: 30
|
|
delay: 10
|
|
until: result.status == 200 and result.json["data"] | length > 0
|
|
changed_when: false
|