Allocation healer should ignore deleted instances

Bug #1776743 reported by Mathieu Gagné
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Matt Riedemann

Bug Description

When running this command:

  nova-manage placement heal_allocations

It fails with an InstanceNotFound exception when trying to heal deleted instances.

The healer should ignore deleted instances because there is nothing to heal for them.

Tags: nova-manage
Revision history for this message
Matt Riedemann (mriedem) wrote :

Traceback: https://gist.github.com/mgagne/7511aa1e95f624f872d988a34a1a55be

The problem is the InstanceList.get_by_filters query doesn't exclude deleted instances by default, and doesn't take into account the context.read_deleted value, so we have to explicitly pass a filters={'deleted': False} filter.

Changed in nova:
assignee: nobody → Matt Riedemann (mriedem)
status: New → Triaged
importance: Undecided → High
tags: added: nova-manage
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

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

Reviewed: https://review.openstack.org/575222
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c8d5a71da69512c272c6106e837a7f2ffac87032
Submitter: Zuul
Branch: master

commit c8d5a71da69512c272c6106e837a7f2ffac87032
Author: Matt Riedemann <email address hidden>
Date: Wed Jun 13 16:23:17 2018 -0400

    Don't heal allocations for deleted servers

    InstanceList.get_by_filters by default returns deleted
    servers, which we don't want to heal, so this adds the
    missing filter along with a functional test to show
    this working as expected.

    Change-Id: Ic18b3ea5c7db5a0535488498b4e330803e0635b5
    Closes-Bug: #1776743

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.0.0.0b3

This issue was fixed in the openstack/nova 18.0.0.0b3 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/723697

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/queens)

Change abandoned by Artom Lifshitz (<email address hidden>) on branch: stable/queens
Review: https://review.opendev.org/723697

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.