Nailgun doesn't write a traceback in the logfile in case of 500 code

Bug #1543802 reported by Pavel Chechetin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Invalid
High
Fuel Sustaining
Mitaka
Won't Fix
Medium
Registry Administrators

Bug Description

There is no traceback in the logfile.
The absence of traceback complicates troubleshooting.

It turns out that fuel2 command with --debug option writes a traceback to the console output but there is no traceback in the logfile anyway.

Steps to reproduce:
  1. Put "raise Exception" somewhere in nailgun/extensions/cluster_upgrade/upgrade.py
  2. Restart nailgun
  3. Execute: octane upgrade-env 1

Actual behavior:
  1. There is no traceback in the logfile.

Expected behavior:
  1. There is a traceback in the logfile.

Ilya Kutukov (ikutukov)
Changed in fuel:
assignee: nobody → Fuel Python Team (fuel-python)
importance: Undecided → High
status: New → Confirmed
milestone: none → 9.0
tags: added: area-python
Dmitry Pyzhov (dpyzhov)
tags: added: team-upgrades
Dmitry Pyzhov (dpyzhov)
tags: removed: team-upgrades
Dmitry Pyzhov (dpyzhov)
tags: added: team-upgrades
Revision history for this message
Oleg S. Gelbukh (gelbuhos) wrote :

To get tracebacks in log files in Nailgun, you need to change /etc/nailgun/settings.yaml by changing DEVELOPMENT parameter to 'true' and restart Nailgun service. By default, Nailgun doesn't log traces.

Changed in fuel:
milestone: 9.0 → 10.0
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Fuel Octane (fuel-octane-team)
Revision history for this message
Oleg S. Gelbukh (gelbuhos) wrote :

I believe this should be changed to Invalid, since it's not a bug but more a misconfiguration.

description: updated
Changed in fuel:
assignee: Fuel Octane (fuel-octane-team) → Fuel Python (Deprecated) (fuel-python)
assignee: Fuel Python (Deprecated) (fuel-python) → Fuel Mixed (fuel-mixed-team)
summary: - [fuel-octane] Nailgun doesn't write a traceback in the logfile in case
- of 500 code
+ Nailgun doesn't write a traceback in the logfile in case of 500 code
Revision history for this message
Pavel Chechetin (paulche) wrote :

As Oleg Gelbukh said above the core issue is Nailgun doesn't write tracebacks to the logfile unless DEVELOPMENT parameter is set to 'true'.
It doesn't make any sense. I don't see any pros of this decision. But I can see many cons. It definitely complicates troubleshooting to say the least.

Also, it has nothing to do with octane (it's just has been found when octane was used).

Changed in fuel:
assignee: Fuel Mixed (fuel-mixed-team) → Alexander Saprykin (cutwater)
Revision history for this message
Alexander Saprykin (cutwater) wrote :

Need more information about cases when this issue appears.
I checked it on fuel 9.0 build 299.

# grep DEVELOPMENT /etc/nailgun/settings.yaml
DEVELOPMENT: false

I added raise Exception to OpenstackConfigExecuteHandler.

# fuel2 openstack-config execute -e 1
500 Server Error: Internal Server Error for url: http://10.20.0.2:8000/api/v1/openstack-config/execute/ ()

In /var/log/nailgun/app.log

2016-05-13 10:19:40.547 ERROR [7f4b13a14880] (base) Unexpected exception occured
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nailgun/api/v1/handlers/base.py", line 285, in content_json
    resp = func(cls, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/nailgun/api/v1/handlers/openstack_config.py", line 119, in PUT
    raise Exception
Exception

It looks like expected, exception is logged. Did I miss something?

Changed in fuel:
status: Confirmed → Incomplete
Changed in fuel:
assignee: Alexander Saprykin (cutwater) → Fuel Sustaining (fuel-sustaining-team)
Revision history for this message
Dmitry Klenov (dklenov) wrote :

No updates for more than a month. Closing.

Changed in fuel:
status: Incomplete → Invalid
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.