[SRU] ceilometer client error when create Alarm

Bug #1525800 reported by Sergey Yezhkov
34
This bug affects 7 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
John Belamaric
Ubuntu Cloud Archive
Invalid
Undecided
Unassigned
Liberty
Fix Released
Undecided
Unassigned
heat (Ubuntu)
Invalid
Medium
Unassigned
Wily
Fix Released
Medium
Edward Hope-Morley

Bug Description

[Impact]

 * Creating a stack with e.g. OS::Ceilometer::Alarm is failing because Ceilometer client is being passed incorrect parameters. This patch fixes heat ceilometer client.

[Test Case]

 * deploy Openstack Liberty
 * create a stack using a HOT template containing e.g. http://paste.ubuntu.com/15928508/
 * check that stack goes to CREATE_COMPLETE status

[Regression Potential]

 * None

I use OpenStack Liberty deployed by instruction for CentOS7 from docs.openstack.org
I'm trying to create OS::Ceilometer::Alarm resource

In heat-engine.log i have error

2015-12-14 12:59:00.696 6672 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-3d4ab42b-213b-4141-bd28-f8dbb2b79e96)

environment
[root@controller ~]# yum list installed | grep heat
openstack-heat-api.noarch 1:5.0.0-1.el7 @centos-openstack-liberty
openstack-heat-api-cfn.noarch 1:5.0.0-1.el7 @centos-openstack-liberty
openstack-heat-common.noarch 1:5.0.0-1.el7 @centos-openstack-liberty
openstack-heat-engine.noarch 1:5.0.0-1.el7 @centos-openstack-liberty
python-heatclient.noarch 0.8.0-1.el7 @centos-openstack-liberty
[root@controller ~]# yum list installed | grep ceilometer
openstack-ceilometer-alarm.noarch
openstack-ceilometer-api.noarch 1:5.0.0-1.el7 @centos-openstack-liberty
python-ceilometer.noarch 1:5.0.0-1.el7 @centos-openstack-liberty
python-ceilometerclient.noarch 1.5.0-1.el7 @centos-openstack-liberty

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!!!
            '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')
        }

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

Revision history for this message
huangtianhua (huangtianhua) wrote :
Revision history for this message
huangtianhua (huangtianhua) wrote :

Could you confirm it?

Revision history for this message
Sergey Yezhkov (yezhkov) wrote :

i think it different bug

if we use project_name instead of project_id (heat 5.0.0) we have to provide project_domain_name for keystone v3.
otherwise we receive error from keystone v3 "Expecting to find domain in project".

keystone v3 can have the same project_name in different domains.

OR

we can use project_id

Revision history for this message
Pallavi (pallavi-nagboth) wrote :

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

Revision history for this message
John Belamaric (jbelamaric) wrote :

I see the same thing. I fixed it by changing from project_name to project_id. I'll submit a fix when I have a chance in the next couple days.

Changed in heat:
status: New → Confirmed
assignee: nobody → John Belamaric (jbelamaric)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/288623

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/liberty)

Reviewed: https://review.openstack.org/288623
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=6d3e34c5b3236a340c024c043ec16ab4e3a8e4ee
Submitter: Jenkins
Branch: stable/liberty

commit 6d3e34c5b3236a340c024c043ec16ab4e3a8e4ee
Author: John Belamaric <email address hidden>
Date: Fri Mar 4 18:20:57 2016 +0000

    Enable Ceilometer client to work with Keystone API v3

    Keystone APIv3 supports domains, which means the same project name
    may be used in different domains. Thus we need to use the ID not
    the name when authenticating.

    Change-Id: I29071e60c5f7f349e44a75063dd2b216c53dd1fd
    Closes-Bug: #1525800

tags: added: in-stable-liberty
Changed in heat:
status: Confirmed → Fix Released
description: updated
tags: added: sts-sru
summary: - ceilometer client error when create Alarm
+ [SRU] ceilometer client error when create Alarm
James Page (james-page)
Changed in cloud-archive:
status: New → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in heat (Ubuntu):
status: New → Confirmed
James Page (james-page)
affects: ceilometer (Ubuntu) → heat (Ubuntu)
Changed in heat (Ubuntu):
status: New → Invalid
Changed in heat (Ubuntu Wily):
assignee: nobody → Edward Hope-Morley (hopem)
status: New → In Progress
Revision history for this message
Edward Hope-Morley (hopem) wrote :
Mathew Hodson (mhodson)
Changed in heat (Ubuntu):
importance: Undecided → Medium
Changed in heat (Ubuntu Wily):
importance: Undecided → Medium
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Thanks for the patch Ed. Heat has been uploaded with your change and is awaiting SRU team review for wily: https://launchpad.net/ubuntu/wily/+queue?queue_state=1&queue_text=

