Bug 1392828 - Composable roles deployment fails with KeyError: 'CountDefault' error message
Summary: Composable roles deployment fails with KeyError: 'CountDefault' error message
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-tripleoclient
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: rc
: 10.0 (Newton)
Assignee: James Slagle
QA Contact: Omri Hochman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-08 10:27 UTC by Marius Cornea
Modified: 2016-12-14 16:30 UTC (History)
12 users (show)

Fixed In Version: python-tripleoclient-5.3.0-7.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-14 16:30:36 UTC
scohen: needinfo+
scohen: needinfo+


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:2948 normal SHIPPED_LIVE Red Hat OpenStack Platform 10 enhancement update 2016-12-14 19:55:27 UTC
OpenStack gerrit 395131 None None None 2016-11-09 13:17:49 UTC

Description Marius Cornea 2016-11-08 10:27:18 UTC
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.

Comment 1 Marius Cornea 2016-11-08 14:17:25 UTC
Workaround: add CountDefault: 0 to all roles in roles_data.yaml

Comment 2 Alexander Chuzhoy 2016-11-08 21:55:16 UTC
Reproduced the issue: after updating the undercloud to latest, tried to re-run the deployment command with --update-only arg.

Adding the patch resolved the issue:
curl -4 https://review.openstack.org/changes/394924/revisions/4f5be2b7d98347d5fd6ae40ce26fec52749007e9/patch?download |base64 -d |sudo patch  -d /usr/lib/python2.7/site-packages/tripleoclient/ -p2

Comment 7 errata-xmlrpc 2016-12-14 16:30:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-2948.html


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