event-list is in random order

Bug #1261883 reported by Clint Byrum
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Pablo Andres Fuente

Bug Description

With the change to uuid for event ID, we now have events showing in random order:

+---------------------+--------------------------------------+------------------------+--------------------+----------------------+
| resource_name | id | resource_status_reason | resource_status | event_time |
+---------------------+--------------------------------------+------------------------+--------------------+----------------------+
| notcompute | 0652853d-c0d8-42bf-b3cf-31ee944ef20b | state changed | CREATE_IN_PROGRESS | 2013-12-17T19:22:31Z |
| ComputeAccessPolicy | 192822c2-eb4c-4db0-8a72-1e340bb8abfc | state changed | CREATE_COMPLETE | 2013-12-17T19:22:25Z |
| NovaCompute0Config | 313f0f41-e88a-4cfb-b9d1-b3993d3a2bb6 | state changed | CREATE_COMPLETE | 2013-12-17T19:46:51Z |
| ComputeUser | 4100ad1e-546f-42c9-839a-413dbb70a935 | state changed | CREATE_IN_PROGRESS | 2013-12-17T19:22:26Z |
| ComputeUser | 4a6577b5-1f8d-4e77-a2bb-6355084bda10 | state changed | CREATE_COMPLETE | 2013-12-17T19:22:28Z |
| CompletionCondition | 72b32558-d9e4-44da-933c-ebbf169bf93a | state changed | CREATE_COMPLETE | 2013-12-17T19:56:51Z |
| NovaCompute0 | 72ee3111-a7ab-43d4-b967-ea7d62cb0062 | state changed | CREATE_COMPLETE | 2013-12-17T19:46:50Z |
| CompletionHandle | 78583a41-f126-4cbe-85c0-ebc21fbfb544 | state changed | CREATE_IN_PROGRESS | 2013-12-17T19:22:24Z |
| notcompute | 7e7fb340-dc80-437c-aa26-875856559c1a | state changed | CREATE_COMPLETE | 2013-12-17T19:38:10Z |
| AccessPolicy | 803cf176-2043-4c47-9ba2-f461f36f81a3 | state changed | CREATE_COMPLETE | 2013-12-17T19:22:25Z |
| Key | 84057606-bbc7-4478-a6f0-c7a9a491a872 | state changed | CREATE_COMPLETE | 2013-12-17T19:22:30Z |
| ComputeAccessPolicy | 9de06068-7c1f-4f0a-a116-a2255b85fcb2 | state changed | CREATE_IN_PROGRESS | 2013-12-17T19:22:24Z |
| User | a148cb68-926c-4ccb-a9b3-7ec6c292b26a | state changed | CREATE_IN_PROGRESS | 2013-12-17T19:22:27Z |
| CompletionCondition | b4e6b589-e525-4f01-854e-79f7c69e0d7c | state changed | CREATE_IN_PROGRESS | 2013-12-17T19:38:10Z |
| AccessPolicy | bc0db817-b6a6-4922-996a-675476534e49 | state changed | CREATE_IN_PROGRESS | 2013-12-17T19:22:24Z |
| Key | bd1f1df3-c051-4484-99e2-ea6ee59d6d34 | state changed | CREATE_IN_PROGRESS | 2013-12-17T19:22:29Z |
| NovaCompute0 | bfba3811-1ab0-40c9-8810-4c3c61f53869 | state changed | CREATE_IN_PROGRESS | 2013-12-17T19:22:32Z |
| ComputeKey | c7a15307-584e-45cb-b580-82e0f8a1b243 | state changed | CREATE_COMPLETE | 2013-12-17T19:22:30Z |
| User | d38e8212-89a5-4619-8354-cbe67feeb798 | state changed | CREATE_COMPLETE | 2013-12-17T19:22:28Z |
| ComputeKey | d7dcea41-7368-404f-9afc-83307ab6aa56 | state changed | CREATE_IN_PROGRESS | 2013-12-17T19:22:29Z |
| CompletionHandle | d90b8dd5-318c-4b5b-9b3b-a50480c200ba | state changed | CREATE_COMPLETE | 2013-12-17T19:22:25Z |
| NovaCompute0Config | e8507048-fd82-4faf-b2a5-eae01b546d1c | state changed | CREATE_IN_PROGRESS | 2013-12-17T19:46:51Z |
| notcomputeConfig | f391dfe3-abfa-439b-952f-6f564abcf48b | state changed | CREATE_IN_PROGRESS | 2013-12-17T19:38:11Z |
| notcomputeConfig | f3ef4ac4-78a7-42cf-a884-38d7ff46f9aa | state changed | CREATE_COMPLETE | 2013-12-17T19:38:11Z |
+---------------------+--------------------------------------+------------------------+--------------------+----------------------+

Revision history for this message
Chmouel Boudjnah (chmouel) wrote :

This can be fixed directly in the client, sorting by date, right?

Changed in heat:
assignee: nobody → Chmouel Boudjnah (chmouel)
Revision history for this message
Steve Baker (steve-stevebaker) wrote :

If the data only has second resolution then sub-second events will still be in the wrong order.

Revision history for this message
Chmouel Boudjnah (chmouel) wrote :

oh yeah make sense,

I am not totally familiar with heat codebase yet, is that something along those lines to get this fixed :

http://pastie.org/pastes/8559490/text?key=kyye29jqy9q06b0tzudhdw

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

I discussed with Chmouel and others in #heat on Freenode a bit. Basically I believe the right way to go is to add the auto-increment primary key ID back in, but never expose that ID to the user. Then just always order by this key in the list, which will produce events in the exact order the database received them.

Revision history for this message
Chmouel Boudjnah (chmouel) wrote :

I have spent some time this morning trying to look how the code works and I haven't figured out everything how to make this works, i am going to unassigned myself to let someone have a go to it since this is set as critical

Changed in heat:
assignee: Chmouel Boudjnah (chmouel) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
assignee: nobody → Chmouel Boudjnah (chmouel)
status: Triaged → In Progress
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Same bug, different symptom: https://launchpad.net/bugs/1272528

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Pablo, Chmouel is a bit stuck on how to write a migration to change the primary key of the table back to an auto-incrementing integer. I'm sure you could pick up his patch and push it the rest of the way through, and that will solve bug 1272528 as well.

Changed in heat:
assignee: Chmouel Boudjnah (chmouel) → Pablo Andres Fuente (pablo-a-fuente)
Steven Hardy (shardy)
Changed in heat:
milestone: none → icehouse-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/63839
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=ee5b3363dbde03bc5faf9d79d732abf66a26ec62
Submitter: Jenkins
Branch: master

commit ee5b3363dbde03bc5faf9d79d732abf66a26ec62
Author: Pablo Andres Fuente <email address hidden>
Date: Mon Jan 27 13:49:14 2014 -0300

    New Event uuid column and autoincremental id

    Re added the autoincremental id column for the Event table, and added a
    new column to store the event uuid. The uuid will be exposed to the user
    as the id of the event, but internally the event will be handled using
    the value of the id column.

    Change-Id: I43464c6079bf7631fda0c4ab112b8f874c6190a3
    Co-Authored-By: <email address hidden>
    Closes-Bug: #1261883

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: icehouse-3 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.