Undercloud upgrades job failing in stable/ocata

Bug #1769107 reported by Jose Luis Franco
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Jose Luis Franco

Bug Description

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/

Revision history for this message
Jose Luis Franco (jfrancoa) wrote :

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
  shell: |
    source {{ undercloud_rc }} ;
    tripleo-ansible-inventory --plan {{ overcloud_stack_name }} --static-yaml-inventory /tmp/fake-oc-hosts.yaml ;
    awk -F':' '/role_name/ {gsub("[[:space:][:punct:]]", "", $2); print $2}' /tmp/fake-oc-hosts.yaml
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.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-upgrade (master)

Fix proposed to branch: master
Review: https://review.openstack.org/566291

Changed in tripleo:
assignee: nobody → Jose Luis Franco (jfrancoa)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-upgrade (master)

Reviewed: https://review.openstack.org/566291
Committed: https://git.openstack.org/cgit/openstack/tripleo-upgrade/commit/?id=0fd5d40994cb30117444b22a9e862722c4ebc52c
Submitter: Zuul
Branch: master

commit 0fd5d40994cb30117444b22a9e862722c4ebc52c
Author: Jose Luis Franco Arza <email address hidden>
Date: Fri May 4 13:12:56 2018 +0200

    Separate scripts creation tasks for under/overcloud.

    The upgrade/update tasks in tripleo-upgrade started
    with a create-scripts book, which generated most of
    the scripts from the templates. However, this book
    mixed the creation of scripts needed for the overcloud
    as well as for the undercloud. This becomes an issue
    when we want to perform only an undercloud upgrade, as
    we are running tasks intended to the overcloud and it
    might not even exist.
    This patch divides the script creation tasks used for
    the undercloud from the ones used for the overcloud.

    Change-Id: I35dfbe50d12b65a8d14f62410adea551e7584912
    Closes-Bug: #1769107

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-upgrade (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/569974

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-upgrade (stable/queens)

Reviewed: https://review.openstack.org/569974
Committed: https://git.openstack.org/cgit/openstack/tripleo-upgrade/commit/?id=abc439355ee433db4a1e21c8da31d8f48b7b03e5
Submitter: Zuul
Branch: stable/queens

commit abc439355ee433db4a1e21c8da31d8f48b7b03e5
Author: Jose Luis Franco Arza <email address hidden>
Date: Fri May 4 13:12:56 2018 +0200

    Separate scripts creation tasks for under/overcloud.

    The upgrade/update tasks in tripleo-upgrade started
    with a create-scripts book, which generated most of
    the scripts from the templates. However, this book
    mixed the creation of scripts needed for the overcloud
    as well as for the undercloud. This becomes an issue
    when we want to perform only an undercloud upgrade, as
    we are running tasks intended to the overcloud and it
    might not even exist.
    This patch divides the script creation tasks used for
    the undercloud from the ones used for the overcloud.

    Change-Id: I35dfbe50d12b65a8d14f62410adea551e7584912
    Closes-Bug: #1769107
    (cherry picked from commit 0fd5d40994cb30117444b22a9e862722c4ebc52c)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-upgrade 3.0.0

This issue was fixed in the openstack/tripleo-upgrade 3.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.