Heat: The <EVENT> parameter in "heat event-show" is not working

Bug #1523807 reported by hgangwx
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Thomas Herve

Bug Description

[Summary]
The <EVENT> parameter in "heat event-show" is not working

[Topo]
devstack all-in-one node

[Description and expect result]
The <EVENT> parameter in "heat event-show" is working, can show one event if event parameter is specified.

[Reproduceable or not]
reproduceable

[Recreate Steps]
1) create a heat stack "skystack":
root@45-59:/opt/stack/devstack# heat stack-create -f heat_template.yaml skystack
+--------------------------------------+------------+--------------------+---------------------+--------------+
| id | stack_name | stack_status | creation_time | updated_time |
+--------------------------------------+------------+--------------------+---------------------+--------------+
| 532a9e8b-d41d-48f0-b833-5248e0217755 | skystack | CREATE_IN_PROGRESS | 2015-12-08T16:14:33 | None |
+--------------------------------------+------------+--------------------+---------------------+--------------+
root@45-59:/opt/stack/devstack#

2)all events of the stack can be list:
root@45-59:/opt/stack/devstack# heat event-list skystack
+---------------------+--------------------------------------+-------------------------------------+--------------------+---------------------+
| resource_name | id | resource_status_reason | resource_status | event_time |
+---------------------+--------------------------------------+-------------------------------------+--------------------+---------------------+
| skystack | 3f2df8f2-5ace-4240-bcb9-ae8617c6f106 | Stack CREATE started | CREATE_IN_PROGRESS | 2015-12-08T16:14:34 |
| router1 | 4d280323-d8ab-4f68-914a-9f322db2b5e4 | state changed | CREATE_IN_PROGRESS | 2015-12-08T16:14:34 |
| private_net | be570107-2f83-43b8-9b33-1bbf36717a12 | state changed | CREATE_IN_PROGRESS | 2015-12-08T16:14:35 |
| ssh_secgroup | 73ebebac-25ac-4c6e-8926-3fd4a77fb7d4 | state changed | CREATE_IN_PROGRESS | 2015-12-08T16:14:35 |
| private_net | ae5b0a4b-573e-4123-8921-35cef613f536 | state changed | CREATE_COMPLETE | 2015-12-08T16:14:35 |
| router1 | 9c18b835-f0b5-40ab-9d3d-33424ce922ac | state changed | CREATE_COMPLETE | 2015-12-08T16:14:35 |
| ssh_secgroup | 95618a36-7f68-4179-986f-9f6018617e60 | state changed | CREATE_COMPLETE | 2015-12-08T16:14:36 |
| private_subnet | a23aced7-8fd2-4496-ac98-3e78b7c66d47 | state changed | CREATE_IN_PROGRESS | 2015-12-08T16:14:36 |
| private_subnet | 3d919da1-f73e-4249-861b-1acbbb9d1946 | state changed | CREATE_COMPLETE | 2015-12-08T16:14:37 |
| server1_port | 06fbea27-874e-44d4-8006-cfc450d316ef | state changed | CREATE_IN_PROGRESS | 2015-12-08T16:14:37 |
| router1_interface | ba235882-6502-48c1-8df7-5dacaa1d076f | state changed | CREATE_IN_PROGRESS | 2015-12-08T16:14:38 |
| router1_interface | e05f3ef2-c4e5-4378-9f01-da35f04af74f | state changed | CREATE_COMPLETE | 2015-12-08T16:14:40 |
| server1_port | aebe676a-ce0e-4928-952e-86645cac15a4 | state changed | CREATE_COMPLETE | 2015-12-08T16:14:40 |
| server1 | c9420898-0c3b-4de7-9098-ff5374b9e174 | state changed | CREATE_IN_PROGRESS | 2015-12-08T16:14:40 |
| server1_floating_ip | 88185dbc-3b05-45b0-9d25-87fd08d76727 | state changed | CREATE_IN_PROGRESS | 2015-12-08T16:14:42 |
| server1_floating_ip | 4b7c3ece-0ec3-459a-ac3c-857fd3b7bc81 | state changed | CREATE_COMPLETE | 2015-12-08T16:14:44 |
| server1 | e1500a53-c107-43ca-932b-8fc8ade1dd2e | state changed | CREATE_COMPLETE | 2015-12-08T16:14:50 |
| skystack | f4c10b87-9bde-461c-845d-8b7374de0100 | Stack CREATE completed successfully | CREATE_COMPLETE | 2015-12-08T16:14:50 |
+---------------------+--------------------------------------+-------------------------------------+--------------------+---------------------+
root@45-59:/opt/stack/devstack#

