Undercloud upgrade CI job tripleo-ci-centos-7-undercloud-upgrades is failing in stable/ocata branch patches with the following reason:
2018-05-02 12:52:44.154018 | primary | TASK [tripleo-upgrade : copy certificate to the overcloud nodes and update the trusted store] ***
2018-05-02 12:52:44.177501 | primary | Wednesday 02 May 2018 12:52:44 +0000 (0:00:00.096) 0:00:46.496 *********
2018-05-02 12:52:44.220785 | primary | skipping: [undercloud]
2018-05-02 12:52:44.254536 | primary |
2018-05-02 12:52:44.254808 | primary | TASK [tripleo-upgrade : generate inventory file] *******************************
2018-05-02 12:52:44.278653 | primary | Wednesday 02 May 2018 12:52:44 +0000 (0:00:00.101) 0:00:46.597 *********
2018-05-02 12:52:48.959748 | primary | fatal: [undercloud]: FAILED! => {"changed": true, "cmd": "source /home/zuul/stackrc ;\n tripleo-ansible-inventory --plan overcloud --static-yaml-inventory /tmp/fake-oc-hosts.yaml ;\n awk -F':' '/role_name/ {gsub(\"[[:space:][:punct:]]\", \"\", $2); print $2}' /tmp/fake-oc-hosts.yaml", "delta": "0:00:02.171896", "end": "2018-05-02 12:52:48.930316", "failed": true, "msg": "non-zero return code", "rc": 2, "start": "2018-05-02 12:52:46.758420", "stderr": "usage: tripleo-ansible-inventory [-h] [--auth-token AUTH_TOKEN]\n [--auth-url AUTH_URL] [--cacert CACERT]\n [--config-dir DIR] [--config-file PATH]\n [--host HOST] [--list] [--nolist]\n [--password PASSWORD] [--plan PLAN]\n [--project-name PROJECT_NAME]\n [--username USERNAME]\ntripleo-ansible-inventory: error: unrecognized arguments: --static-yaml-inventory /tmp/fake-oc-hosts.yaml\nawk: fatal: cannot open file `/tmp/fake-oc-hosts.yaml' for reading (No such file or directory)", "stderr_lines": ["usage: tripleo-ansible-inventory [-h] [--auth-token AUTH_TOKEN]", " [--auth-url AUTH_URL] [--cacert CACERT]", " [--config-dir DIR] [--config-file PATH]", " [--host HOST] [--list] [--nolist]", " [--password PASSWORD] [--plan PLAN]", " [--project-name PROJECT_NAME]", " [--username USERNAME]", "tripleo-ansible-inventory: error: unrecognized arguments: --static-yaml-inventory /tmp/fake-oc-hosts.yaml", "awk: fatal: cannot open file `/tmp/fake-oc-hosts.yaml' for reading (No such file or directory)"], "stdout": "", "stdout_lines": []}
log: http://logs.openstack.org/13/564813/1/check/tripleo-ci-centos-7-undercloud-upgrades/53e4864/job-output.txt.gz
CI job logs: http://logs.openstack.org/13/564813/1/check/tripleo-ci-centos-7-undercloud-upgrades/53e4864/
The cause of this problem is that tripleo-upgrade was started in stable/pike branch, therefore there is not a stable/ocata branch for it. Therefor, Zuul imports master's branch of the role, which includes the following task:
- name: generate inventory file ansible- inventory --plan {{ overcloud_ stack_name }} --static- yaml-inventory /tmp/fake- oc-hosts. yaml ; [[:space: ][:punct: ]]", "", $2); print $2}' /tmp/fake- oc-hosts. yaml
shell: |
source {{ undercloud_rc }} ;
tripleo-
awk -F':' '/role_name/ {gsub("
register: oc_roles
The tripleo- ansible- inventory command doesn't have a --static- yaml-inventory option in ocata, it was added for queens. Therefore, the task fails, as well as the whole job.