Instance reservation update wrongly succeeds

Bug #1786007 reported by Masahito Muroi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Blazar
Fix Released
High
Masahito Muroi

Bug Description

Update lease API for instance reservation wrongly succeed even though there is no enough hosts to accommodate update request.

How to reproduce the error

1. create new lease1 with max memory_mb for the computehost

$ blazar lease-create --reservation resource_type=virtual:instance,vcpus=1,memory_mb=7983,disk_gb=10,amount=1,affinity=False --start-date '2020-01-01 10:00' --end-date '2020-01-01 11:00' lease-1

2. create new lease2 with same parameter with lease1

$ blazar lease-create --reservation resource_type=virtual:instance,vcpus=1,memory_mb=7983,disk_gb=10,amount=1,affinity=False --start-date '2020-01-01 12:00' --end-date '2020-01-01 13:00' lease-2

3. extend end_date of lease-1 to overwrap start_date of lease-2

$ blazar lease-update --end-date '2020-01-01 13:00' lease-1

Blazar server doesn't return any error and accept the update request. However, there is no allocation information about lease-1 in computehost_allocation table.

Changed in blazar:
importance: Undecided → High
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/589824

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

Reviewed: https://review.openstack.org/589824
Committed: https://git.openstack.org/cgit/openstack/blazar/commit/?id=1d8a6a089442ad80564f1437abad242d6af23b9f
Submitter: Zuul
Branch: master

commit 1d8a6a089442ad80564f1437abad242d6af23b9f
Author: Masahito Muroi <email address hidden>
Date: Wed Aug 8 18:58:48 2018 +0900

    Check number of replaced hosts in update_reservation

    InstancePlugin fails to check the number of replaced hosts in
    the update_reservation method. It wrongly succeeds to update
    the instance reservation via the Lease Update API.

    Change-Id: Ib8b436a4a3b40a0d3005d03dcd5af465dd10f088
    Closes-Bug: #1786007

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

Reviewed: https://review.openstack.org/590599
Committed: https://git.openstack.org/cgit/openstack/blazar/commit/?id=ad52c36474cb0c38d19bff3d6f8a8b3b306a4580
Submitter: Zuul
Branch: stable/queens

commit ad52c36474cb0c38d19bff3d6f8a8b3b306a4580
Author: Masahito Muroi <email address hidden>
Date: Wed Aug 8 18:58:48 2018 +0900

    Check number of replaced hosts in update_reservation

    InstancePlugin fails to check the number of replaced hosts in
    the update_reservation method. It wrongly succeeds to update
    the instance reservation via the Lease Update API.

    Change-Id: Ib8b436a4a3b40a0d3005d03dcd5af465dd10f088
    Closes-Bug: #1786007
    (cherry picked from commit 1d8a6a089442ad80564f1437abad242d6af23b9f)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/blazar queens-eol

This issue was fixed in the openstack/blazar queens-eol release.

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.