Changed in heat (Ubuntu Wily):
status: In Progress → Fix Committed
Revision history for this message
Tom Verdaat (tom-verdaat) wrote :

I see the 5.0.1. release is from Jan 19 and there have been up to 43 merges in the stable/liberty since, including this one. Could the Heat team please do a maintenance release soon?

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Sergey, or anyone else affected,

Accepted heat into wily-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/heat/1:5.0.1-0ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hi Brian,

This package has been verified successfully on wily-proposed.

Thanks,
Corey

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package heat - 1:5.0.1-0ubuntu2

---------------
heat (1:5.0.1-0ubuntu2) wily; urgency=medium

  * Enable Ceilometer client to work with Keystone API v3 (LP: #1525800):
    - d/p/enable-ceilometer-client-to-work-with-keystone-api-v3.patch

 -- Edward Hope-Morley <email address hidden> Tue, 19 Apr 2016 14:51:48 +0100

Changed in heat (Ubuntu Wily):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for heat has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
James Page (james-page) wrote : Please test proposed package

Hello Sergey, or anyone else affected,

Accepted heat into liberty-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:liberty-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-liberty-needed to verification-liberty-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-liberty-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-liberty-needed
Revision history for this message
Igor Meneguitte Ávila (igoravila) wrote :

Hi,

I'm having the same problem with ceilometer.

2016-05-04 11:55:20.420 18699 ERROR heat.engine.resource
2016-05-04 11:55:21.465 18699 INFO heat.engine.service [-] Stack create failed, status FAILED
2016-05-04 11:55:21.510 18699 INFO heat.engine.stack [-] Stack CREATE FAILED (autoscalingv1): Resource CREATE failed: BadRequest: resources.cpu_alarm_low: 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-7825392d-8178-4166-9cd0-adfb33ae04e8)
2016-05-04 11:55:29.465 18704 INFO heat.engine.service [req-62c6336c-e75b-4418-9243-a941b9994e91 - -] Service 03b808ce-b97d-4ca5-8bc6-f314782bf641 is updated

I checked the versions and package 1: 5.0.1-0ubuntu2 (heat) must be installed. I'm having trouble installing this package. I do not know to create the .deb.

Can someone help me? I followed these steps (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-install-dsc-file-in-linux-896928/), but I could not install. It appeared the following message:

dpkg-buildpackage: warning: using a gain-root-command while being root
dpkg-buildpackage: source package heat
dpkg-buildpackage: source version 1:5.0.1-0ubuntu2
dpkg-buildpackage: source distribution wily
dpkg-buildpackage: source changed by Edward Hope-Morley <email address hidden>
dpkg-buildpackage: host architecture amd64
 dpkg-source --before-build pacote
dpkg-source: info: using options from pacote/debian/source/options: --extend-diff-ignore=^[^/]*[.]egg-info/
 fakeroot debian/rules clean
dh clean --buildsystem=python_distutils --with python2,systemd
   dh_testdir -O--buildsystem=python_distutils
   debian/rules override_dh_auto_clean
