Bug 1489585 - [RFE] cleanup tracebacks: validation with local_interface existence within undercloud.conf file works but with tracebacks
Summary: [RFE] cleanup tracebacks: validation with local_interface existence within un...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: instack-undercloud
Version: 12.0 (Pike)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: James Slagle
QA Contact: Arik Chernetsky
URL:
Whiteboard:
Depends On: 1477650
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-07 20:00 UTC by mlammon
Modified: 2019-01-11 15:01 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-11 15:01:37 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description mlammon 2017-09-07 20:00:03 UTC
Description of problem:
"openstack undercloud install" recently provided validation if the undercloud.conf file had local_interface set to one that does not exist.  bz 1477650 added this logic to check and make sure the interface exists and fail the undercloud installation.

This now validates the local_interface , however, it contains a couple traceback that should be cleaned up. It was being requested become an RFE to cleanup.

Environment:
instack-undercloud-7.3.1-0.20170830213703.el7ost.noarch
instack-7.0.1-0.20170726180523.9961055.el7ost.noarch
python-tripleoclient-7.2.1-0.20170831202445.0bd00bb.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. Install undercloud with  undercloud.conf local_interface = (interface that does not exist)
2.
3.

Actual results:

openstack undercloud install
2017-06-13 10:37:14,706 INFO: Logging to /home/stack/.instack/install-undercloud.log
2017-06-13 10:37:14,730 INFO: Checking for a FQDN hostname...
2017-06-13 10:37:14,761 INFO: Static hostname detected as undercloud.localdomain
2017-06-13 10:37:14,773 INFO: Transient hostname detected as undercloud.localdomain
2017-06-13 10:37:14,777 ERROR: Undercloud configuration validation failed: Invalid local_interface specified. eth3 is not available.
2017-06-13 10:37:14,777 DEBUG: An exception occurred
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 1659, in install
    _validate_configuration()
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 753, in _validate_configuration
    _validate_network()
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 700, in _validate_network
    validator.validate_config(params, error_handler)
  File "/usr/lib/python2.7/site-packages/instack_undercloud/validator.py", line 39, in validate_config
    _validate_interface_exists(local_params, error_callback)
  File "/usr/lib/python2.7/site-packages/instack_undercloud/validator.py", line 157, in _validate_interface_exists
    error_callback(message)
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 697, in error_handler
    raise validator.FailedValidation(message)
FailedValidation: Invalid local_interface specified. eth3 is not available.
2017-06-13 10:37:14,778 ERROR:
#############################################################################
Undercloud install failed.

Reason: Invalid local_interface specified. eth3 is not available.

See the previous output for details about what went wrong.  The full install
log can be found at /home/stack/.instack/install-undercloud.log.

#############################################################################

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 1659, in install
    _validate_configuration()
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 753, in _validate_configuration
    _validate_network()
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 700, in _validate_network
    validator.validate_config(params, error_handler)
  File "/usr/lib/python2.7/site-packages/instack_undercloud/validator.py", line 39, in validate_config
    _validate_interface_exists(local_params, error_callback)
  File "/usr/lib/python2.7/site-packages/instack_undercloud/validator.py", line 157, in _validate_interface_exists
    error_callback(message)
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 697, in error_handler
    raise validator.FailedValidation(message)
instack_undercloud.validator.FailedValidation: Invalid local_interface specified. eth3 is not available.
Command 'instack-install-undercloud' returned non-zero exit status 1

Expected results:


openstack undercloud install
2017-06-13 10:37:14,706 INFO: Logging to /home/stack/.instack/install-undercloud.log
2017-06-13 10:37:14,730 INFO: Checking for a FQDN hostname...
2017-06-13 10:37:14,761 INFO: Static hostname detected as undercloud.localdomain
2017-06-13 10:37:14,773 INFO: Transient hostname detected as undercloud.localdomain
2017-06-13 10:37:14,777 ERROR: Undercloud configuration validation failed: Invalid local_interface specified. eth3 is not available.
2017-06-13 10:37:14,777 DEBUG: An exception occurred
FailedValidation: Invalid local_interface specified. eth3 is not available.
2017-06-13 10:37:14,778 ERROR:
#############################################################################
Undercloud install failed.

Reason: Invalid local_interface specified. eth3 is not available.

See the previous output for details about what went wrong.  The full install
log can be found at /home/stack/.instack/install-undercloud.log.

#############################################################################


Additional info:


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