Bug 2119257

Summary: [OSP17.0] Unable to generate config-download
Product: Red Hat OpenStack Reporter: Khomesh Thakre <kthakre>
Component: tripleo-ansibleAssignee: OSP Team <rhos-maint>
Status: CLOSED NOTABUG QA Contact: Khomesh Thakre <kthakre>
Severity: high Docs Contact:
Priority: unspecified    
Version: 17.0 (Wallaby)CC: jslagle, rhos-maint
Target Milestone: ---Flags: ifrangs: needinfo? (rhos-maint)
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-19 10:43:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Khomesh Thakre 2022-08-18 05:26:25 UTC
Description of problem:

When trying to generate the triple-ansible-inventory, we are getting below errors.

~~~
(undercloud) [stack@undercloud-0 ~]$ ansible-playbook /usr/share/ansible/tripleo-playbooks/cli-config-download.yaml 
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [Download config] ************************************************************************************************************************************

TASK [Set output_dir] *************************************************************************************************************************************
ok: [localhost]

TASK [Set work_dir] ***************************************************************************************************************************************
ok: [localhost]

TASK [Clean work_dir] *************************************************************************************************************************************
skipping: [localhost]

TASK [Create config dir if does not exist] ****************************************************************************************************************
ok: [localhost]

TASK [Download config] ************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "error": "public endpoint for orchestration service not found", "msg": "Error downloading config for overcloud: public endpoint for orchestration service not found", "success": false}

NO MORE HOSTS LEFT ****************************************************************************************************************************************

PLAY RECAP ************************************************************************************************************************************************
localhost                  : ok=3    changed=0    unreachable=0    failed=1    skipped=1    rescued=0    ignored=0   

(undercloud) [stack@undercloud-0 ~]$ 
~~~

Version-Release number of selected component (if applicable):
tripleo-ansible-3.3.1-0.20220720020861.fa5422f.el9ost.noarch

Puddle: RHOS-17.0-RHEL-9-20220811.n.0

How reproducible:
All the time

Steps to Reproduce:
1. ansible-playbook /usr/share/ansible/tripleo-playbooks/cli-config-download.yaml 
2.
3.

Comment 1 James Slagle 2022-08-18 14:22:35 UTC
what's the context behind what you're trying to run:

ansible-playbook /usr/share/ansible/tripleo-playbooks/cli-config-download.yaml 

We don't really support running the cli paybooks ad-hoc with just ansible. I'd be interested to hear more why you're going that route, and if there's a better way to get what you're after.

Comment 2 Khomesh Thakre 2022-08-19 06:20:50 UTC
During the update process, we have some tasks (like enabling repos on OC) that need an inventory file. 

In 16.x, we used tripleo-ansible-inventory to generate inventory but since it is deprecated we were looking for some alternative.

Comment 3 James Slagle 2022-08-19 10:43:58 UTC
cli-config-download.yaml can only be used to generate an inventory when running from within the overcloud deploy cli called by python-tripleoclient. It's not something that can be used ad-hoc.

If you need the inventory for uc/standalone it's at ~/tripleo-deploy/<stack>/tripleo-ansible-inventory.yaml
for the overcloud it's at ~/overcloud-deploy/<stack>/tripleo-ansible-inventory.yaml

I'm going to close this one out, but if you need further assistance, please ask