If unexpected exceptions are seen while launching SVMs, not enough info is collected in the logs

Bug #1483389 reported by Vedamurthy Joshi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
New
Medium
Rudra Rugge
R2.20
Won't Fix
Medium
Rudra Rugge
Trunk
Won't Fix
Medium
Rudra Rugge

Bug Description

R2.20 Build 74 Ubuntu 14.04

In one of the manual tests, the compute and glance endpoints were configured incorrectly in keystone.
Service instances would not launch because of this.

But the logs in contrail-svc-monitor.log only said this :

08/10/2015 04:17:12 PM [nodec2:contrail-svc-monitor:Config:0]: __default__ [SYS_ERR]: SvcMonitorLog: nova error
08/10/2015 04:17:12 PM [nodec2:contrail-svc-monitor:Config:0]: __default__ [SYS_ERR]: SvcMonitorLog: Flavor not found default-domain:st1
08/10/2015 04:17:24 PM [nodec2:contrail-svc-monitor:Config:0]: __default__ [SYS_ERR]: SvcMonitorLog: nova error
08/10/2015 04:17:24 PM [nodec2:contrail-svc-monitor:Config:0]: __default__ [SYS_ERR]: SvcMonitorLog: Flavor not found default-domain:st1
08/10/2015 04:17:55 PM [nodec2:contrail-svc-monitor:Config:0]: __default__ [SYS_ERR]: SvcMonitorLog: nova error
08/10/2015 04:17:55 PM [nodec2:contrail-svc-monitor:Config:0]: __default__ [SYS_ERR]: SvcMonitorLog: Flavor not found default-domain:st1
08/10/2015 04:18:25 PM [nodec2:contrail-svc-monitor:Config:0]: __default__ [SYS_ERR]: SvcMonitorLog: nova error

In /usr/lib/python2.7/dist-packages/svc_monitor/nova_client.py:52, we are only logging the string of the exception e, but it can turn out to be empty. It would be better to log it using logger.exception() which would provide the backtrace..

        except Exception as e:
            self.logger.log_error("nova error %s" % str(e))
            return None

Below was the exception detail which was missing (was got only after manually adding a 'raise e' stmt

The above is a description of an error in a Python program. Here is
the original traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/svc_monitor/svc_monitor.py", line 689, in _create_service_instance
    self.vm_manager.create_service(st, si)
  File "/usr/lib/python2.7/dist-packages/svc_monitor/virtual_machine_manager.py", line 136, in create_service
    vm_uuid = self._create_service_vm(index, si, st)
  File "/usr/lib/python2.7/dist-packages/svc_monitor/virtual_machine_manager.py", line 35, in _create_service_vm
    name=si.flavor)
  File "/usr/lib/python2.7/dist-packages/svc_monitor/nova_client.py", line 59, in oper
    proj_name, False, **kwargs)
  File "/usr/lib/python2.7/dist-packages/svc_monitor/nova_client.py", line 53, in _novaclient_exec
    raise e
EndpointNotFound

Tags: config
Revision history for this message
Rudra Rugge (rrugge) wrote :

Marking this as won't fix as this has not been seen in the latest releases. Please reopen if you see the issue again.

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.