Bug 1320677

Summary: Duplicate samples for ip.floating meter
Product: Red Hat OpenStack Reporter: Jeremy <jmelvin>
Component: openstack-ceilometerAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED ERRATA QA Contact: Yurii Prokulevych <yprokule>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0 (Juno)CC: eglynn, jruzicka, jschluet, ochalups, pkilambi, srevivo
Target Milestone: ---Keywords: ZStream
Target Release: 6.0 (Juno)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-ceilometer-2014.2.3-8.el7ost Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1335769 (view as bug list) Environment:
Last Closed: 2016-05-25 12:18:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1335769    
Attachments:
Description Flags
ceilometer patch
none
Patch diff none

Description Jeremy 2016-03-23 17:30:50 UTC
Created attachment 1139674 [details]
ceilometer patch

Description of problem:

We discovered an issue with the floating IP meter that was generating duplicate 'ip.floating' samples. 
The problem occurs because we have redundant 'controller' nodes, and the ip.floating meter is running in each node, instead of just the 'primary' one. And so this refactoring of code was necessary.
I have attached the patch for this issue.

Version-Release number of selected component (if applicable):
openstack-ceilometer-alarm-2014.2.3-7.el7ost.noarch         Mon Jan 25 21:08:29 2016    1453756109      Red Hat, Inc.   x86-021.build.eng.bos.redhat.com        (none)  (none)
openstack-ceilometer-api-2014.2.3-7.el7ost.noarch           Mon Jan 25 21:08:29 2016    1453756109      Red Hat, Inc.   x86-021.build.eng.bos.redhat.com        (none)  (none)
openstack-ceilometer-central-2014.2.3-7.el7ost.noarch       Mon Jan 25 21:08:29 2016    1453756109      Red Hat, Inc.   x86-021.build.eng.bos.redhat.com        (none)  (none)
openstack-ceilometer-collector-2014.2.3-7.el7ost.noarch     Mon Jan 25 21:08:29 2016    1453756109      Red Hat, Inc.   x86-021.build.eng.bos.redhat.com        (none)  (none)
openstack-ceilometer-common-2014.2.3-7.el7ost.noarch        Mon Jan 25 21:08:29 2016    1453756109      Red Hat, Inc.   x86-021.build.eng.bos.redhat.com        (none)  (none)
openstack-ceilometer-compute-2014.2.3-7.el7ost.noarch       Mon Jan 25 21:08:29 2016    1453756109      Red Hat, Inc.   x86-021.build.eng.bos.redhat.com        (none)  (none)
openstack-ceilometer-ipmi-2014.2.3-7.el7ost.noarch          Mon Jan 25 21:08:29 2016    1453756109      Red Hat, Inc.   x86-021.build.eng.bos.redhat.com        (none)  (none)
openstack-ceilometer-notification-2014.2.3-7.el7ost.noarch 

How reproducible:
unknown

Steps to Reproduce:
1. ip.floating meter runs on redundant controller
2. notice duplicate samples
3.

Actual results:
duplicate samples

Expected results:
no dups

Additional info:


Duplicate samples  for ip.floating meter taken from the database mongodb.
These two samples for ip.floating meter with same resource id have timestamp difference of one minute.

{ "_id" : ObjectId("56f28811eaefd238d52c21b3"), "counter_name" : "ip.floating", "user_id" : null, "message_signature" : 
"256fc76afdf4f568ab5a073e6ad7e6d3d95282ae105b4f6b3bb7bec33c034b2c", "timestamp" : ISODate("2016-03-23T12:11:59.097Z"), "resource_id" : "fe585340-7f8a-49fc-
a0ac-d6d9b095a46b", "resource_metadata" : { "router_id" : "e36b3e99-24f0-4555-9602-cefa22f10abe", "status" : "ACTIVE", "floating_network_id" : "3bf8a06a-
fb52-40f2-8796-049d54e35116", "fixed_ip_address" : "120.0.0.132", "floating_ip_address" : "10.146.118.179", "port_id" : "3f03a4f7-799e-4417-9c5d-
cfb0959a9361" }, "source" : "openstack", "counter_unit" : "ip", "counter_volume" : 1, "recorded_at" : ISODate("2016-03-23T12:12:01.242Z"), "project_id" : 
"396f6c55aba34d8fade57c21ae00ed5d", "message_id" : "7174fe34-f0f0-11e5-9674-5254007e43f2", "counter_type" : "gauge" }

{ "_id" : ObjectId("56f287c8eaefd238d52c20ba"), "counter_name" : "ip.floating", "user_id" : null, "message_signature" : 
"2242f00185cf0cfbcd117d75a84a6f541695f7a9891a2754e08586bd0e7a06f8", "timestamp" : ISODate("2016-03-23T12:10:46.208Z"), "resource_id" : "fe585340-7f8a-49fc-
a0ac-d6d9b095a46b", "resource_metadata" : { "router_id" : "e36b3e99-24f0-4555-9602-cefa22f10abe", "status" : "ACTIVE", "floating_network_id" : "3bf8a06a-
fb52-40f2-8796-049d54e35116", "fixed_ip_address" : "120.0.0.132", "floating_ip_address" : "10.146.118.179", "port_id" : "3f03a4f7-799e-4417-9c5d-
cfb0959a9361" }, "source" : "openstack", "counter_unit" : "ip", "counter_volume" : 1, "recorded_at" : ISODate("2016-03-23T12:10:48.263Z"), "project_id" : 
"396f6c55aba34d8fade57c21ae00ed5d", "message_id" : "460304e4-f0f0-11e5-9626-5254001df498", "counter_type" : "gauge" }

Comment 2 Jeremy 2016-03-24 13:16:02 UTC
Created attachment 1139957 [details]
Patch diff

Comment 13 Yurii Prokulevych 2016-05-16 17:20:28 UTC
Verified with packages:
python-ceilometerclient-1.0.14-2.el7ost.noarch
python-ceilometer-2014.2.3-9.el7ost.noarch
openstack-ceilometer-compute-2014.2.3-9.el7ost.noarch
openstack-ceilometer-notification-2014.2.3-9.el7ost.noarch
openstack-ceilometer-central-2014.2.3-9.el7ost.noarch
openstack-ceilometer-api-2014.2.3-9.el7ost.noarch
openstack-ceilometer-alarm-2014.2.3-9.el7ost.noarch
openstack-ceilometer-common-2014.2.3-9.el7ost.noarch
openstack-ceilometer-collector-2014.2.3-9.el7ost.noarch

Comment 18 errata-xmlrpc 2016-05-25 12:18:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-1121.html