Logging "None" in place of path in libvirt driver

Bug #1239747 reported by Paul Murray
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Paul Murray

Bug Description

The get_instance_disk_info method in the nova.virt.libvirt.driver logs a None value if a disk path is undefined. The log message is intended to show a path that does not represent a path, but in the case the path does not actually exist, it gives the following uninformative message:

2013-10-14 06:25:21.404 45722 DEBUG nova.virt.libvirt.driver [-] skipping None since it looks like volume get_instance_disk_info /usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py:4299

When the path is not defined it should log the instance it is looking at instead.

Paul Murray (pmurray)
Changed in nova:
assignee: nobody → Paul Murray (pmurray)
Revision history for this message
Paul Murray (pmurray) wrote :

The order of two tests for the path existing and the file type can be reversed so that we know the path exists before looking at its type and possibly logging it.

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/51663

Changed in nova:
status: New → In Progress
Mark McLoughlin (markmc)
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/51663
Committed: http://github.com/openstack/nova/commit/c31ae4987c5ae2015cc5379a4717490b75c62c9e
Submitter: Jenkins
Branch: master

commit c31ae4987c5ae2015cc5379a4717490b75c62c9e
Author: Paul Murray <email address hidden>
Date: Mon Oct 14 17:44:20 2013 +0100

    Improve logging messages in libvirt driver

    This is a trivial change to correct an uninformative log message.
    There are two checks in get_instance_disk_info that look at a disk.
    One checks for the type of a disk and logs its path if it is not a file.
    The other checks for the path and logs the instance name it belongs to
    if it does not exist. The first will log None if the path does not exist,
    so reverse the order of the checks.

    Closes-Bug: #1239747
    Change-Id: Ieb52ba0584ad789dc55f40e0172cf5ed41e86fbe

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.1
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.