we should not log unimplemented error in _get_host_metrics method

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

Bug Description

When nova used ironic driver, there was an exception which was always logged in nova compute log fie periodically. The update_available_resource method calls the _get_host_metrics method to cause this problem. In ironic driver , the get_host_cpu_stats method is not implemented. so we should not log the exception message to eliminate misunderstanding. The cycle logged message is as follows.

2017-03-20 14:14:43.669 10933 INFO nova.compute.resource_tracker [req-c4decc3b-f8b4-49c4-afba-40b6c70e86be - - - - -] Final resource view: name=20ba28a6-a00d-46e8-983e-c6ef4140cc21 phys_ram=0MB used_ram=0MB phys_disk=0GB used_disk=0GB total_vcpus=0 used_vcpus=0 pci_stats=[]
2017-03-20 14:14:43.670 10933 ERROR nova.compute.monitors.cpu.virt_driver [req-c4decc3b-f8b4-49c4-afba-40b6c70e86be - - - - -] Not all properties needed are implemented in the compute driver
2017-03-20 14:14:43.670 10933 ERROR nova.compute.monitors.cpu.virt_driver Traceback (most recent call last):
2017-03-20 14:14:43.670 10933 ERROR nova.compute.monitors.cpu.virt_driver File "/usr/lib/python2.7/site-packages/nova/compute/monitors/cpu/virt_driver.py", line 59, in _update_data
2017-03-20 14:14:43.670 10933 ERROR nova.compute.monitors.cpu.virt_driver stats = self.driver.get_host_cpu_stats()
2017-03-20 14:14:43.670 10933 ERROR nova.compute.monitors.cpu.virt_driver File "/usr/lib/python2.7/site-packages/nova/virt/driver.py", line 1224, in get_host_cpu_stats
2017-03-20 14:14:43.670 10933 ERROR nova.compute.monitors.cpu.virt_driver raise NotImplementedError()
2017-03-20 14:14:43.670 10933 ERROR nova.compute.monitors.cpu.virt_driver NotImplementedError
2017-03-20 14:14:43.670 10933 ERROR nova.compute.monitors.cpu.virt_driver

So, I want to ignore the unimplemented excepion in the '_update_data' method in virt_driver.py.

Tao Li (eric-litao)
affects: ltsp → nova
Changed in nova:
assignee: nobody → Tao Li (eric-litao)
Changed in nova:
status: New → In Progress
importance: Undecided → Low
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/465797

Jay Pipes (jaypipes)
tags: added: low-hanging-fruit
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/465797
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=3c95e12d0c1d4a5bb8486cb4b25b37ee216c3b8b
Submitter: Jenkins
Branch: master

commit 3c95e12d0c1d4a5bb8486cb4b25b37ee216c3b8b
Author: Tao Li <litao3721@126.com>
Date: Thu May 18 11:51:11 2017 +0800

    Change log level from ERROR to DEBUG for NotImplemented

    The exception message should not be logged in file when some
    methods are not implemented.

    Closes-Bug: #1674257

    Change-Id: If5759272cd295448ad4c33de2c611706edc8f62f

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

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