config-download: Handle None value RoleConfig stack output

Bug #1748482 reported by James Slagle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
James Slagle

Bug Description

RoleConfig can exist as a stack output, but have a value of None. That case should be handled and set a default value of {} where the value was previously None.

Otherwise, the following traceback results when trying to use --config-download:

(undercloud) [stack@undercloud ~]$ tripleo-config-download
INFO:tripleo_common.utils.config.Config:Generating configuration under the directory: tripleo-config-download/tripleo-gDmruU-config
Traceback (most recent call last):
  File "/usr/bin/tripleo-config-download", line 56, in <module>
    stack_config.download_config(args.stack_name, args.output_dir)
  File "/usr/lib/python2.7/site-packages/tripleo_common/utils/config.py", line 194, in download_config
    for config_name, config in six.iteritems(role_config):
  File "/usr/lib/python2.7/site-packages/six.py", line 599, in iteritems
    return d.iteritems(**kw)
AttributeError: 'NoneType' object has no attribute 'iteritems'

The scenario where the value is None is when deploying where are roles have an empty set of services, such as when using environments/overcloud-baremetal.yaml with split-stack.

Changed in tripleo:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → James Slagle (james-slagle)
milestone: none → queens-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (master)

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

Revision history for this message
James Slagle (james-slagle) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.openstack.org/542947
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=d384f4ecb63f578a6dd3468934c6b5086094b04e
Submitter: Zuul
Branch: master

commit d384f4ecb63f578a6dd3468934c6b5086094b04e
Author: James Slagle <email address hidden>
Date: Fri Feb 9 11:56:04 2018 -0500

    Handle None value for RoleConfig

    RoleConfig can exist as a stack output, but have a value of None. That
    case should be handled with a default value of {} where the value was
    previously None.

    Change-Id: I3caf31c00ab8c47d71a68eb82114fb398a47961b
    Closes-Bug: #1748482

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 8.5.0

This issue was fixed in the openstack/tripleo-common 8.5.0 release.

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.