project_id in parameters of ceilometerclient initialization is actually tenant_name

Bug #1476141 reported by Liusheng
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Liusheng

Bug Description

heat will init ceilometerclient instance when creating stack, that need some auth parameters provided, see [1], but the 'project_id' in kwargs is actually tenant_name. it is not broken now because heat has provide endpoint and auth token for ceilometerclient, so the 'project_id' didn't been used. I'm working on aodh (a module as alarm part of ceilometer in past) integration with heat. I have found this issue. FYI, some debug info following:

(Pdb) l
 41 'cert_file': self._get_client_option('ceilometer', 'cert_file'),
 42 'key_file': self._get_client_option('ceilometer', 'key_file'),
 43 'insecure': self._get_client_option('ceilometer', 'insecure')
 44 }
 45 import pdb;pdb.set_trace()
 46 -> return cc.get_client('2', **args)
 47
 48 def is_not_found(self, ex):
 49 return isinstance(ex, (exc.HTTPNotFound, api_exc.NotFound))
 50
 51 def is_over_limit(self, ex):
(Pdb) p args
{'insecure': False, 'cacert': None, 'token': <function <lambda> at 0x7f9fcd24e0c8>, 'endpoint_type': 'publicURL', 'auth_url': u'http://10.250.10.15:5000/v2.0', 'key_file': None, 'service_type': 'metering', 'cert_file': None, 'project_id': u'demo', 'os_endpoint': u'http://10.250.10.15:8777/'}

[1] https://github.com/openstack/heat/blob/master/heat/engine/clients/os/ceilometer.py#L36

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
assignee: nobody → Liusheng (liusheng)
status: New → In Progress
Steven Hardy (shardy)
Changed in heat:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/203520
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=34eafef6c3005d1d9c72b4e063cd05a86e34fc9f
Submitter: Jenkins
Branch: master

commit 34eafef6c3005d1d9c72b4e063cd05a86e34fc9f
Author: liu-sheng <email address hidden>
Date: Mon Jul 20 16:16:25 2015 +0800

    Fix the project_id to project_name when initializing ceilometerclient

    Heat need to initialize a ceilometerclient instance when creating stack.
    but the project_id in the parameters of ceilometerclient initialization is
    actually project_name

    Change-Id: I9e1e5ab66b5cf4ae7bcef2a573f89537e6df0af3
    Closes-Bug: 1476141

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → liberty-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: liberty-2 → 5.0.0
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.