Messages from udp publisher can have invalid signature

Bug #1297731 reported by Ilya Tyaptin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Medium
Ilya Tyaptin

Bug Description

Messages from udp can have invalid message signature.

Log of message which send from udp publisher:
2014-03-26 12:55:28.110 15473 DEBUG ceilometer.publisher.udp [-] Publishing sample {'counter_name': u'instance:m1.medium', 'resource_id': u'b5dea434-e6d7-4126-9016-c5a1dde7e131', 'timestamp': '2014-03-26T08:55:28Z', 'counter_volume': 1, 'user_id': u'c052abd141ea4ea09be30d6953ee0272', 'message_signature': '1b05d28af0a7dbf54f6e4b0872d96a7b62b1884a95fb00ee102801b3bbfe2b5a', 'resource_metadata': {'ephemeral_gb': 0, 'display_name': u'ai', 'name': u'instance-00000016', 'disk_gb': 40, 'kernel_id': None, 'image': {u'id': u'c2cf308a-75d3-4a72-be4d-f20cc8c3194e', u'links': [{u'href': u'http://172.18.79.141:8774/ad2bb7e566be4ef196282ae5109f060e/images/c2cf308a-75d3-4a72-be4d-f20cc8c3194e', u'rel': u'bookmark'}], 'name': u'ubuntu-12.04'}, 'ramdisk_id': None, 'vcpus': 2, 'memory_mb': 4096, 'instance_type': u'3', 'host': u'300bb0f767dd72b17d0d33eccb2cba4a864dd2ab01d8fb89c2b8ce0e', 'root_gb': 40, 'image_ref': u'c2cf308a-75d3-4a72-be4d-f20cc8c3194e', 'flavor': {'name': u'm1.medium', u'links': [{u'href': u'http://172.18.79.141:8774/ad2bb7e566be4ef196282ae5109f060e/flavors/3', u'rel': u'bookmark'}], 'ram': 4096, 'ephemeral': 0, 'vcpus': 2, 'disk': 40, u'id': u'3'}, 'OS-EXT-AZ:availability_zone': u'nova', 'image_ref_url': u'http://172.18.79.141:8774/ad2bb7e566be4ef196282ae5109f060e/images/c2cf308a-75d3-4a72-be4d-f20cc8c3194e'}, 'source': 'openstack', 'counter_unit': 'instance', 'project_id': u'6e95f8ac361d43698b8afa78f576a10e', 'message_id': '60c04c02-b4c4-11e3-b2b2-0025906b9808', 'counter_type': 'gauge'} over UDP to localhost:4952 publish_samples /opt/stack/ceilometer/ceilometer/publisher/udp.py:62

Dispatcher's log of discarding received message
2014-03-26 12:55:28.666 14587 WARNING ceilometer.dispatcher.database [-] message signature invalid, discarding message: {'counter_name': 'instance:m1.medium', 'user_id': 'c052abd141ea4ea09be30d6953ee0272', 'message_signature': '1b05d28af0a7dbf54f6e4b0872d96a7b62b1884a95fb00ee102801b3bbfe2b5a', 'timestamp': '2014-03-26T08:55:28Z', 'resource_id': 'b5dea434-e6d7-4126-9016-c5a1dde7e131', 'message_id': '60c04c02-b4c4-11e3-b2b2-0025906b9808', 'source': 'openstack', 'counter_unit': 'instance', 'counter_volume': 1, 'project_id': '6e95f8ac361d43698b8afa78f576a10e', 'resource_metadata': {'ramdisk_id': None, 'display_name': 'ai', 'name': 'instance-00000016', 'disk_gb': 40, 'kernel_id': None, 'image': {'id': 'c2cf308a-75d3-4a72-be4d-f20cc8c3194e', 'links': ({'href': 'http://172.18.79.141:8774/ad2bb7e566be4ef196282ae5109f060e/images/c2cf308a-75d3-4a72-be4d-f20cc8c3194e', 'rel': 'bookmark'},), 'name': 'ubuntu-savanna-icehouse'}, 'ephemeral_gb': 0, 'host': '300bb0f767dd72b17d0d33eccb2cba4a864dd2ab01d8fb89c2b8ce0e', 'memory_mb': 4096, 'instance_type': '3', 'vcpus': 2, 'root_gb': 40, 'image_ref': 'c2cf308a-75d3-4a72-be4d-f20cc8c3194e', 'flavor': {'name': 'm1.medium', 'links': ({'href': 'http://172.18.79.141:8774/ad2bb7e566be4ef196282ae5109f060e/flavors/3', 'rel': 'bookmark'},), 'ram': 4096, 'ephemeral': 0, 'vcpus': 2, 'disk': 40, 'id': '3'}, 'OS-EXT-AZ:availability_zone': 'nova', 'image_ref_url': 'http://172.18.79.141:8774/ad2bb7e566be4ef196282ae5109f060e/images/c2cf308a-75d3-4a72-be4d-f20cc8c3194e'}, 'counter_type': 'gauge'}

Ilya Tyaptin (ityaptin)
Changed in ceilometer:
assignee: nobody → Ilya Tyaptin (ityaptin)
description: updated
summary: - Messages from udp publisher can has invalid signature
+ Messages from udp publisher can have invalid signature
Changed in ceilometer:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (master)

Fix proposed to branch: master
Review: https://review.openstack.org/83722

Changed in ceilometer:
status: New → In Progress
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/83722
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=031953992be18dbc52ee13fcd6633e6d197e6fda
Submitter: Jenkins
Branch: master

commit 031953992be18dbc52ee13fcd6633e6d197e6fda
Author: Ilya Tyaptin <email address hidden>
Date: Thu Mar 27 18:00:14 2014 +0400

    Add encoding argument to deserialising udp packets in collector

    Samples from udp publisher failed signature verifying when they
    contain utf8 strs. It happened because msgpack.loads
    unpacked data without utf8 by default and in compute signature
    this strs are processed as different.
    This is fixed by adding of encoding in unpacking packets from
    udp

    Fixes: bug #1297731

    Change-Id: I3a8072eb49a61364ff1a6bff1a14ad2c9925b88e

Changed in ceilometer:
status: In Progress → Fix Committed
Eoghan Glynn (eglynn)
Changed in ceilometer:
milestone: none → juno-1
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: juno-1 → 2014.2
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.