unhandled exception returned to end user if hostname does not match with $HOSTNAME

Bug #1624534 reported by Alex Schultz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Low
Alex Schultz

Bug Description

If a user attempts to setup a baremetal host and forgets to set the hostname via hostnamectl(see baremetal note under step 1 of http://tripleo.org/installation/installation.html), a unhandled exception is dumped straight to the user with a terse error message.

The exception should be caught and better messaging should be provided to the end user as to how to address this issue as it may not be obvious the solution in its current form.

[centos@undercloud ~]$ openstack undercloud install
WARNING: openstackclient.common.utils is deprecated and will be removed after Jun 2017. Please use osc_lib.utils
Password:
Logging to /home/centos/.instack/install-undercloud.log
Checking for a FQDN hostname...
Static hostname detected as undercloud.localdomain
Transient hostname detected as undercloud
Static hostname "undercloud.localdomain" does not match transient hostname "undercloud".
Use hostnamectl to set matching hostnames.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 1063, in install
    _validate_configuration()
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 610, in _validate_configuration
    _check_hostname()
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 545, in _check_hostname
    raise RuntimeError('Static and transient hostnames do not match')
RuntimeError: Static and transient hostnames do not match
Command 'instack-install-undercloud' returned non-zero exit status 1
[centos@undercloud ~]$

Changed in tripleo:
status: New → Triaged
importance: Undecided → Low
assignee: nobody → Alex Schultz (alex-schultz)
milestone: none → ocata-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to instack-undercloud (master)

Fix proposed to branch: master
Review: https://review.openstack.org/371802

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

Reviewed: https://review.openstack.org/371802
Committed: https://git.openstack.org/cgit/openstack/instack-undercloud/commit/?id=5902936eccaedabc5eef7622fdc217d4ccbd89c8
Submitter: Jenkins
Branch: master

commit 5902936eccaedabc5eef7622fdc217d4ccbd89c8
Author: Alex Schultz <email address hidden>
Date: Fri Sep 16 14:51:57 2016 -0600

    Catch runtime exceptions during validation

    This change catches exceptions that are thrown during the host
    configuration validation to provide an easier to consume messsaging
    Previously, the exception stacktraces were being dumped to the end user
    rather than providing guidance on what went wrong.

    Change-Id: I78a3450ca8b979bda07e6a940714604be26f6a95
    Closes-Bug: #1624534

Changed in tripleo:
status: In Progress → Fix Released
Steven Hardy (shardy)
Changed in tripleo:
milestone: ocata-1 → newton-rc2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/instack-undercloud 5.0.0.0rc2

This issue was fixed in the openstack/instack-undercloud 5.0.0.0rc2 release candidate.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.