Bug 1337429 - Ceilometer events does not work with openstack mitaka
Summary: Ceilometer events does not work with openstack mitaka
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.7.0
Assignee: Marek Aufart
QA Contact: Ola Pavlenko
URL:
Whiteboard: openstack:event
Depends On: 1337961 1365560 1365907
Blocks: 1337676
TreeView+ depends on / blocked
 
Reported: 2016-05-19 08:13 UTC by Marek Aufart
Modified: 2019-12-16 05:48 UTC (History)
12 users (show)

Fixed In Version: 5.7.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1337676 (view as bug list)
Environment:
Last Closed: 2017-01-11 20:19:48 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Marek Aufart 2016-05-19 08:13:10 UTC
Description of problem: Ceilometer in openstack mitaka has disabled events filtering by gt (greater than) on timestamp, so calls to ceilometer return error "Operator gt is not supported. Only equality operator is available for field start_timestamp"


Version-Release number of selected component (if applicable):


How reproducible: always with required configuration


Steps to Reproduce:
1. setup manageiq/cfme and openstack (tested on rdo mitaka from delorean) with ceilometer enabled
2. add cloud provider, don't fill provider events fields
3. check log (log/evm.log)

Actual results: No events are loaded, getting errors into log.


Expected results: Events are loaded in to app, no ceilometer error in log.


Additional info:
Ceilometer people disabled this feature (https://bugs.launchpad.net/ceilometer/+bug/1558594/comments/2) we should start using a different API call.

Getting error from fog metering "Operator gt is not supported. Only equality operator is available for field start_timestamp":
[----] I, [2016-05-17T14:06:08.258224 #17810:2b0cef17f670]  INFO -- : Reseting Openstack Ceilometer connection after Expected(200) <=> Actual(400 Bad Request)
excon.error.response
  :body          => "{\"error_message\": {\"debuginfo\": null, \"faultcode\": \"Client\", \"faultstring\": \"Operator gt is not supported. Only equality operator is available for field start_timestamp\"}}"
  :cookies       => [
  ]
  :headers       => {
    "Content-Length"         => "171"
    "Content-Type"           => "application/json"
    "Date"                   => "Tue, 17 May 2016 12:06:08 GMT"
    "Server"                 => "Werkzeug/0.9.1 Python/2.7.5"
    "x-openstack-request-id" => "req-b5c690da-94f4-4d74-b394-4bbb52dd356f"
  }
  :host          => "192.0.2.6"
  :local_address => "10...."
  :local_port    => 47042
  :path          => "/v2/events"
  :port          => 8777
  :reason_phrase => "Bad Request"
  :remote_ip     => "192.0.2.6"
  :status        => 400
  :status_line   => "HTTP/1.0 400 Bad Request\r\n"

Comment 2 Greg Blomquist 2016-05-19 13:57:50 UTC
This sounds like a bug in OpenStack.  Did the gt operator work in Liberty?  If so, can we get some clarity from OpenStack why they disabled the gt operator?

In the meantime, I guess we have to figure out how to work with eq.

Comment 5 Marek Aufart 2016-05-20 13:49:47 UTC
I don't have liberty installation at the moment.

@rrasouli What openstack version did you use to verify ceilometer events?

Comment 6 Julien Danjou 2016-05-20 13:50:11 UTC
This has never worked, it just did not raise any error before. This commits explain it correctly:

https://github.com/openstack/ceilometer/commit/ac3ff88c03ea3685d7f3511bbae16785646e56ba


If you would really want that to work, you should probably open a RFE on Ceilometer I guess.

Comment 7 Marek Aufart 2016-05-20 14:03:59 UTC
I am not sure if it was planned or not, but e.g. ceilometer in kilo worked (almost) as expected - http://paste.openstack.org/show/497913/

@jd Isn't there a different way quering events based on time? (docs I read says nothing about filtering restrictions), thanks.

Comment 8 Marek Aufart 2016-05-23 07:54:56 UTC
Liberty should be OK at the moment. But there is a ceilometer patch backporting the operator disable code (which causes this bug) up for review.

We do NOT want merge following patch to Ceilometer in Liberty https://review.openstack.org/#/c/296907/

Comment 9 Ronnie Rasouli 2016-05-23 09:32:02 UTC
@maufart the version I am using is liberty RHOS8

Comment 11 CFME Bot 2016-07-19 13:51:16 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/189b59a2dbbb3d51b8ed3142f62d30139817adaa

commit 189b59a2dbbb3d51b8ed3142f62d30139817adaa
Author:     Marek Aufart <maufart>
AuthorDate: Thu Jul 14 10:29:31 2016 +0200
Commit:     Marek Aufart <maufart>
CommitDate: Thu Jul 14 13:03:32 2016 +0200

    Fix Ceilometer Events for Openstack 9
    
    Ceilometer Events query now uses 'ge' operator instead of 'gt'
    because only 'eq', 'ge', 'le' operators are allowed in Ceilomemeter
    API since Mitaka release (9) - rhbz#1337961.
    
    This change works on older Openstack versions with Ceilometer too.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1337429

 gems/pending/openstack/events/openstack_ceilometer_event_monitor.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 12 Marcus Furlong 2016-08-11 06:03:18 UTC
'ge' doesn't work either on mitaka:

[----] E, [2016-08-11T02:02:14.180183 #4939:52d6d24] ERROR -- : excon.error     #<Excon::Error::BadRequest: Expected(200) <=> Actual(400 Bad Request)
excon.error.response
  :body          => "{\"error_message\": {\"debuginfo\": null, \"faultcode\": \"Client\", \"faultstring\": \"Operator ge is not supported. Only equality operator is available for field start_timestamp\"}}"
  :cookies       => [
  ]
  :headers       => {
    "Connection"             => "close"
    "Content-Length"         => "171"
    "Content-Type"           => "application/json"
    "Date"                   => "Thu, 11 Aug 2016 06:02:14 GMT"
    "Server"                 => "Apache/2.4.6 (CentOS)"
    "x-openstack-request-id" => "req-df5a33a5-cf93-4541-8973-17ffae10b18a"
  }

Comment 13 Marek Aufart 2016-08-11 07:44:25 UTC
You might need update OpenStack Ceilometer package to current stable in Mitaka. What version of Ceilometer do you use?

Ceilometer change which enabled 'ge' operator was backported to Mitaka in https://review.openstack.org/#/c/341096/

Comment 14 Marcus Furlong 2016-08-11 13:38:39 UTC
Yep, that works, thanks.

Comment 15 Ronnie Rasouli 2016-10-13 09:33:59 UTC
verified on 5.7.0.4


Note You need to log in before you can comment on or make changes to this bug.