Nova sends notifications with different timestamp formats

Bug #1657428 reported by Nadya Privalova
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Balazs Gibizer

Bug Description

Nova sends metadata about instances with different timestamp formats.
Example:

Notification is:

[{"meters":{"instance":{"type":"gauge","unit":"instance"}},"source":"openstack","metadata":{"launched_at":"20
17-01-16T09:00:15.000000","progress":"","host":"compute.node-2.domain.tld","bandwidth":{},"kernel_id":"","ramdisk_id":"","disk_gb":1,"memory_mb":512,"created_at":"2017-0
1-16 09:00:00+00:00","cell_name":"","state":"active","state_description":"","tenant_id":"c99e47b77866411a9819823ddfc98751","root_gb":1,"terminated_at":"","user_id":"2707
ffeac90949cbbd9fe809da63b60b","audit_period_beginning":"2017-01-17 07:00:00","image_ref_url":"http://10.21.2.9:9292/images/33350a42-3c6e-41b4-b449-8c180599f57b","deleted
_at":"","audit_period_ending":"2017-01-17 08:00:00"....

Different formats are detected in the following fields:

"launched_at":"2017-01-16T09:00:15.000000"
"created_at":"2017-01-16 09:00:00+00:00"
"audit_period_beginning":"2017-01-17 07:00:00"
"audit_period_ending":"2017-01-17 08:00:00"

Because of this inconsistency, we cannot insert this data in ElasticSearch without additional processing. The following error occurs:
IllegalArgumentException[Invalid format: "2017-01-16 09:00:00+00:00" is malformed at " 09:00:00+00:00"];
        at org.elasticsearch.index.mapper.FieldMapper.parse(FieldMapper.java:329)
        at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrField(DocumentParser.java:309)
        at org.elasticsearch.index.mapper.DocumentParser.parseValue(DocumentParser.java:436)
        at org.elasticsearch.index.mapper.DocumentParser.parseObject(DocumentParser.java:262)
        at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrField(DocumentParser.java:306)
        at org.elasticsearch.index.mapper.DocumentParser.parseObject(DocumentParser.java:326) .....

Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: nobody → Nadya Privalova (nprivalova)
status: Confirmed → In Progress
Changed in nova:
assignee: Nadya Privalova (nprivalova) → Timofey Durakov (tdurakov)
Matt Riedemann (mriedem)
tags: added: notifications
Changed in nova:
assignee: Timofey Durakov (tdurakov) → Balazs Gibizer (balazs-gibizer)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/421981
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=75a6f796b05e5cbb17792cdd596c5c7023e28eb4
Submitter: Jenkins
Branch: master

commit 75a6f796b05e5cbb17792cdd596c5c7023e28eb4
Author: Balazs Gibizer <email address hidden>
Date: Thu May 11 14:04:30 2017 +0200

    Make all timestamps formats equal

    Prior to this patch notifications for instance
    uses different format for datetime fields
    This patch aligns that formating

    Co-Authored-By: Timofey Durakov <email address hidden>

    Change-Id: I946a92601e4268bb224fc35b2052bca7436531f4
    Closes-Bug: #1657428

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 16.0.0.0b3

This issue was fixed in the openstack/nova 16.0.0.0b3 development milestone.

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.