Bug 1728172 - [OSP15] config download deployment failed using --start-at-task - "TASK [Calculate container_puppet_tasks for {{ansible_hostname}} step {{step}}]"
Summary: [OSP15] config download deployment failed using --start-at-task - "TASK [Calc...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 15.0 (Stein)
Hardware: x86_64
OS: Linux
high
high
Target Milestone: z2
: 15.0 (Stein)
Assignee: RHOS Maint
QA Contact: Sasha Smolyak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-09 08:52 UTC by Artem Hrechanychenko
Modified: 2023-09-14 05:31 UTC (History)
8 users (show)

Fixed In Version: openstack-tripleo-heat-templates-10.6.1-0.20190828180441.8dc2faf.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-05 11:59:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 671251 0 'None' MERGED Replace hardcoded gather_facts:no with variable 2020-12-21 18:11:30 UTC
Red Hat Product Errata RHBA-2020:0643 0 None None None 2020-03-05 11:59:48 UTC

Description Artem Hrechanychenko 2019-07-09 08:52:09 UTC
Description of problem:
OSP15 deployment with 1 controller + 1compute

TASK [Debug output for task: Start containers for step 4] ***************************************************************************************************************************************************************
ok: [controller-0] => {
    "failed_when_result": false,
    "outputs.stdout_lines | default([]) | union(outputs.stderr_lines | default([]))": [
        "stdout: ",
        "stderr: "
    ]
}
ok: [compute-0] => {
    "failed_when_result": false,
    "outputs.stdout_lines | default([]) | union(outputs.stderr_lines | default([]))": []
}

TASK [Clean container_puppet_tasks for {{ansible_hostname}} step {{step}}] **********************************************************************************************************************************************
ok: [controller-0]
ok: [compute-0]

TASK [Calculate container_puppet_tasks for {{ansible_hostname}} step {{step}}] ******************************************************************************************************************************************
fatal: [controller-0]: FAILED! => {"msg": "The conditional check 'vars[item.service_name + '_short_bootstrap_node_name'] == ansible_hostname' failed. The error was: error while evaluating conditional (vars[item.service_name + '_short_bootstrap_node_name'] == ansible_hostname): 'ansible_hostname' is undefined\n\nThe error appears to be in '/home/stack/config-download/common_deploy_steps_tasks.yaml': line 529, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n    - name: Calculate container_puppet_tasks for {{ansible_hostname}} step {{step}}\n      ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n    with_items:\n      - {{ foo }}\n\nShould be written as:\n\n    with_items:\n      - \"{{ foo }}\"\n"}


[stack@undercloud-0 ~]$ cat overcloud_deploy.sh 
#!/bin/bash

openstack overcloud deploy \
--timeout 100 \
--templates /usr/share/openstack-tripleo-heat-templates \
--stack overcloud \
--libvirt-type kvm \
--ntp-server clock1.rdu2.redhat.com \
-e /home/stack/virt/config_lvm.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml \
-e /home/stack/virt/network/network-environment.yaml \
-e /home/stack/virt/network/dvr-override.yaml \
-e /home/stack/virt/enable-tls.yaml \
-e /home/stack/virt/inject-trust-anchor.yaml \
-e /home/stack/virt/public_vip.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/ssl/tls-endpoints-public-ip.yaml \
-e /home/stack/virt/hostnames.yml \
-e /home/stack/virt/nodes_data.yaml \
-e ~/containers-prepare-parameter.yaml \
-e /home/stack/virt/extra_templates.yaml \
--stack-only

openstack overcloud config download   --name overcloud   --config-dir ~/config-download
cd config-download/
tripleo-ansible-inventory   --ansible_ssh_user heat-admin   --static-yaml-inventory inventory.yaml


inject fail to stop execution after last task with tag - step3

run manual installation 
ansible-playbook   -i inventory.yaml   --private-key ~/.ssh/id_rsa   --become   ~/config-download/deploy_steps_playbook.yaml


inject task before first task with tag - step4

- hosts: localhost
  name: test_skip
  gather_facts: yes
  any_errors_fatal: yes
  tasks:
    - name: test
      ping: 


ansible-playbook   -i inventory.yaml   --private-key ~/.ssh/id_rsa --start-at-task="test"   --become   ~/config-download/deploy_steps_playbook.yaml

Version-Release number of selected component (if applicable):
openstack-tripleo-heat-templates-10.5.1-0.20190701110422.889d4d4.el8ost.noarch
ansible-2.8.1-1.e
RHOS_TRUNK-15.0-RHEL-8-20190701.n.0l8ae.noarch

How reproducible:
always

Steps to Reproduce:
1.Deploy with --stack-only
2. Introduce fail to stop oc deployment with config-download after step3
3. Try to deploy with --start-at-task

Actual results:
TASK [Debug output for task: Start containers for step 4] ***************************************************************************************************************************************************************
ok: [controller-0] => {
    "failed_when_result": false,
    "outputs.stdout_lines | default([]) | union(outputs.stderr_lines | default([]))": [
        "stdout: ",
        "stderr: "
    ]
}
ok: [compute-0] => {
    "failed_when_result": false,
    "outputs.stdout_lines | default([]) | union(outputs.stderr_lines | default([]))": []
}

TASK [Clean container_puppet_tasks for {{ansible_hostname}} step {{step}}] **********************************************************************************************************************************************
ok: [controller-0]
ok: [compute-0]

TASK [Calculate container_puppet_tasks for {{ansible_hostname}} step {{step}}] ******************************************************************************************************************************************
fatal: [controller-0]: FAILED! => {"msg": "The conditional check 'vars[item.service_name + '_short_bootstrap_node_name'] == ansible_hostname' failed. The error was: error while evaluating conditional (vars[item.service_name + '_short_bootstrap_node_name'] == ansible_hostname): 'ansible_hostname' is undefined\n\nThe error appears to be in '/home/stack/config-download/common_deploy_steps_tasks.yaml': line 529, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n    - name: Calculate container_puppet_tasks for {{ansible_hostname}} step {{step}}\n      ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n    with_items:\n      - {{ foo }}\n\nShould be written as:\n\n    with_items:\n      - \"{{ foo }}\"\n"}


Expected results:
passed

Additional info:

Comment 12 Jad Haj Yahya 2020-01-27 07:56:49 UTC
Does the -e gather_facts=true part of the fix/Mandatory here.
I am asking because without it the bug is reproducing

Comment 13 Jad Haj Yahya 2020-01-27 11:59:38 UTC
Ran below:
ansible-playbook   -i  ~/config-download/inventory.yaml   --private-key ~/.ssh/id_rsa --start-at-task="test"   --become   ~/config-download/deploy_steps_playbook.yaml -e gather_facts=true


Deployment started at specific task and succeeded

Comment 14 James Slagle 2020-01-27 12:31:34 UTC
(In reply to Jad Haj Yahya from comment #12)
> Does the -e gather_facts=true part of the fix/Mandatory here.
> I am asking because without it the bug is reproducing

yes, it's required.

Comment 15 Alex McLeod 2020-02-19 12:44:25 UTC
If this bug requires doc text for errata release, please set the 'Doc Type' and provide draft text according to the template in the 'Doc Text' field. The documentation team will review, edit, and approve the text.

If this bug does not require doc text, please set the 'requires_doc_text' flag to '-'.

Comment 17 errata-xmlrpc 2020-03-05 11:59:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:0643

Comment 18 Red Hat Bugzilla 2023-09-14 05:31:39 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


Note You need to log in before you can comment on or make changes to this bug.