Bug 1388203

Summary: rhel-osp-director: Updating templates with <Deployment command> + --update-plan-only fails: 'ClientManager' object has no attribute 'to_dict'
Product: Red Hat OpenStack Reporter: Alexander Chuzhoy <sasha>
Component: python-tripleoclientAssignee: Lukas Bezdicka <lbezdick>
Status: CLOSED ERRATA QA Contact: Alexander Chuzhoy <sasha>
Severity: unspecified Docs Contact:
Priority: urgent    
Version: 10.0 (Newton)CC: dbecker, hbrock, jcoufal, jschluet, jslagle, mburns, morazi, rhel-osp-director-maint
Target Milestone: rcKeywords: Triaged
Target Release: 10.0 (Newton)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-tripleoclient-5.3.0-3.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-14 16:24:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Alexander Chuzhoy 2016-10-24 18:08:19 UTC
rhel-osp-director:  Updating templates with <Deployment command> + --update-plan-only fails: 'ClientManager' object has no attribute 'to_dict'


Environment:
openstack-puppet-modules-9.3.0-0.20161003154825.8c758d6.el7ost.noarch
instack-undercloud-5.0.0-0.20161007201832.f044a47.el7ost.noarch
openstack-tripleo-heat-templates-5.0.0-0.20161008015357.0d3e3e3.1.el7ost.noarch


Steps to reproduce:
1. Deploy overcloud with:
openstack overcloud deploy --debug --templates --libvirt-type kvm --ntp-server clock.redhat.com --neutron-network-type vxlan --neutron-tunnel-types vxlan --control-scale 3 --control-flavor controller-d75f3dec-c770-5f88-9d4c-3fea1bf9c484 --compute-scale 1 --compute-flavor compute-b634c10a-570f-59ba-bdbf-0c313d745a10 --ceph-storage-scale 2 --ceph-storage-flavor ceph-cf1f074b-dadb-5eb8-9eb0-55828273fab7 -e /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml -e virt/ceph.yaml -e virt/hostnames.yml -e virt/network/network-environment.yaml --log-file overcloud_deployment_48.log

2. Update the undercloud with "openstack undercloud upgradeā€

3.
Apply patches:
https://review.openstack.org/#/c/387531/  
https://review.openstack.org/#/c/389114/  
https://review.openstack.org/#/c/389830/

4. Remove the "openstack-dashboard" RPM on all OC nodes.
5. Run:
openstack overcloud deploy --debug --templates --libvirt-type kvm --ntp-server clock.redhat.com --neutron-network-type vxlan --neutron-tunnel-types vxlan --control-scale 3 --control-flavor controller-d75f3dec-c770-5f88-9d4c-3fea1bf9c484 --compute-scale 1 --compute-flavor compute-b634c10a-570f-59ba-bdbf-0c313d745a10 --ceph-storage-scale 2 --ceph-storage-flavor ceph-cf1f074b-dadb-5eb8-9eb0-55828273fab7 -e /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml -e virt/ceph.yaml -e virt/hostnames.yml -e virt/network/network-environment.yaml --update-plan-only

Result:
Removing the current plan files
Uploading new plan files
Started Mistral Workflow. Execution ID: 5fc041ca-8d9f-499b-8210-6c1733fab6e9
Plan updated
Deploying templates in the directory /tmp/tripleoclient-EOodmy/tripleo-heat-templates
'ClientManager' object has no attribute 'to_dict'



Expected result:
The deployment command shouldn't exit with error

Comment 1 Lukas Bezdicka 2016-10-25 14:56:44 UTC
'ClientManager' object has no attribute 'to_dict'
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 1172, in take_action
    utils.create_overcloudrc(clients, stack, parsed_args.no_proxy)
  File "/usr/lib/python2.7/site-packages/tripleoclient/utils.py", line 160, in create_overcloudrc
    overcloud_endpoint = get_overcloud_endpoint(stack)
  File "/usr/lib/python2.7/site-packages/tripleoclient/utils.py", line 477, in get_overcloud_endpoint
    for output in stack.to_dict().get('outputs', {}):
AttributeError: 'ClientManager' object has no attribute 'to_dict'
clean_up DeployOvercloud: 'ClientManager' object has no attribute 'to_dict'
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 1172, in take_action
    utils.create_overcloudrc(clients, stack, parsed_args.no_proxy)
  File "/usr/lib/python2.7/site-packages/tripleoclient/utils.py", line 160, in create_overcloudrc
    overcloud_endpoint = get_overcloud_endpoint(stack)
  File "/usr/lib/python2.7/site-packages/tripleoclient/utils.py", line 477, in get_overcloud_endpoint
    for output in stack.to_dict().get('outputs', {}):
AttributeError: 'ClientManager' object has no attribute 'to_dict'

END return value: 1

Comment 2 Lukas Bezdicka 2016-10-25 15:08:18 UTC
We need to bump python-tripleoclient to test https://review.openstack.org/#/c/389830/

Comment 4 Alexander Chuzhoy 2016-11-08 23:14:19 UTC
Vefified:
Environment:
python-tripleoclient-5.3.0-5.el7ost.noarch
The reported issue doesn't reproduce.

Comment 6 errata-xmlrpc 2016-12-14 16:24:53 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