The pre.yaml playbook for the zuul-stream-functional tests copies the Ansible inventory.yaml file from the executor to the test "controller" node. The controller then runs the specified version of Ansible 2.x against the other nodes. This fails because the executor version of inventory.yaml contains "auto" for the Ansible python interpreter which is valid under the version of Ansible used on the executor, but on the controller node, which runs the older versions of Ansible, this is *not* a valid value. Thus it fails. This change forces the executor to use the version of Ansible being tested on the controller so that the inventory.yaml will be correct. Also, Ansible 2.8 now throws a FileNotFoundError exception instead of OSError when a referenced file is not found. Change-Id: Ibd31f1161df0076ed7498fd1d7b1ae76c802c6e4changes/19/694619/5
@@ -30,24 +30,36 @@ | |||
- job: | |||
name: zuul-stream-functional-2.5 | |||
parent: zuul-stream-functional | |||
# Force executor to use same Ansible version as "controller" node so | |||
# that the inventory.yaml file will be correct for that version. | |||
ansible-version: 2.5 | |||
vars: | |||
zuul_ansible_version: 2.5 | |||
- job: | |||
name: zuul-stream-functional-2.6 | |||
parent: zuul-stream-functional | |||
# Force executor to use same Ansible version as "controller" node so | |||
# that the inventory.yaml file will be correct for that version. | |||
ansible-version: 2.6 | |||
vars: | |||
zuul_ansible_version: 2.6 | |||
- job: | |||
name: zuul-stream-functional-2.7 | |||
parent: zuul-stream-functional | |||
# Force executor to use same Ansible version as "controller" node so | |||
# that the inventory.yaml file will be correct for that version. | |||
ansible-version: 2.7 | |||
vars: | |||
zuul_ansible_version: 2.7 | |||
- job: | |||
name: zuul-stream-functional-2.8 | |||
parent: zuul-stream-functional | |||
# Force executor to use same Ansible version as "controller" node so | |||
# that the inventory.yaml file will be correct for that version. | |||
ansible-version: 2.8 | |||
vars: | |||
zuul_ansible_version: 2.8 | |||
@@ -53,23 +53,23 @@ | |||
- name: Validate output - shell task with exception | |||
shell: | | |||
egrep "^.+\| node1 \| OSError.+\/shelltask\/" job-output.txt | |||
egrep "^.+\| node2 \| OSError.+\/shelltask\/" job-output.txt | |||
egrep "^.+\| node1 \| (OSError|FileNotFoundError).+\/shelltask\/" job-output.txt | |||
egrep "^.+\| node2 \| (OSError|FileNotFoundError).+\/shelltask\/" job-output.txt | |||
- name: Validate output - item loop with exception | |||
shell: | | |||
egrep "^.+\| node1 \| OSError.+\/itemloop\/" job-output.txt | |||
egrep "^.+\| node2 \| OSError.+\/itemloop\/" job-output.txt | |||
egrep "^.+\| node1 \| (OSError|FileNotFoundError).+\/itemloop\/" job-output.txt | |||
egrep "^.+\| node2 \| (OSError|FileNotFoundError).+\/itemloop\/" job-output.txt | |||
- name: Validate output - failure shell task with exception | |||
shell: | | |||
egrep "^.+\| node1 \| OSError.+\/failure-shelltask\/" job-output.txt | |||
egrep "^.+\| node2 \| OSError.+\/failure-shelltask\/" job-output.txt | |||
egrep "^.+\| node1 \| (OSError|FileNotFoundError).+\/failure-shelltask\/" job-output.txt | |||
egrep "^.+\| node2 \| (OSError|FileNotFoundError).+\/failure-shelltask\/" job-output.txt | |||
- name: Validate output - failure item loop with exception | |||
shell: | | |||
egrep "^.+\| node1 \| OSError.+\/failure-itemloop\/" job-output.txt | |||
egrep "^.+\| node2 \| OSError.+\/failure-itemloop\/" job-output.txt | |||
egrep "^.+\| node1 \| (OSError|FileNotFoundError).+\/failure-itemloop\/" job-output.txt | |||
egrep "^.+\| node2 \| (OSError|FileNotFoundError).+\/failure-itemloop\/" job-output.txt | |||
- name: Validate output - binary data | |||
shell: | |