3)we can see, there is 2 events for resource "server1_floating_ip":
root@45-59:/opt/stack/devstack# heat event-list skystack | grep server1_floating_ip
| server1_floating_ip | 88185dbc-3b05-45b0-9d25-87fd08d76727 | state changed | CREATE_IN_PROGRESS | 2015-12-08T16:14:42 |
| server1_floating_ip | 4b7c3ece-0ec3-459a-ac3c-857fd3b7bc81 | state changed | CREATE_COMPLETE | 2015-12-08T16:14:44 |
root@45-59:/opt/stack/devstack#
root@45-59:/opt/stack/devstack#
root@45-59:/opt/stack/devstack#

4) try to show the first event by "heat event-show <NAME or ID> <RESOURCE> <EVENT>", and the event id of the first event is specified, but not work, we got the second event from the output info:
root@45-59:/opt/stack/devstack# heat event-show
usage: heat event-show <NAME or ID> <RESOURCE> <EVENT>
heat event-show: error: too few arguments
root@45-59:/opt/stack/devstack# heat event-show skystack server1_floating_ip 88185dbc-3b05-45b0-9d25-87fd08d76727
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property | Value |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| event_time | 2015-12-08T16:14:44 |
| id | 4b7c3ece-0ec3-459a-ac3c-857fd3b7bc81 >>>>ISSUE, we saw the second event <<<< |
| links | http://9.197.45.59:8004/v1/f75256da799642e0ab597a7533918714/stacks/skystack/532a9e8b-d41d-48f0-b833-5248e0217755/resources/server1_floating_ip/events/4b7c3ece-0ec3-459a-ac3c-857fd3b7bc81 (self) |
| | http://9.197.45.59:8004/v1/f75256da799642e0ab597a7533918714/stacks/skystack/532a9e8b-d41d-48f0-b833-5248e0217755/resources/server1_floating_ip (resource) |
| | http://9.197.45.59:8004/v1/f75256da799642e0ab597a7533918714/stacks/skystack/532a9e8b-d41d-48f0-b833-5248e0217755 (stack) |
| logical_resource_id | server1_floating_ip |
| physical_resource_id | ca20f575-a680-43f6-92ae-39cdbf13044a |
| resource_name | server1_floating_ip |
| resource_properties | { |
| | "floating_network": "c2592b59-f621-479c-8eaf-9b23f41c64d4", |
| | "floating_network_id": null, |
| | "fixed_ip_address": null, |
| | "floating_ip_address": null, |
| | "value_specs": {}, |
| | "port_id": "47218ead-0bcc-49d8-9028-479f1ff7f46b" |
| | } |
| resource_status | CREATE_COMPLETE |
| resource_status_reason | state changed |
| resource_type | OS::Neutron::FloatingIP |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
root@45-59:/opt/stack/devstack#

[Configration]
reproduceable bug, no need

[logs]
reproduceable bug, no need

[Root cause anlyze or debug inf]
reproduceable bug

[Attachment]
None

Revision history for this message
Thomas Herve (therve) wrote :

We introduced a regression in https://bugs.launchpad.net/heat/+bug/1502751. Needs to fix it in liberty too.

Changed in heat:
status: New → Incomplete
status: Incomplete → Confirmed
importance: Undecided → High
assignee: nobody → Thomas Herve (therve)
milestone: none → mitaka-2
Thomas Herve (therve)
tags: added: liberty-backport-potential
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/254625

Changed in heat:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

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

commit 56263647b0288160c6b015c3bf335c517e8ede08
Author: Thomas Herve <email address hidden>
Date: Tue Dec 8 10:20:11 2015 +0100

    Fix event filtering in event-show

    The event-show API was broken recently by not filtering with the given
    event ID. This fixes the issue.

    Change-Id: I0a37b27049986ad2ed8c19a18861f897c739e64d
    Closes-Bug: #1523807

Changed in heat:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/heat 6.0.0.0b2

This issue was fixed in the openstack/heat 6.0.0.0b2 development milestone.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

This issue was fixed in the openstack/heat 6.0.0.0b2 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.