Public bug reported:

This is not really useful:

http://logs.openstack.org/17/123917/2/check/check-tempest-dsvm-
neutron/4bc2052/logs/screen-n-cpu.txt.gz?level=TRACE#_2014-09-25_17_35_11_635

2014-09-25 17:35:11.635 ERROR nova.virt.libvirt.driver 
[req-50afcbfb-203e-454d-a7eb-1549691caf77 TestNetworkBasicOps-985093118 
TestNetworkBasicOps-1055683132] [instance: 
960ee0b1-9c96-4d5b-b5f5-be76ae19a536] detaching network adapter failed.
2014-09-25 17:35:11.635 27689 ERROR oslo.messaging.rpc.dispatcher [-] Exception 
during message handling: <nova.objects.instance.Instance object at 0x422fe90>
2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher Traceback 
(most recent call last):
2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher   File 
"/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 
133, in _dispatch_and_reply
2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher     
incoming.message))
2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher   File 
"/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 
176, in _dispatch
2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher     return 
self._do_dispatch(endpoint, method, ctxt, args)
2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher   File 
"/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 
122, in _do_dispatch
2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher     result = 
getattr(endpoint, method)(ctxt, **new_args)
2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher   File 
"/opt/stack/new/nova/nova/compute/manager.py", line 393, in decorated_function
2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher     return 
function(self, context, *args, **kwargs)
2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher   File 
"/opt/stack/new/nova/nova/compute/manager.py", line 4411, in detach_interface
2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher     
self.driver.detach_interface(instance, condemned)
2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher   File 
"/opt/stack/new/nova/nova/virt/libvirt/driver.py", line 1448, in 
detach_interface
2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher     raise 
exception.InterfaceDetachFailed(instance)
2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher 
InterfaceDetachFailed: <nova.objects.instance.Instance object at 0x422fe90>
2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher 


The code is logging that there was an error, but not the error itself:

        try:
            self.vif_driver.unplug(instance, vif)
            flags = libvirt.VIR_DOMAIN_AFFECT_CONFIG
            state = LIBVIRT_POWER_STATE[virt_dom.info()[0]]
            if state == power_state.RUNNING or state == power_state.PAUSED:
                flags |= libvirt.VIR_DOMAIN_AFFECT_LIVE
            virt_dom.detachDeviceFlags(cfg.to_xml(), flags)
        except libvirt.libvirtError as ex:
            error_code = ex.get_error_code()
            if error_code == libvirt.VIR_ERR_NO_DOMAIN:
                LOG.warn(_LW("During detach_interface, "
                             "instance disappeared."),
                         instance=instance)
            else:
                LOG.error(_LE('detaching network adapter failed.'),
                         instance=instance)
                raise exception.InterfaceDetachFailed(
                        instance_uuid=instance['uuid'])

We should log the original libvirt error.

** Affects: nova
     Importance: Medium
     Assignee: Matt Riedemann (mriedem)
         Status: Triaged


** Tags: libvirt logging

** Tags added: libvirt

** Changed in: nova
       Status: New => Triaged

** Changed in: nova
     Assignee: (unassigned) => Matt Riedemann (mriedem)

** Changed in: nova
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1374140

Title:
  Need to log the orignial libvirtError when InterfaceDetachFailed

Status in OpenStack Compute (Nova):
  Triaged

Bug description:
  This is not really useful:

  http://logs.openstack.org/17/123917/2/check/check-tempest-dsvm-
  neutron/4bc2052/logs/screen-n-cpu.txt.gz?level=TRACE#_2014-09-25_17_35_11_635

  2014-09-25 17:35:11.635 ERROR nova.virt.libvirt.driver 
[req-50afcbfb-203e-454d-a7eb-1549691caf77 TestNetworkBasicOps-985093118 
TestNetworkBasicOps-1055683132] [instance: 
960ee0b1-9c96-4d5b-b5f5-be76ae19a536] detaching network adapter failed.
  2014-09-25 17:35:11.635 27689 ERROR oslo.messaging.rpc.dispatcher [-] 
Exception during message handling: <nova.objects.instance.Instance object at 
0x422fe90>
  2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher Traceback 
(most recent call last):
  2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher   File 
"/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 
133, in _dispatch_and_reply
  2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher     
incoming.message))
  2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher   File 
"/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 
176, in _dispatch
  2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher     return 
self._do_dispatch(endpoint, method, ctxt, args)
  2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher   File 
"/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 
122, in _do_dispatch
  2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher     result 
= getattr(endpoint, method)(ctxt, **new_args)
  2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher   File 
"/opt/stack/new/nova/nova/compute/manager.py", line 393, in decorated_function
  2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher     return 
function(self, context, *args, **kwargs)
  2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher   File 
"/opt/stack/new/nova/nova/compute/manager.py", line 4411, in detach_interface
  2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher     
self.driver.detach_interface(instance, condemned)
  2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher   File 
"/opt/stack/new/nova/nova/virt/libvirt/driver.py", line 1448, in 
detach_interface
  2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher     raise 
exception.InterfaceDetachFailed(instance)
  2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher 
InterfaceDetachFailed: <nova.objects.instance.Instance object at 0x422fe90>
  2014-09-25 17:35:11.635 27689 TRACE oslo.messaging.rpc.dispatcher 

  
  The code is logging that there was an error, but not the error itself:

          try:
              self.vif_driver.unplug(instance, vif)
              flags = libvirt.VIR_DOMAIN_AFFECT_CONFIG
              state = LIBVIRT_POWER_STATE[virt_dom.info()[0]]
              if state == power_state.RUNNING or state == power_state.PAUSED:
                  flags |= libvirt.VIR_DOMAIN_AFFECT_LIVE
              virt_dom.detachDeviceFlags(cfg.to_xml(), flags)
          except libvirt.libvirtError as ex:
              error_code = ex.get_error_code()
              if error_code == libvirt.VIR_ERR_NO_DOMAIN:
                  LOG.warn(_LW("During detach_interface, "
                               "instance disappeared."),
                           instance=instance)
              else:
                  LOG.error(_LE('detaching network adapter failed.'),
                           instance=instance)
                  raise exception.InterfaceDetachFailed(
                          instance_uuid=instance['uuid'])

  We should log the original libvirt error.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1374140/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to