Bug 2034023

Summary: deploy command has python errors
Product: Red Hat OpenStack Reporter: Ella Shulman <eshulman>
Component: python-tripleoclientAssignee: Cédric Jeanneret <cjeanner>
Status: CLOSED ERRATA QA Contact: David Rosenfeld <drosenfe>
Severity: medium Docs Contact:
Priority: medium    
Version: 17.0 (Wallaby)CC: cjeanner, hbrock, jslagle, mburns
Target Milestone: betaKeywords: Triaged
Target Release: 17.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-tripleoclient-16.4.1-0.20220122225230.6912a68.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-21 12:18:08 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 Ella Shulman 2021-12-19 16:28:28 UTC
Description of problem:
when running openstack overcloud deploy command without --templates it has a python error which is not caught nor have relevant information

Version-Release number of selected component (if applicable):
puddle: RHOS-17.0-RHEL-8-20211105.n.0(undercloud)

How reproducible:
100%

Steps to Reproduce:
1. create an openstack 17 deployment with pre-provisioned hosts (you can just get the cli as well)
2. source stackrc
3. run "openstack overcloud deploy" without --templates flag


Actual results:
python error

Expected results:
helpful debug message

Additional info:

Comment 1 Alex Schultz 2021-12-21 23:39:50 UTC
AFAIK --templates has always been required unless --answers-file is used.

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


Please provide the output that you are seeing.

Comment 2 Ella Shulman 2021-12-22 07:38:01 UTC
Hi here is the error I'm getting:

(undercloud) [stack@undercloud-0 ~]$ openstack overcloud deploy
/usr/lib64/python3.6/site-packages/_yaml/__init__.py:23: DeprecationWarning: The _yaml extension module is now located at yaml._yaml and its location is subject to change.  To use the LibYAML-based parser and emitter, import from `yaml`: `from yaml import CLoader as Loader, CDumper as Dumper`.
  DeprecationWarning
2021-12-22 07:36:36.024 842711 WARNING tripleoclient.v1.overcloud_deploy.DeployOvercloud [-] WARNING: Nova endpoint not available. Assuming --deployed-server: keystoneauth1.exceptions.catalog.EndpointNotFound: public endpoint for compute service in regionOne region not found
2021-12-22 07:36:36.024 842711 ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud [-] Exception occured while running the command: TypeError: expected str, bytes or os.PathLike object, not NoneType
2021-12-22 07:36:36.024 842711 ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud Traceback (most recent call last):
2021-12-22 07:36:36.024 842711 ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud   File "/usr/lib/python3.6/site-packages/tripleoclient/command.py", line 34, in run
2021-12-22 07:36:36.024 842711 ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud     super(Command, self).run(parsed_args)
2021-12-22 07:36:36.024 842711 ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud   File "/usr/lib/python3.6/site-packages/osc_lib/command/command.py", line 39, in run
2021-12-22 07:36:36.024 842711 ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud     return super(Command, self).run(parsed_args)
2021-12-22 07:36:36.024 842711 ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud   File "/usr/lib/python3.6/site-packages/cliff/command.py", line 185, in run
2021-12-22 07:36:36.024 842711 ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud     return_code = self.take_action(parsed_args) or 0
2021-12-22 07:36:36.024 842711 ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud   File "/usr/lib/python3.6/site-packages/tripleoclient/v1/overcloud_deploy.py", line 1242, in take_action
2021-12-22 07:36:36.024 842711 ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud     utils.update_working_dir_defaults(self.working_dir, parsed_args)
2021-12-22 07:36:36.024 842711 ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud   File "/usr/lib/python3.6/site-packages/tripleoclient/utils.py", line 1766, in update_working_dir_defaults
2021-12-22 07:36:36.024 842711 ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud     tht_root = os.path.abspath(args.templates)
2021-12-22 07:36:36.024 842711 ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud   File "/usr/lib64/python3.6/posixpath.py", line 378, in abspath
2021-12-22 07:36:36.024 842711 ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud     path = os.fspath(path)
2021-12-22 07:36:36.024 842711 ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud TypeError: expected str, bytes or os.PathLike object, not NoneType
2021-12-22 07:36:36.024 842711 ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud 
2021-12-22 07:36:36.026 842711 ERROR openstack [-] expected str, bytes or os.PathLike object, not NoneType
2021-12-22 07:36:36.026 842711 INFO osc_lib.shell [-] END return value: 1

Comment 3 Alex Schultz 2021-12-22 15:12:14 UTC
Yup looks like we broke the check for --templates with the network v2 vip validation. Will fix.

Comment 7 David Rosenfeld 2022-08-19 13:04:27 UTC
Error message is displayed when executing deploy script without --templates

2022-08-19 13:00:00.109 1022408 ERROR openstack [-] You must specify either --templates or --answers-file: osc_lib.exceptions.CommandError: You must specify either --templates or --an
swers-file
2022-08-19 13:00:00.109 1022408 INFO osc_lib.shell [-] END return value: 1

Comment 12 errata-xmlrpc 2022-09-21 12:18:08 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.0 (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-2022:6543