Ask Your Question
0

creating heat resource OS::Ceilometer::Alarm failed

asked 2015-12-04 08:30:18 -0600

SergeyY gravatar image

updated 2015-12-12 01:21:52 -0600

I deploy OpenStack Liberty on CentOS by installation guide and try create autoscaling example with resource OS::Ceilometer:Alarm

...
cpu_alarm_high:
      type: OS::Ceilometer::Alarm
      properties:
        meter_name: cpu_util
        statistic: avg
        period: 60
        evaluation_periods: 1
        threshold: 50
        alarm_actions:
            - {get_attr: [scaleup_policy, alarm_url]}
        comparison_operator: gt
...

but it fails with this error in heat-engine.log

2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource Traceback (most recent call last):
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource   File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 612, in _action_recorder
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource     yield
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource   File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 682, in _do_action
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource     yield self.action_handler_task(action, args=handler_args)
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource   File "/usr/lib/python2.7/site-packages/heat/engine/scheduler.py", line 292, in wrapper
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource     step = next(subtask)
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource   File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 653, in action_handler_task
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource     handler_data = handler(*args)
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource   File "/usr/lib/python2.7/site-packages/heat/engine/resources/openstack/ceilometer/alarm.py", line 335, in handle_create
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource     alarm = self.client().alarms.create(**props)
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource   File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 536, in client
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource     return self.stack.clients.client(client_name)
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource   File "/usr/lib/python2.7/site-packages/heat/engine/clients/__init__.py", line 57, in client
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource     return client_plugin.client()
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource   File "/usr/lib/python2.7/site-packages/heat/engine/clients/client_plugin.py", line 64, in client
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource     self._client = self._create()
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource   File "/usr/lib/python2.7/site-packages/heat/engine/clients/os/ceilometer.py", line 46, in _create
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource     return cc.get_client('2', **args)
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource   File "/usr/lib/python2.7/site-packages/ceilometerclient/client.py", line 395, in get_client
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource     return Client(version, endpoint, **kwargs)
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource   File "/usr/lib/python2.7/site-packages/ceilometerclient/client.py", line 359, in Client
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource     return client_class(*args, **client_kwargs)
2015-12-04 19:41:26.871 7105 ERROR heat.engine.resource ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-12-14 01:34:30 -0600

SergeyY gravatar image

updated 2015-12-14 01:37:57 -0600

I post bug report on lunched (bug #1525800)

I hope it will be fixed

my suggestion, bug in heat/engine/clients/os/ceilometer.py

class CeilometerClientPlugin(client_plugin.ClientPlugin):
   ... 
   def _create(self):
   ...
   args = {
            'auth_url': con.auth_url,
            'service_type': self.METERING,
            'project_name': con.tenant, <--- HERE!!!

if use 'project_id': con.tenant_id, instead 'project_name': con.tenant, it works fine

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-12-04 08:30:18 -0600

Seen: 254 times

Last updated: Dec 14 '15