Comment 4 for bug 1525800

Revision history for this message
Pallavi (pallavi-nagboth) wrote : Re: ceilometer client error when create Alarm

We are also facing the same problem. We are using openstack liberty on ubuntu. We have a heat template where we try to create OS::Ceilometer::Alarm. This resource creation is failing with the following error in heat-engine.log:

2016-01-20 10:40:45.143 17336 ERROR heat.engine.resource BadRequest: Expecting to find domain in project - the server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error. (HTTP 400) (Request-ID: req-7d9b53cb-e44b-42d6-96e4-08dd19a32915)

We fixed the bug by adding the following line inheat/engine/clients/os/ceilometer.py:

args = {
            'auth_url': con.auth_url,
            'service_type': self.METERING,
            'project_name': con.tenant,
            'project_id': con.tenant_id, -----------------> Added this line
            'token': lambda: self.auth_token,
            'endpoint_type': endpoint_type,
            'os_endpoint': endpoint,
            'cacert': self._get_client_option('ceilometer', 'ca_file'),
            'cert_file': self._get_client_option('ceilometer', 'cert_file'),
            'key_file': self._get_client_option('ceilometer', 'key_file'),
            'insecure': self._get_client_option('ceilometer', 'insecure')
        }

ubuntu@controller0:/usr/lib/python2.7/dist-packages/heat/engine/clients/os$ heat --version
0.8.0
ubuntu@controller0:/usr/lib/python2.7/dist-packages/heat/engine/clients/os$ keystone --version
/usr/lib/python2.7/dist-packages/keystoneclient/shell.py:64: DeprecationWarning: The keystone CLI is deprecated in favor of python-openstackclient. For a Python library, continue using python-keystoneclient.
  'python-keystoneclient.', DeprecationWarning)
1.7.1
ubuntu@controller0:/usr/lib/python2.7/dist-packages/heat/engine/clients/os$ ceilometer --version
1.5.0