make[1]: Entering directory `/home/igoravila/pacote'
dh_auto_clean
pyversions: missing X(S)-Python-Version in control file, fall back to debian/pyversions
pyversions: missing debian/pyversions file, fall back to supported versions
python: can't open file 'setup.py': [Errno 2] No such file or directory
dh_auto_clean: python setup.py clean -a returned exit code 2
make[1]: *** [override_dh_auto_clean] Error 2
make[1]: Leaving directory `/home/igoravila/pacote'
make: *** [clean] Error 2
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2
root@controller:/home/igoravila/pacote# make install
make: *** No rule to make target `install'. Stop.
root@controller:/home/igoravila/pacote# make
make: *** No targets specified and no makefile found. Stop.

Regards,

Igor

Revision history for this message
Igor Meneguitte Ávila (igoravila) wrote :
Download full text (7.4 KiB)

Hi,

I modified ceilometer.py (https://review.openstack.org/#/c/288623/)

I created .deb following the steps in this manual (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-install-dsc-file-in-linux-896928/)

ls -la *.deb
-rw-r--r-- 1 root root 10192 Mai 4 17:58 heat-api_5.0.1-0ubuntu2_all.deb
-rw-r--r-- 1 root root 10226 Mai 4 17:58 heat-api-cfn_5.0.1-0ubuntu2_all.deb
-rw-r--r-- 1 root root 10240 Mai 4 17:58 heat-api-cloudwatch_5.0.1-0ubuntu2_all.deb
-rw-r--r-- 1 root root 28252 Mai 4 17:58 heat-common_5.0.1-0ubuntu2_all.deb
-rw-r--r-- 1 root root 10516 Mai 4 17:58 heat-engine_5.0.1-0ubuntu2_all.deb
-rw-r--r-- 1 root root 727126 Mai 4 17:58 python-heat_5.0.1-0ubuntu2_all.deb

I installed packages and did not work for me.

2016-05-04 18:26:25.728 22836 INFO heat.engine.resource [-] CREATE: CeilometerAlarm "cpu_alarm_low" Stack "autoscalingv1" [3fa4f331-2dd7-4036-9913-6aab5aa237b7]
2016-05-04 18:26:25.728 22836 ERROR heat.engine.resource Traceback (most recent call last):
2016-05-04 18:26:25.728 22836 ERROR heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/heat/engine/resource.py", line 620, in _action_recorder
2016-05-04 18:26:25.728 22836 ERROR heat.engine.resource yield
2016-05-04 18:26:25.728 22836 ERROR heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/heat/engine/resource.py", line 690, in _do_action
2016-05-04 18:26:25.728 22836 ERROR heat.engine.resource yield self.action_handler_task(action, args=handler_args)
2016-05-04 18:26:25.728 22836 ERROR heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/heat/engine/scheduler.py", line 292, in wrapper
2016-05-04 18:26:25.728 22836 ERROR heat.engine.resource step = next(subtask)
2016-05-04 18:26:25.728 22836 ERROR heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/heat/engine/resource.py", line 661, in action_handler_task
2016-05-04 18:26:25.728 22836 ERROR heat.engine.resource handler_data = handler(*args)
2016-05-04 18:26:25.728 22836 ERROR heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/heat/engine/resources/openstack/ceilometer/alarm.py", line 335, in handle_create
2016-05-04 18:26:25.728 22836 ERROR heat.engine.resource alarm = self.client().alarms.create(**props)
2016-05-04 18:26:25.728 22836 ERROR heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/heat/engine/resource.py", line 544, in client
2016-05-04 18:26:25.728 22836 ERROR heat.engine.resource return self.stack.clients.client(client_name)
2016-05-04 18:26:25.728 22836 ERROR heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/heat/engine/clients/__init__.py", line 70, in client
2016-05-04 18:26:25.728 22836 ERROR heat.engine.resource return client_plugin.client()
2016-05-04 18:26:25.728 22836 ERROR heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/heat/engine/clients/client_plugin.py", line 78, in client
2016-05-04 18:26:25.728 22836 ERROR heat.engine.resource self._client = self._create()
2016-05-04 18:26:25.728 22836 ERROR heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/heat/engine/clients/os/ceilometer.py", line 46,...

Read more...

Revision history for this message
Edward Hope-Morley (hopem) wrote :

@igoravila you do not need to build the package yourself. You can install 1:5.0.1-0ubuntu2 from wily-updates (on Ubuntu Wily) or (once it lands) from the Trusty Liberty Ubuntu Cloud Archive (sudo add-apt-repository cloud-archive:liberty). If you want to try the proposed UCA version you can install it from the proposed PPA i.e. sudo add-apt-repository ppa:ubuntu-cloud-archive/liberty-staging (NOTE: this is the proposed pocket so only for testing)

Revision history for this message
Igor Meneguitte Ávila (igoravila) wrote :

@hopem thanks for your help.

I continue with the same problem, see:

https://bugs.launchpad.net/heat/+bug/1525800/comments/18

Regards,

Igor

Revision history for this message
John Belamaric (jbelamaric) wrote :

I think the wrong package is listed above - why is there no change in any of the version from the version currently shipping? Shouldn't the version be bumped? Note APT-Sources below. The one below does not contain the fix.

openstack@os-ctrl-02:/usr/lib/python2.7/dist-packages/heat/engine/clients/os$ apt show heat-engine
Package: heat-engine
Source: heat
Priority: optional
Section: web
Installed-Size: 76.8 kB
Maintainer: Ubuntu Developers <email address hidden>
Version: 1:5.0.1-0ubuntu1~cloud0
Depends: adduser, heat-common (= 1:5.0.1-0ubuntu1~cloud0), init-system-helpers (>= 1.13~), sysv-rc (>= 2.88dsf-24) | file-rc (>= 0.8.16), python
Supported: 18m
Download-Size: 5,288 B
Original-Maintainer: PKG OpenStack <email address hidden>
APT-Manual-Installed: yes
APT-Sources: http://ubuntu-cloud.archive.canonical.com/ubuntu/ trusty-updates/liberty/main amd64 Packages
Description: OpenStack orchestration service - engine
 Heat is a service to orchestrate multiple composite cloud applications using
 templates, through both an OpenStack-native ReST API and a
 CloudFormation-compatible Query API.
 .
 This package contains the heat engine, which is the core service of heat, and
 which the API servers will use.

N: There are 3 additional records. Please use the '-a' switch to see them.
openstack@os-ctrl-02:/usr/lib/python2.7/dist-packages/heat/engine/clients/os$

Revision history for this message
Billy Olsen (billy-olsen) wrote :

@John, the package version Ed mentioned is available in Wily (the corresponding Ubuntu release for Liberty). Since the package has hit wily-updates the package is synced into the trusty-liberty cloud archive's proposed pocket.

In Ubuntu for wily release:

 heat | 1:5.0.0-0ubuntu1 | wily | source
 heat | 1:5.0.1-0ubuntu2 | wily-proposed | source
 heat | 1:5.0.1-0ubuntu2 | wily-updates | source

In the liberty cloud-archive:

 heat | 1:5.0.1-0ubuntu1~cloud0 | liberty | source
 heat | 1:5.0.1-0ubuntu2~cloud0 | liberty-proposed | source

Further testing is performed on the liberty-proposed pocket before being pushed to the liberty pocket in order to prevent regressions. The additional regression testing is needed due to the Liberty cloud-archive being Trusty + packages for Liberty and we can't rely solely on the regression testing done by the Wily + packages for Liberty.

Revision history for this message
John Belamaric (jbelamaric) wrote :

Doh. Somehow I missed the "2" after "ubuntu". Thanks for the explanation.

Revision history for this message
Igor Meneguitte Ávila (igoravila) wrote :

Hi,

The installation appears to be correct, but it did not worked for me. For everyone the package solved the problem?

# apt show heat-engine -a
Package: heat-engine
Status: install ok installed
Priority: optional
Section: web
Installed-Size: 76,8 kB
Maintainer: Ubuntu Developers <email address hidden>
Source: heat
Version: 1:5.0.1-0ubuntu2
Depends: adduser, heat-common (= 1:5.0.1-0ubuntu2), init-system-helpers (>= 1.13~), sysv-rc (>= 2.88dsf-24) | file-rc (>= 0.8.16), python
Homepage: http://wiki.openstack.org/Heat
Original-Maintainer: PKG OpenStack <email address hidden>
Download-Size: unknown
APT-Manual-Installed: yes
APT-Sources: /var/lib/dpkg/status
Description: ...

Package: heat-engine
Source: heat
Priority: optional
Section: web
Installed-Size: 76,8 kB
Maintainer: Ubuntu Developers <email address hidden>
Version: 1:5.0.1-0ubuntu1~cloud0
Depends: adduser, heat-common (= 1:5.0.1-0ubuntu1~cloud0), init-system-helpers (>= 1.13~), sysv-rc (>= 2.88dsf-24) | file-rc (>= 0.8.16), python
Supported: 18m
Download-Size: 5.288 B
Original-Maintainer: PKG OpenStack <email address hidden>
APT-Sources: http://ubuntu-cloud.archive.canonical.com/ubuntu/ trusty-updates/liberty/main amd64 Packages
Description: .....

Package: heat-engine
Priority: optional
Section: web
Installed-Size: 74,8 kB
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: PKG OpenStack <email address hidden>
Source: heat
Version: 2014.1.5-0ubuntu1
Depends: adduser, heat-common (= 2014.1.5-0ubuntu1), sysv-rc (>= 2.88dsf-24) | file-rc (>= 0.8.16), python:any
Download-Size: 5.714 B
Homepage: http://wiki.openstack.org/Heat
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
APT-Sources: http://br.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
Description:

Package: heat-engine
Priority: optional
Section: web
Installed-Size: 73,7 kB
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: PKG OpenStack <email address hidden>
Source: heat
Version: 2014.1-0ubuntu1.1
Depends: adduser, heat-common (= 2014.1-0ubuntu1.1), sysv-rc (>= 2.88dsf-24) | file-rc (>= 0.8.16), python:any
Download-Size: 5.726 B
Homepage: http://wiki.openstack.org/Heat
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
APT-Sources: http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
Description: ....

Package: heat-engine
Priority: optional
Section: web
Installed-Size: 73,7 kB
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: PKG OpenStack <email address hidden>
Source: heat
Version: 2014.1-0ubuntu1
Depends: adduser, heat-common (= 2014.1-0ubuntu1), sysv-rc (>= 2.88dsf-24) | file-rc (>= 0.8.16), python:any
Download-Size: 5.726 B
Homepage: http://wiki.openstack.org/Heat
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
APT-Sources: http://br.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
Description: ...

Regards,

Igor

Revision history for this message
John Belamaric (jbelamaric) wrote :

I haven't applied the package, but I manually did the fix in my lab and it works. Look at:

/usr/lib/python2.7/dist-packages/heat/engine/clients/os/ceilometer.py

line 36 should be:

            'project_id': con.tenant_id,

Did you restart heat-engine?

Revision history for this message
Igor Meneguitte Ávila (igoravila) wrote :

Hi,

Yes, I changed the file and did not work. After I updated the packages and did not work.

For everyone the package solved the problem?

Regards,

Igor

Revision history for this message
Igor Meneguitte Ávila (igoravila) wrote :

Hi,

I restarted heat-engine, see logs with errors.

Any ideas?

Regards,

Igor

Revision history for this message
John Belamaric (jbelamaric) wrote :

Those errors are just from the restart. Sometimes it complains based on if the threads get killed before they finish cleaning up. Try creating the alarm now via a template and see if it works.

Revision history for this message
Igor Meneguitte Ávila (igoravila) wrote :

Hi,

It's not working.

  web_server_scaleup_policy:
    type: OS::Heat::ScalingPolicy
    properties:
      adjustment_type: change_in_capacity
      auto_scaling_group_id: {get_resource: asg}
      cooldown: 60
      scaling_adjustment: 1
  web_server_scaledown_policy:
    type: OS::Heat::ScalingPolicy
    properties:
      adjustment_type: change_in_capacity
      auto_scaling_group_id: {get_resource: asg}
      cooldown: 60
      scaling_adjustment: -1
  cpu_alarm_high:
    type: OS::Ceilometer::Alarm
    properties:
      description: Scale-up if the average CPU > 20% for 1 minute
      meter_name: cpu_util
      statistic: avg
      period: 60
      evaluation_periods: 1
      threshold: 20
      alarm_actions:
        - {get_attr: [web_server_scaleup_policy, alarm_url]}
      matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}}
      comparison_operator: gt
  cpu_alarm_low:
    type: OS::Ceilometer::Alarm
    properties:
      description: Scale-down if the average CPU < 5% for 10 minutes
      meter_name: cpu_util
      statistic: avg
      period: 600
      evaluation_periods: 1
      threshold: 5
      alarm_actions:
        - {get_attr: [web_server_scaledown_policy, alarm_url]}
      matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}}
      comparison_operator: lt

Regards,

Igor

Revision history for this message
Igor Meneguitte Ávila (igoravila) wrote :

Hi,

Problem solved, but the ceilometer is not working as expected.

Scale up is not running. Does anyone know how to solve this problem?

---> alarm-notifier

2016-05-05 01:01:02.979 23618 INFO ceilometer.alarm.notifier.rest [req-1ee03d14-d011-4698-9396-c8237caf7c7b - - - - -] Notifying alarm teste-cpu_alarm_high-vut4wjst2npm ce5fa165-f216-4b41-bafa-ca80fee7018a with severity low from insufficient data to alarm with action SplitResult(scheme=u'http', netloc=u'controller:8000', path=u'/v1/signal/arn%3Aopenstack%3Aheat%3A%3A60d7922e29e44dc1ac62df3fe7ba3841%3Astacks%2Fteste%2F951d7e10-b296-4d7f-978a-270d56a7f7bc%2Fresources%2Fweb_server_scaleup_policy', query=u'Timestamp=2016-05-04T03%3A33%3A02Z&SignatureMethod=HmacSHA256&AWSAccessKeyId=69c5f5fc884f4e3a860d138fa0f854ce&SignatureVersion=2&Signature=o%2BSugdhZhPBnUrBlFo3Kx2bZuHmCP2l1J9%2BIVZ55vIU%3D', fragment='') because Transition to alarm due to 1 samples outside threshold, most recent: 89.1756234322. request-id: req-380e303d-1568-40e7-a721-888485f85209
2016-05-05 01:02:02.825 23618 INFO ceilometer.alarm.notifier.rest [req-9603d3cf-de79-41d6-bebd-2fdbad688557 - - - - -] Notifying alarm teste-cpu_alarm_high-vut4wjst2npm ce5fa165-f216-4b41-bafa-ca80fee7018a with severity low from alarm to alarm with action SplitResult(scheme=u'http', netloc=u'controller:8000', path=u'/v1/signal/arn%3Aopenstack%3Aheat%3A%3A60d7922e29e44dc1ac62df3fe7ba3841%3Astacks%2Fteste%2F951d7e10-b296-4d7f-978a-270d56a7f7bc%2Fresources%2Fweb_server_scaleup_policy', query=u'Timestamp=2016-05-04T03%3A33%3A02Z&SignatureMethod=HmacSHA256&AWSAccessKeyId=69c5f5fc884f4e3a860d138fa0f854ce&SignatureVersion=2&Signature=o%2BSugdhZhPBnUrBlFo3Kx2bZuHmCP2l1J9%2BIVZ55vIU%3D', fragment='') because Remaining as alarm due to 1 samples outside threshold, most recent: 89.1756234322. request-id: req-2b6757d3-222f-4d04-a6af-74641aa1a4eb

----> heat-api-cfn.log

2016-05-05 01:01:02.988 25610 INFO heat.api.aws.ec2token [-] Checking AWS credentials..
2016-05-05 01:01:02.989 25610 INFO heat.api.aws.ec2token [-] AWS credentials found, checking against keystone.
2016-05-05 01:01:02.991 25610 INFO heat.api.aws.ec2token [-] Authenticating with http://controller:5000/ec2tokens
2016-05-05 01:01:03.002 25610 INFO heat.api.aws.ec2token [-] AWS authentication failure.
2016-05-05 01:02:02.833 25610 INFO heat.api.aws.ec2token [-] Checking AWS credentials..
2016-05-05 01:02:02.835 25610 INFO heat.api.aws.ec2token [-] AWS credentials found, checking against keystone.
2016-05-05 01:02:02.837 25610 INFO heat.api.aws.ec2token [-] Authenticating with http://controller:5000/ec2tokens
2016-05-05 01:02:02.847 25610 INFO heat.api.aws.ec2token [-] AWS authentication failure.

Regards,

Igor

Revision history for this message
Igor Meneguitte Ávila (igoravila) wrote :

Hi,

Problem solved.

[ec2authtoken]
auth_uri = http://controller:5000

I change heat.conf to:

[ec2authtoken]
auth_uri = http://controller:5000/v2.0

Regards,

Igor

Revision history for this message
Edward Hope-Morley (hopem) wrote :

Tested liberty-staging and lgtm.

tags: added: verification-liberty-done
removed: verification-liberty-needed
Revision history for this message
James Page (james-page) wrote : Update Released

The verification of the Stable Release Update for heat has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
James Page (james-page) wrote :

This bug was fixed in the package heat - 1:5.0.1-0ubuntu2~cloud0
---------------

 heat (1:5.0.1-0ubuntu2~cloud0) trusty-liberty; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 heat (1:5.0.1-0ubuntu2) wily; urgency=medium
 .
   * Enable Ceilometer client to work with Keystone API v3 (LP: #1525800):
     - d/p/enable-ceilometer-client-to-work-with-keystone-api-v3.patch

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 5.0.2

This issue was fixed in the openstack/heat 5.0.2 release.

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.