unclear error message when an invalid subnet config exists in undercloud.conf

Bug #1857057 reported by Alex Schultz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Medium
Alex Schultz

Bug Description

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.

Changed in tripleo:
assignee: nobody → Alex Schultz (alex-schultz)
summary: - unclear error message when an invalid subnet parameter exists in
+ unclear error message when an invalid subnet config exists in
undercloud.conf
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (master)

Fix proposed to branch: master
Review: https://review.opendev.org/700082

Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.opendev.org/700082
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=e970ca3cdf861b0e4d63cc8be3468bd52e775b01
Submitter: Zuul
Branch: master

commit e970ca3cdf861b0e4d63cc8be3468bd52e775b01
Author: Alex Schultz <email address hidden>
Date: Thu Dec 19 15:31:37 2019 -0700

    Catch exceptions when processing subnets

    We should do a better job indicating that there is invalid data in the
    extra subnets that can be defined. This change catches exceptions that
    occur when generating the inspection subnet data.

    Change-Id: I175ff32ba5e5a271741349794cf28f1e58c50d6a
    Closes-Bug: #1857057

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/700987

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (stable/train)

Reviewed: https://review.opendev.org/700987
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=be999f122fa6262a273cb593a0f12d21d82d629f
Submitter: Zuul
Branch: stable/train

commit be999f122fa6262a273cb593a0f12d21d82d629f
Author: Alex Schultz <email address hidden>
Date: Thu Dec 19 15:31:37 2019 -0700

    Catch exceptions when processing subnets

    We should do a better job indicating that there is invalid data in the
    extra subnets that can be defined. This change catches exceptions that
    occur when generating the inspection subnet data.

    Change-Id: I175ff32ba5e5a271741349794cf28f1e58c50d6a
    Closes-Bug: #1857057
    (cherry picked from commit e970ca3cdf861b0e4d63cc8be3468bd52e775b01)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 13.1.0

This issue was fixed in the openstack/python-tripleoclient 13.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 12.4.0

This issue was fixed in the openstack/python-tripleoclient 12.4.0 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers