Composable roles deployment fails with KeyError: 'CountDefault' error message

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

Bug Description

Description of problem:
Composable roles deployment fails with KeyError: 'CountDefault' error message

GET call to compute for http://192.168.0.1:8774/v2.1/os-hypervisors/statistics used request id req-454cc9e0-8765-4c84-aa58-f78e93ee5700
Checking nodes count
'CountDefault'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 387, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/command.py", line 59, in run
    return self.take_action(parsed_args) or 0
  File "/usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_deploy.py", line 1125, in take_action
    stack, parameters, parsed_args)
  File "/usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_deploy.py", line 763, in _predeploy_verify_capabilities
    default_role_counts = self._get_default_role_counts(parsed_args)
  File "/usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_deploy.py", line 730, in _get_default_role_counts
    r['CountDefault'])
KeyError: 'CountDefault'
clean_up DeployOvercloud: 'CountDefault'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 135, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 267, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 180, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 387, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/command.py", line 59, in run
    return self.take_action(parsed_args) or 0
  File "/usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_deploy.py", line 1125, in take_action
    stack, parameters, parsed_args)
  File "/usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_deploy.py", line 763, in _predeploy_verify_capabilities
    default_role_counts = self._get_default_role_counts(parsed_args)
  File "/usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_deploy.py", line 730, in _get_default_role_counts
    r['CountDefault'])
KeyError: 'CountDefault'

END return value: 1

Version-Release number of selected component (if applicable):
openstack-tripleo-heat-templates-5.0.0-1.3.el7ost.noarch
openstack-tripleo-common-5.3.0-3.el7ost.noarch
python-tripleoclient-5.3.0-5.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. Deploy overcloud with composable roles, environment files and deploy command below:
http://paste.openstack.org/show/588354/

Actual results:
Deployment fails: KeyError: 'CountDefault'

Expected results:
Deployment succeeds.

Changed in tripleo:
status: New → In Progress
importance: Undecided → High
assignee: nobody → James Slagle (james-slagle)
milestone: none → ocata-1
tags: added: composable-roles newton-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (master)

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

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

Reviewed: https://review.openstack.org/394924
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=4f5be2b7d98347d5fd6ae40ce26fec52749007e9
Submitter: Jenkins
Branch: master

commit 4f5be2b7d98347d5fd6ae40ce26fec52749007e9
Author: James Slagle <email address hidden>
Date: Tue Nov 8 06:53:36 2016 -0500

    Don't assume CountDefault set in roles_data.yaml

    Specifying CountDefault in roles_data.yaml is not required since it
    defaults to 0 in overcloud.j2.yaml. This patch updates the
    _get_default_role_counts to handle the situation where it is not
    specified and assume 0 as well.

    Change-Id: I4a40b55363d6a4dbe3fdc68309157e04695f51a9
    Closes-Bug: #1640141

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

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/395131

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

Reviewed: https://review.openstack.org/395131
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=476458b62f5475f4eb1bf541ee04178fb869b91f
Submitter: Jenkins
Branch: stable/newton

commit 476458b62f5475f4eb1bf541ee04178fb869b91f
Author: James Slagle <email address hidden>
Date: Tue Nov 8 06:53:36 2016 -0500

    Don't assume CountDefault set in roles_data.yaml

    Specifying CountDefault in roles_data.yaml is not required since it
    defaults to 0 in overcloud.j2.yaml. This patch updates the
    _get_default_role_counts to handle the situation where it is not
    specified and assume 0 as well.

    Change-Id: I4a40b55363d6a4dbe3fdc68309157e04695f51a9
    Closes-Bug: #1640141
    (cherry picked from commit 4f5be2b7d98347d5fd6ae40ce26fec52749007e9)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/395289

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

Reviewed: https://review.openstack.org/395289
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=b32926a005a74971ade4517e25dbab1afc88535c
Submitter: Jenkins
Branch: stable/newton

commit b32926a005a74971ade4517e25dbab1afc88535c
Author: Ben Nemec <email address hidden>
Date: Tue Nov 8 23:41:12 2016 +0000

    Mock yaml.safe_load safely

    Just monkey-patching yaml.safe_load can break later tests because
    it isn't automatically undone after the test completes. Using
    mock.patch to set the mock will handle the cleanup safely.

    This is additional followup fix for the linked bug.

    Partial-Bug: #1640141
    Change-Id: I1b8905d1074f7847e51f64d53a9eaa47d063112e
    (cherry picked from commit 06f7b3a00e6acaf0d19d95d0c636cecb4642b749)

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

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

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

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

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

This issue was fixed in the openstack/python-tripleoclient 5.4.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.