Nova is leaking libvirt internal ids on some Instance Not Found errors

Bug #1522454 reported by Sean Dague
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Stephen Finucane

Bug Description

Nova from master in the gate.

libvirt is incorrectly using InstanceNotFound as an internal exception, but handing it libvirt internal ids instead of an openstack uuid or ec2id. This means it jumps up through the stack and back to the user, giving errors over http like Instance instance-000000a not found. This is both an information leak, and useless bit of information for the user to figure out what's going on.

libvirt should use an internal exception instead.

Revision history for this message
Matt Riedemann (mriedem) wrote :
Changed in nova:
status: New → Opinion
status: Opinion → Confirmed
importance: Undecided → Medium
tags: added: libvirt low-hanging-fruit
Sean Dague (sdague)
Changed in nova:
status: Confirmed → Triaged
Revision history for this message
Matt Riedemann (mriedem) wrote :
tags: added: liberty-backport-potential
Revision history for this message
Matt Riedemann (mriedem) wrote :

Actually it's been around, the code has been there since at least kilo, so it's just intermittent.

idzzy (idzzy)
Changed in nova:
assignee: nobody → idzzy (idzzy)
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/261417

Changed in nova:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Yusuke Ide (<email address hidden>) on branch: master
Review: https://review.openstack.org/261417

Matt Riedemann (mriedem)
Changed in nova:
status: In Progress → Confirmed
assignee: idzzy (idzzy) → nobody
Changed in nova:
assignee: nobody → Mohammed Ashraf (mohammed-asharaf)
Changed in nova:
status: Confirmed → In Progress
Changed in nova:
assignee: Mohammed Ashraf (mohammed-asharaf) → nobody
Changed in nova:
status: In Progress → Confirmed
Changed in nova:
assignee: nobody → Mohammed Ashraf (mohammed-asharaf)
Changed in nova:
assignee: Mohammed Ashraf (mohammed-asharaf) → nobody
Changed in nova:
assignee: nobody → Stephen Finucane (sfinucan)
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/290706

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Michael Still (<email address hidden>) on branch: master
Review: https://review.openstack.org/290706
Reason: This code hasn't been updated in a long time, and is in merge conflict. I am going to abandon this review, but feel free to restore it if you're still working on this.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/290706
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=0f26569649b5785e18581143f30cd5d44a77c1bf
Submitter: Jenkins
Branch: master

commit 0f26569649b5785e18581143f30cd5d44a77c1bf
Author: Stephen Finucane <email address hidden>
Date: Tue Dec 13 13:47:38 2016 +0000

    libvirt: Flatten 'get_domain' function

    Recent changes to the code mean the function 'get_domain' is the sole
    caller of '_get_domain_by_name'. This structure is unnecessarily bloated
    and prevents us from raising valid InstanceNotFound exceptions
    containing Instance.uuid values. Fold the latter functions into the
    former, shedding this excess weight and partially resolving the bug.

    Change-Id: I43d608a629b3dba204264f1db97fb35b205aee85
    Closes-Bug: #1522454

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

This issue was fixed in the openstack/nova 15.0.0.0b3 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.