tripleoclient fails obscurely if it can't find undercloud-passwords.conf

Bug #1536156 reported by Steven Hardy on 2016-01-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Medium
Brent Eagles

Bug Description

If you SSH to the undercloud as root, then forget to su - stack, this happens:

# source stackrc
# openstack overcloud deploy --templates
No section: 'auth'

Which appears to be because we can't find the file with the passwords in.

It'd be better to detect the lack of the file and say we can't find it, the error is really non-obvious until you look at code.

Steven Hardy (shardy) on 2016-03-17
Changed in tripleo:
status: New → Triaged
importance: Undecided → Medium
tags: added: low-hanging-fruit
Brent Eagles (beagles) on 2016-03-17
Changed in tripleo:
assignee: nobody → Brent Eagles (beagles)
Brent Eagles (beagles) wrote :

Is the absence of the file a critical error that we want to abort on or is it that we simply want to provide a better message? If it is a critical error, a separate but closely related issue is dealing with a file that is missing the desired password information.

Steven Hardy (shardy) wrote :

The password file is created as part of the undercloud install, see:

https://github.com/openstack/instack-undercloud/blob/master/instack_undercloud/undercloud.py#L592

which is called from tripleoclient during "openstack undercloud install" - so I think we do expect this file to exist at the point when the overcloud deploy happens (although it's a little odd that we're reading the undercloud passwords file at that point..)

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

Changed in tripleo:
status: Triaged → In Progress

Reviewed: https://review.openstack.org/294229
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=35b527a032ebb441063aba78db92e94db2d14e2c
Submitter: Jenkins
Branch: master

commit 35b527a032ebb441063aba78db92e94db2d14e2c
Author: Brent Eagles <email address hidden>
Date: Thu Mar 17 13:10:07 2016 -0400

    Throw exception if undercloud password file is missing

    utils.get_config_value() uses ConfigParser which treats non-existent
    files as empty configuration. We are using this function to retrieve a
    required value from the undercloud passwords file so failure to find the
    file is actually a critical error. This patch adds a check and throws an
    exception if the password file is missing.

    Change-Id: I56cf8a99211cff7333e5f13539c3a145639686fa
    Closes-Bug: #1536156

Changed in tripleo:
status: In Progress → Fix Released

This issue was fixed in the openstack/python-tripleoclient 5.0.0.0b1 development milestone.

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

Other bug subscribers