Bug 1769368 - openstack undercloud deploy throws exception on typo in subnets parameter in undercloud.conf
Summary: openstack undercloud deploy throws exception on typo in subnets parameter in ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-tripleoclient
Version: 15.0 (Stein)
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: beta
: 16.1 (Train on RHEL 8.2)
Assignee: Alex Schultz
QA Contact: Sasha Smolyak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-06 13:22 UTC by David Juran
Modified: 2020-07-29 07:50 UTC (History)
9 users (show)

Fixed In Version: python-tripleoclient-12.3.2-0.20200130192329.78ac810.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-29 07:49:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1857057 0 None None None 2019-12-19 22:04:27 UTC
OpenStack gerrit 700987 0 None MERGED Catch exceptions when processing subnets 2020-07-22 19:58:54 UTC
Red Hat Product Errata RHBA-2020:3148 0 None None None 2020-07-29 07:50:20 UTC

Description David Juran 2019-11-06 13:22:47 UTC
Description of problem:
I made a typo in my undercloud.conf:

subnets = ctlplane-subnet, ctlplane-subnet-0, ctlplane-subnet-1, ctlplane-subnet-3

where the last should have been subnet-2 not subnet-3.

This resulted in the following traceback:

[stack@undercloud ~]$ openstack undercloud install
Exception occured while running the command
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/tripleoclient/command.py", line 32, in run
    super(Command, self).run(parsed_args)
  File "/usr/lib/python3.6/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python3.6/site-packages/cliff/command.py", line 184, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/undercloud.py", line 130, in take_action
    dry_run=parsed_args.dry_run)
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/undercloud_config.py", line 394, in prepare_undercloud_deploy
    _process_network_args(env_data)
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/undercloud_config.py", line 332, in _process_network_args
    env['IronicInspectorSubnets'] = _generate_inspection_subnets()
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/undercloud_config.py", line 227, in _generate_inspection_subnets
    env_dict['netmask'] = str(netaddr.IPNetwork(s.cidr).netmask)
  File "/usr/lib/python3.6/site-packages/netaddr/ip/__init__.py", line 928, in __init__
    implicit_prefix, flags)
  File "/usr/lib/python3.6/site-packages/netaddr/ip/__init__.py", line 823, in parse_ip_network
    raise TypeError('unexpected type %s for addr arg' % type(addr))
TypeError: unexpected type <class 'NoneType'> for addr arg
unexpected type <class 'NoneType'> for addr arg


Admittedly the typo was my bad but something a little but more informant of where to find the typo would be appreciated.



Version-Release number of selected component (if applicable):
python3-tripleoclient-11.5.1-0.20190829110437.9b9b5aa.el8ost.noarch

Comment 1 Alex Schultz 2019-12-19 22:37:51 UTC
If you're missing the entire subnet section, you should get something like "oslo_config.cfg.NoSuchOptError: no such option subnet1 in group [DEFAULT]". However if you include an incorrect ip address or an empty value, you can get a failure when we try and parse the ip information.

Comment 2 Emilien Macchi 2020-02-05 21:58:59 UTC
Alex fixed it in Train:https://review.opendev.org/#/c/700987
Would that be enough for you?

Comment 3 David Juran 2020-02-10 15:03:59 UTC
Yes, Train will be fine. 
Thanks a lot (-:

Comment 10 errata-xmlrpc 2020-07-29 07:49:26 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:3148


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