ansible-role-tripleo-modify-image -- improve failure message when running on the wrong node

Bug #1835219 reported by Andreas Karis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Alex Schultz

Bug Description

In Queens, when somebody executes ansible-role-tripleo-modify-image on the undercloud instead of the overcloud node where the container image can be found. Not sure about other versions of OSP. It would be nice to have a more verbose error message here.

---

(undercloud) [stack@undercloud-1 scripts]$ sudo bash generate_hotfix.sh
Cloning into 'ansible-role-tripleo-modify-image'...
remote: Enumerating objects: 451, done.
remote: Counting objects: 100% (451/451), done.
remote: Compressing objects: 100% (183/183), done.
remote: Total 451 (delta 244), reused 421 (delta 225)
Receiving objects: 100% (451/451), 70.42 KiB | 0 bytes/s, done.
Resolving deltas: 100% (244/244), done.
 [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [localhost] *****************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] ***********************************************************************************************************************************************************************************************************************
Tuesday 02 July 2019 15:41:24 -0400 (0:00:00.136) 0:00:00.136 **********
ok: [localhost]

TASK [tripleo-modify-image : Ensure that source_image is defined] ****************************************************************************************************************************************************************************
Tuesday 02 July 2019 15:41:34 -0400 (0:00:10.786) 0:00:10.922 **********
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [tripleo-modify-image : Ensure that container_build_tool is correctly set] **************************************************************************************************************************************************************
Tuesday 02 July 2019 15:41:35 -0400 (0:00:00.157) 0:00:11.080 **********
skipping: [localhost]

TASK [tripleo-modify-image : Set default modified_append_tag] ********************************************************************************************************************************************************************************
Tuesday 02 July 2019 15:41:35 -0400 (0:00:00.129) 0:00:11.209 **********
skipping: [localhost]

TASK [tripleo-modify-image : Ensure that source_image is defined] ****************************************************************************************************************************************************************************
Tuesday 02 July 2019 15:41:35 -0400 (0:00:00.131) 0:00:11.340 **********
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [tripleo-modify-image : Ensure that container_build_tool is correctly set] **************************************************************************************************************************************************************
Tuesday 02 July 2019 15:41:35 -0400 (0:00:00.160) 0:00:11.501 **********
skipping: [localhost]

TASK [tripleo-modify-image : Set default modified_append_tag] ********************************************************************************************************************************************************************************
Tuesday 02 July 2019 15:41:35 -0400 (0:00:00.133) 0:00:11.634 **********
skipping: [localhost]

TASK [tripleo-modify-image : Inspect image with Docker] **************************************************************************************************************************************************************************************
Tuesday 02 July 2019 15:41:35 -0400 (0:00:00.126) 0:00:11.761 **********
ok: [localhost]

TASK [tripleo-modify-image : Set original_user with Docker] **********************************************************************************************************************************************************************************
Tuesday 02 July 2019 15:41:37 -0400 (0:00:01.193) 0:00:12.954 **********
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: list object has no element 0\n\nThe error appears to have been in '/home/stack/openstack_containerized_hotfix/scripts/ansible-role-tripleo-modify-image/tasks/get_original_user.yml': line 11, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n register: source_image_facts\n - name: Set original_user with Docker\n ^ here\n"}

PLAY RECAP ***********************************************************************************************************************************************************************************************************************************
localhost : ok=4 changed=0 unreachable=0 failed=1

Tuesday 02 July 2019 15:41:37 -0400 (0:00:00.142) 0:00:13.097 **********
===============================================================================
Gathering Facts ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 10.79s
tripleo-modify-image : Inspect image with Docker -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1.19s
tripleo-modify-image : Ensure that source_image is defined ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.16s
tripleo-modify-image : Ensure that source_image is defined ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.16s
tripleo-modify-image : Set original_user with Docker ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.14s
tripleo-modify-image : Ensure that container_build_tool is correctly set -------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.13s
tripleo-modify-image : Set default modified_append_tag -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.13s
tripleo-modify-image : Ensure that container_build_tool is correctly set -------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.13s
tripleo-modify-image : Set default modified_append_tag -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.13s
(undercloud) [stack@undercloud-1 scripts]$

Revision history for this message
Alex Schultz (alex-schultz) wrote :

I ran into this as well. We could docker pull if it the image is not available. Though i'm not sure ansible-role-tripleo-modify-image is supported for queens

Changed in tripleo:
status: New → Confirmed
status: Confirmed → Triaged
importance: Undecided → Medium
milestone: none → train-2
Revision history for this message
Alex Schultz (alex-schultz) wrote :
Changed in tripleo:
assignee: nobody → Alex Schultz (alex-schultz)
Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
Alex Schultz (alex-schultz) wrote :

The fix for this caused Bug 1836048

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.