The before_end_lease event is always IN_PROGRESS even the lease has been expired

Bug #1316982 reported by Guangya Liu (Jay Lau)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Blazar
Fix Released
Medium
Pablo Andres Fuente

Bug Description

openstack server create --flavor 1 --image cirros-0.3.1-x86_64-uec --hint reserved=True --hint lease_params='{"name":"lease_test3", "start":"now", "end":"2014-05-07 08:30"}' vm3

After the lease expired, the before_end_lease event is always IN_PROGRESS

gyliu@devstack1:~$ climate lease-show lease_test3
Starting new HTTP connection (1): 9.111.244.68
Starting new HTTP connection (1): 9.111.244.68
Starting new HTTP connection (1): 9.111.244.68
Starting new HTTP connection (1): 9.111.244.68
+--------------+-------------------------------------------------------------+
| Field | Value |
+--------------+-------------------------------------------------------------+
| created_at | 2014-05-07 08:28:15 |
| end_date | 2014-05-07T08:30:00.000000 |
| events | { |
| | "status": "DONE", |
| | "lease_id": "fe8ffe76-3977-4b78-80f5-75ada393fbdc", |
| | "event_type": "end_lease", |
| | "created_at": "2014-05-07 08:28:15", |
| | "updated_at": "2014-05-07 08:31:08", |
| | "time": "2014-05-07T08:30:00.000000", |
| | "id": "2cb74fd5-8126-44af-98cd-ad60244705f7" |
| | } |
| | { |
| | "status": "IN_PROGRESS", | <<<<<<<<<<<<<<<<<<<< NOT right
| | "lease_id": "fe8ffe76-3977-4b78-80f5-75ada393fbdc", |
| | "event_type": "before_end_lease", |
| | "created_at": "2014-05-07 08:28:15", |
| | "updated_at": "2014-05-07 08:28:16", |
| | "time": "2014-05-07T08:28:00.000000", |
| | "id": "95eeda6f-92f0-459b-944b-9412839a7d94" |
| | } |
| | { |
| | "status": "DONE", |
| | "lease_id": "fe8ffe76-3977-4b78-80f5-75ada393fbdc", |
| | "event_type": "start_lease", |
| | "created_at": "2014-05-07 08:28:15", |
| | "updated_at": "2014-05-07 08:28:37", |
| | "time": "2014-05-07T08:28:00.000000", |
| | "id": "f4fd4425-90a2-44f5-b5cf-8a6eddaf8ce9" |
| | } |
| id | fe8ffe76-3977-4b78-80f5-75ada393fbdc |
| name | lease_test3 |
| project_id | cbf4cdc5564849b3861d76428a351900 |
| reservations | { |
| | "status": "deleted", |
| | "lease_id": "fe8ffe76-3977-4b78-80f5-75ada393fbdc", |
| | "resource_id": "9406c6ce-f6b3-47b6-ab18-dea4003b2b62", |
| | "created_at": "2014-05-07 08:28:16", |
| | "updated_at": "2014-05-07 08:31:08", |
| | "id": "acae53ef-1035-43ab-8336-47b992b6918b", |
| | "resource_type": "virtual:instance" |
| | } |
| start_date | 2014-05-07T08:28:00.000000 |
| trust_id | 90cfd5565f634054a84da369dfcbc065 |
| updated_at | |
| user_id | 2aada9e476d148448cad5dd2d1820528 |
+--------------+-------------------------------------------------------------+

Changed in climate:
assignee: nobody → Jay Lau (jay-lau-513)
Dina Belova (dbelova)
Changed in climate:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Pablo Andres Fuente (pablo-a-fuente) wrote :

Jay,
  Are you working on this? If the answer is no, I could fix it. Are you OK with this?

Revision history for this message
Pablo Andres Fuente (pablo-a-fuente) wrote :

Jay,
  I assume that you aren't working on this, so I'll take it.

Changed in blazar:
assignee: Jay Lau (jay-lau-513) → Pablo Andres Fuente (pablo-a-fuente)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to blazar (master)

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

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

Reviewed: https://review.openstack.org/100668
Committed: https://git.openstack.org/cgit/stackforge/blazar/commit/?id=acb155cbcc366e0fee467bd68ff2cebff4517e24
Submitter: Jenkins
Branch: master

commit acb155cbcc366e0fee467bd68ff2cebff4517e24
Author: Pablo Andres Fuente <email address hidden>
Date: Thu Jun 5 17:28:50 2014 -0300

    Set before_end_lease event as DONE

    Now Blazar sets the before_end_lease status as DONE, when the time of
    the event comes and is properly processed.

    Change-Id: I854269d15d4f5d8727187f10c6bc26d01c5ffb12
    Closes-bug: #1316982

Changed in blazar:
status: In Progress → Fix Committed
Changed in blazar:
milestone: none → 0.1.1
Changed in blazar:
status: Fix Committed → Fix Released
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.