Tripleo quickstart failing on convert-image task with error: 'overcloud_image' is undefined

Bug #1943820 reported by Sandeep Yadav
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Critical
Unassigned

Bug Description

Description: Tripleo quickstart failing on convert-image task with error: 'overcloud_image' is undefined

After merge of https://review.opendev.org/c/openstack/tripleo-quickstart/+/801703

On baremetal env ci/ manual tripleo deployments, We are hitting below error:-

~~~
2021-09-15 23:15:11.527717 | primary | TASK [convert-image : check if we have an {{ overcloud_image }}.qcow2 to start from] ***
2021-09-15 23:15:11.527728 | primary | Wednesday 15 September 2021 23:15:11 -0400 (0:00:02.724) 1:59:27.474 ***
2021-09-15 23:15:11.558197 | primary | fatal: [baremetal-env]: FAILED! => {}
2021-09-15 23:15:11.558249 | primary |
2021-09-15 23:15:11.558259 | primary | MSG:
2021-09-15 23:15:11.558278 | primary |
2021-09-15 23:15:11.558287 | primary | The task includes an option with an undefined variable. The error was: 'overcloud_image' is undefined
2021-09-15 23:15:11.558295 | primary |
2021-09-15 23:15:11.558304 | primary | The error appears to be in '/home/zuul/src/opendev.org/openstack/tripleo-quickstart/roles/convert-image/tasks/main.yml': line 7, column 3, but may
2021-09-15 23:15:11.558313 | primary | be elsewhere in the file depending on the exact syntax problem.
2021-09-15 23:15:11.558322 | primary |
2021-09-15 23:15:11.558330 | primary | The offending line appears to be:
2021-09-15 23:15:11.558339 | primary |
2021-09-15 23:15:11.558347 | primary |
2021-09-15 23:15:11.558355 | primary | - name: check if we have an {{ overcloud_image }}.qcow2 to start from
2021-09-15 23:15:11.558369 | primary | ^ here
2021-09-15 23:15:11.558378 | primary | We could be wrong, but this one looks like it might be an issue with
2021-09-15 23:15:11.558386 | primary | missing quotes. Always quote template expression brackets when they
2021-09-15 23:15:11.558394 | primary | start a value. For instance:
2021-09-15 23:15:11.558402 | primary |
2021-09-15 23:15:11.558411 | primary | with_items:
2021-09-15 23:15:11.558419 | primary | - {{ foo }}
2021-09-15 23:15:11.558427 | primary |
2021-09-15 23:15:11.558436 | primary | Should be written as:
2021-09-15 23:15:11.558444 | primary |
2021-09-15 23:15:11.558452 | primary | with_items:
2021-09-15 23:15:11.558461 | primary | - "{{ foo }}"
2021-09-15 23:15:11.558469 | primary |
2021-09-15 23:15:11.559612 | primary |
2021-09-15 23:15:11.559639 | primary | PLAY RECAP *********************************************************************
2021-09-15 23:15:11.559647 | primary | localhost : ok=11 changed=5 unreachable=0 failed=0 skipped=28 rescued=0 ignored=0
2021-09-15 23:15:11.559652 | primary | baremetal-env : ok=137 changed=55 unreachable=0 failed=1 skipped=93 rescued=0 ignored=15
~~~

Possible solutions:-

1) Add extras-common as a dep

`overcloud_image: overcloud-full` is defined in tqe extras-common role.

https://opendev.org/openstack/tripleo-quickstart-extras/src/branch/master/roles/extras-common/defaults/main.yml#L170

Add extras-common as a dep, as that will pull required var and that role doesn't execute any task.

Cons: This will add a dependency on quickstart-extras roles.

2) Add `overcloud_image: overcloud-full` var to "common" role defaults

Pros: This will avoid dep on quickstart-extras roles, so quickstart roles can be used independently of quickstart-extras

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-quickstart (master)
Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-quickstart (master)

Reviewed: https://review.opendev.org/c/openstack/tripleo-quickstart/+/809367
Committed: https://opendev.org/openstack/tripleo-quickstart/commit/63e94b781b6f9375d6fb7cd43c29728ff84c9e6f
Submitter: "Zuul (22348)"
Branch: master

commit 63e94b781b6f9375d6fb7cd43c29728ff84c9e6f
Author: Sandeep Yadav <email address hidden>
Date: Thu Sep 16 16:05:54 2021 +0530

    Add defaults overcloud_image as overcloud-full

    In patch [1] we removed the hard-code overcloud-full image name,
    but the default var is only set in tqe[2] not tq. This leads to
    oooq deployment failing on convert-image task with
    error: 'overcloud_image' is undefined

    Adding in `overcloud_image` var in tq common role defaults to
    resolves the Bug mentioned in Closes-Bug.

    [1] https://review.opendev.org/c/openstack/tripleo-quickstart/+/801703
    [2] https://opendev.org/openstack/tripleo-quickstart-extras/src/branch/master/roles/extras-common/defaults/main.yml#L170

    Closes-Bug: #1943820
    Change-Id: I075e168a9cc10b76841ef93af0e54c6abf48dd76

Changed in tripleo:
status: In Progress → Fix Released
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.