Bug 2097844 - OSP17 overcloud config download command fails due to missing playbook
Summary: OSP17 overcloud config download command fails due to missing playbook
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-tripleoclient
Version: 17.0 (Wallaby)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ga
: 17.1
Assignee: Brendan Shephard
QA Contact: David Rosenfeld
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-16 16:48 UTC by David Rosenfeld
Modified: 2023-08-16 01:11 UTC (History)
7 users (show)

Fixed In Version: python-tripleoclient-16.4.1-1.20220820221953.1cc14be.el9ost
Doc Type: Bug Fix
Doc Text:
Before this update, the `overcloud config download` command failed with a traceback error because the command attempted to reach the Orchestration service (heat) to perform the download. The Orchestration service no longer persistently runs on the undercloud. With this update, the `overcloud config download` command is removed. Instead, you can use your `overcloud deploy` command with the `--stack-only` option.
Clone Of:
Environment:
Last Closed: 2023-08-16 01:11:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 847969 0 None NEW Remove overcloud config download command 2022-06-28 13:06:08 UTC
Red Hat Issue Tracker OSP-15798 0 None None None 2022-06-16 16:56:24 UTC
Red Hat Product Errata RHEA-2023:4577 0 None None None 2023-08-16 01:11:53 UTC

Description David Rosenfeld 2022-06-16 16:48:45 UTC
Description of problem: The command openstack overcloud config download --config-dir /home/stack/config_download_dir is executed, but fails with a traceback due to a missing playbook.

openstack overcloud config download --config-dir /home/stack/config_download_dir
/usr/lib/python3.9/site-packages/ansible/_vendor/__init__.py:42: UserWarning: One or more Python packages bundled by this ansible-core distribution were already loaded (pyparsing). This may result in undefined behavior.
  warnings.warn('One or more Python packages bundled by this ansible-core distribution were already '
Exception occured while running the command
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/tripleoclient/command.py", line 34, in run
    super(Command, self).run(parsed_args)
  File "/usr/lib/python3.9/site-packages/osc_lib/command/command.py", line 39, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python3.9/site-packages/cliff/command.py", line 186, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python3.9/site-packages/tripleoclient/v1/overcloud_config.py", line 82, in take_action
    utils.run_ansible_playbook(
  File "/usr/lib/python3.9/site-packages/tripleoclient/utils.py", line 438, in run_ansible_playbook
    playbook = _playbook_check(play=playbook)
  File "/usr/lib/python3.9/site-packages/tripleoclient/utils.py", line 362, in _playbook_check
    raise RuntimeError('No such playbook: {}'.format(play))
RuntimeError: No such playbook: /usr/share/ansible/tripleo-playbooks/cli-config-download-export.yaml
No such playbook: /usr/share/ansible/tripleo-playbooks/cli-config-download-export.yaml

It looks like the playbook has been renamed:

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


Version-Release number of selected component (if applicable): RHOS-17.0-RHEL-9-20220615.n.2


How reproducible: Every time


Steps to Reproduce:
1. Execute the command: openstack overcloud config download --config-dir /home/stack/config_download_dir
2.
3.

Actual results: The command fails with the traceback above.


Expected results: The command executes successfully.


Additional info:

Comment 1 Brendan Shephard 2022-06-17 02:03:20 UTC
Hey David,

I proposed a change to fix the name of the playbook:
https://review.opendev.org/c/openstack/python-tripleoclient/+/846241

However, this still won't work as it requires Heat to be running:
2022-06-16 21:38:00.911166 | 02346700-0004-820b-4c4f-00000000000c |       TASK | Download config
2022-06-16 21:38:03.907542 | 02346700-0004-820b-4c4f-00000000000c |      FATAL | Download config | localhost | error={"changed": false, "error": "Could not find requested endpoint in Service Catalog.", "msg": "Error downloading config for overcloud: Could not find requested endpoint in Service Catalog.", "success": false}

Which is because it needs to connect to Heat to perform the download:
https://github.com/openstack/tripleo-ansible/blob/master/tripleo_ansible/ansible_plugins/modules/tripleo_config_download.py#L103

So my assumption would be that we probably don't need this command in OSP17, as overcloud deploy with --stack-only should do the same thing now.

I'll defer to Slagle to see if he feels the same about this one. Should we just drop overcloud config download now, since it would require that we start Heat, restore from the backup and then do the download config. Seems like it might be unnecessary now and we can achieve the same thing via other means.

Comment 2 Brendan Shephard 2022-06-17 09:41:09 UTC
I proposed that we drop this command in favour of just using --stack-only with overcloud deploy:

https://review.opendev.org/c/openstack/python-tripleoclient/+/846243

Comment 3 James Slagle 2022-06-17 14:23:13 UTC
(In reply to Brendan Shephard from comment #2)
> I proposed that we drop this command in favour of just using --stack-only
> with overcloud deploy:
> 
> https://review.opendev.org/c/openstack/python-tripleoclient/+/846243

I like that approach Brendan, thanks.

Comment 4 Cédric Jeanneret 2022-06-28 13:06:09 UTC
Started the cherry-pick.

Comment 5 Cédric Jeanneret 2022-06-30 12:15:39 UTC
Giving this to you, Brendan.

The cherry-pick is stuck without any vote (please act on it ;)) - it will therefore miss the deadline for 17.0 Beta. Is it something we actually need in 17.0 (meaning more than probably 17.0.1), or can it wait for 17.1?

Asking also @drosenfe since you opened the issue. It's a failing regression test, isn't it?

Comment 6 David Rosenfeld 2022-06-30 12:24:58 UTC
I found this BZ with a failing regression job. However, since the resolution was to remove the command I updated the job to remove executing the command in versions OSP17 and up. This command won't fail jobs going forward.

Comment 7 Cédric Jeanneret 2022-06-30 12:28:29 UTC
Moving to 17.1 then. Meaning we just need to get the patch in stable/wallaby.

Comment 8 Brendan Shephard 2022-07-04 21:47:29 UTC
Patch was merged in stable/wallaby. It could probably still make 17.0 right?

Comment 9 Brendan Shephard 2022-07-05 01:11:51 UTC
Changing back to OSP17.0 GA since we should be able to land this now that it's in stable/wallaby

Comment 20 Lukas Svaty 2023-06-16 08:13:29 UTC
Bulk moving target milestone to GA after the release of Beta on 14th June '23.

Comment 27 errata-xmlrpc 2023-08-16 01:11:21 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 (Release of components for Red Hat OpenStack Platform 17.1 (Wallaby)), 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/RHEA-2023:4577


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