Bug 1434345

Summary: Ceilometer-upgrade fail due to old gnocchiclient version
Product: Red Hat OpenStack Reporter: Mehdi ABAAKOUK <mabaakou>
Component: python-gnocchiclientAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED ERRATA QA Contact: Sasha Smolyak <ssmolyak>
Severity: unspecified Docs Contact:
Priority: high    
Version: 11.0 (Ocata)CC: apevec, jschluet, lhh, pkilambi
Target Milestone: rcKeywords: Triaged
Target Release: 11.0 (Ocata)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-gnocchiclient-3.1.0-1.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-17 20:10:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1421431    

Description Mehdi ABAAKOUK 2017-03-21 10:19:55 UTC
Description of problem:

ceilometer-upgrade fails with:

2017-03-21 09:58:21.662 639019 CRITICAL ceilometer [-] ResourceNotFound: Resource type ceph_account does not exist (HTTP 404)
2017-03-21 09:58:21.662 639019 ERROR ceilometer Traceback (most recent call last):
2017-03-21 09:58:21.662 639019 ERROR ceilometer   File "/bin/ceilometer-upgrade", line 10, in <module>
2017-03-21 09:58:21.662 639019 ERROR ceilometer     sys.exit(upgrade())
2017-03-21 09:58:21.662 639019 ERROR ceilometer   File "/usr/lib/python2.7/site-packages/ceilometer/cmd/storage.py", line 53, in upgrade
2017-03-21 09:58:21.662 639019 ERROR ceilometer     gnocchi_client.upgrade_resource_types(conf)
2017-03-21 09:58:21.662 639019 ERROR ceilometer   File "/usr/lib/python2.7/site-packages/ceilometer/gnocchi_client.py", line 113, in upgrade_resource_types
2017-03-21 09:58:21.662 639019 ERROR ceilometer     gnocchi.resource_type.get(name=name)
2017-03-21 09:58:21.662 639019 ERROR ceilometer   File "/usr/lib/python2.7/site-packages/gnocchiclient/v1/resource_type.py", line 44, in get
2017-03-21 09:58:21.662 639019 ERROR ceilometer     headers={'Content-Type': "application/json"}).json()
2017-03-21 09:58:21.662 639019 ERROR ceilometer   File "/usr/lib/python2.7/site-packages/gnocchiclient/v1/base.py", line 37, in _get
2017-03-21 09:58:21.662 639019 ERROR ceilometer     return self.client.api.get(*args, **kwargs)
2017-03-21 09:58:21.662 639019 ERROR ceilometer   File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 217, in get
2017-03-21 09:58:21.662 639019 ERROR ceilometer     return self.request(url, 'GET', **kwargs)
2017-03-21 09:58:21.662 639019 ERROR ceilometer   File "/usr/lib/python2.7/site-packages/gnocchiclient/client.py", line 38, in request
2017-03-21 09:58:21.662 639019 ERROR ceilometer     raise exceptions.from_response(resp, method)
2017-03-21 09:58:21.662 639019 ERROR ceilometer ResourceNotFound: Resource type ceph_account does not exist (HTTP 404)
2017-03-21 09:58:21.662 639019 ERROR ceilometer

This is because gnocchiclient don't raise the right exception ResourceNotFound instead of ResourceTypeNotFound. This have been fixed by gnocchiclient 3.1.X.

But OSP10 still use the 3.0.0.

For the reference, the upstream fix is https://review.openstack.org/#/c/428777/

Comment 1 Mehdi ABAAKOUK 2017-03-21 10:52:18 UTC
s/OSP10/OSP11

Comment 2 Pradeep Kilambi 2017-03-22 11:55:35 UTC
The rebased merged in rdo. We need to pull down gnocchiclient 3.1.0 downstream

Comment 4 Sasha Smolyak 2017-04-02 13:02:31 UTC
The upgrade doesn't fail anymore

Comment 6 errata-xmlrpc 2017-05-17 20:10:00 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://access.redhat.com/errata/RHEA-2017:1245