← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1657428] Re: Nova sends notifications with different timestamp formats

 

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 <balazs.gibizer@xxxxxxxxxxxx>
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 <tdurakov@xxxxxxxxxxxx>
    
    Change-Id: I946a92601e4268bb224fc35b2052bca7436531f4
    Closes-Bug: #1657428


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1657428

Title:
  Nova sends notifications with different timestamp formats

Status in OpenStack Compute (nova):
  Fix Released

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) .....

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1657428/+subscriptions


References