novncproxy logging is not configurable

Bug #1291949 reported by Ionuț Arțăriși
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Tiantian Gao

Bug Description

nova-novncproxy only seems able to log to stdout. The --log-file/logfile flags seem to have no effect, and looking at nova.cmd.novncproxy, it seems that no logging parameters are read.

Tags: console
Song Li (lisong-cruise)
Changed in nova:
assignee: nobody → Song Li (lisong-cruise)
Revision history for this message
Song Li (lisong-cruise) wrote :

Hi, --log-file/logfile?
I think there should be a space between the --log-file and '/logfile'.
Besides, does the logfile you specified exist?

Changed in nova:
status: New → In Progress
Revision history for this message
Ionuț Arțăriși (mapleoin) wrote :

What I meant by log-file/logfile is that both --log-file and --logfile are valid options, at least that's how they show up in the help:

  --log-file PATH, --logfile PATH
                        (Optional) Name of log file to output to. If no
                        default is set, logging will go to stdout.

Creating the file, with the correct permissions, makes no difference

Revision history for this message
Song Li (lisong-cruise) wrote :

Hi, I think the bug is invalid, and it works as design. I don't think the novncproxy will need the log.

When I run the novncproxy in console, it will only show:
devstack@ubuntu:~/devstack$ /usr/local/bin/nova-novncproxy --config-file /etc/nova/nova.conf --web /opt/stack/noVNC WebSocket server settings:
  - Listen on 0.0.0.0:6080
  - Flash security policy server
  - Web server. Web root: /opt/stack/noVNC
  - No SSL/TLS support (no cert file)
  - proxying from 0.0.0.0:6080 to ignore:ignore

Beside, I did not see anything implemented for logging in the component novncproxy.

Changed in nova:
status: In Progress → Invalid
status: Invalid → Opinion
Revision history for this message
Song Li (lisong-cruise) wrote :

I think we can take some discussion with whether the noVNC will need logging.

Song Li (lisong-cruise)
Changed in nova:
status: Opinion → In Progress
Revision history for this message
Ionuț Arțăriși (mapleoin) wrote :

Yes, nova-novncproxy does need logging. This kind of output belongs in a log file, not /dev/null:

WebSocket server settings:
  - Listen on 192.168.124.83:5554
  - Flash security policy server
  - Web server. Web root: /usr/share/novnc
  - SSL/TLS support
hooo 192.168.124.83 5554 1
  - proxying from 192.168.124.83:5554 to ignore:ignore

  1: 192.168.124.83: new handler Process
  1: 192.168.124.83: "GET /vnc_auto.html?token=544d7aae-708d-4f0a-b284-3e508eb0bce5&title=test4(80cea1d3-240e-4ed4-b7bf-07a8d57241c4) HTTP/1.1" 200 -
  2: 192.168.124.83: new handler Process
  2: 192.168.124.83: "GET /include/vnc.js HTTP/1.1" 200 -
  3: 192.168.124.83: new handler Process
  4: 192.168.124.83: new handler Process
  5: 192.168.124.83: new handler Process
  6: 192.168.124.83: new handler Process
  5: 192.168.124.83: "GET /include/webutil.js HTTP/1.1" 200 -
  3: 192.168.124.83: "GET /include/base64.js HTTP/1.1" 200 -
  4: 192.168.124.83: "GET /include/des.js HTTP/1.1" 200 -
  6: 192.168.124.83: "GET /include/rfb.js HTTP/1.1" 200 -
  7: 192.168.124.83: new handler Process
  7: 192.168.124.83: Plain non-SSL (ws://) WebSocket connection
  7: 192.168.124.83: Version hybi-13, base64: 'True'
  7: 192.168.124.83: Path: '/websockify'
  8: 192.168.124.83: new handler Process
  8: 192.168.124.83: "GET /favicon.ico HTTP/1.1" 404 -
/usr/lib64/python2.6/site-packages/amqp/channel.py:597: DeprecationWarning: auto_delete exchanges has been deprecated
  'auto_delete exchanges has been deprecated'))
  7: handler exception: Invalid Token
  7: Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/websockify/websocket.py", line 712, in top_new_client
    self.new_client()
  File "/usr/lib64/python2.6/site-packages/nova/console/websocketproxy.py", line 60, in new_client
    raise Exception(_("Invalid Token"))
Exception: Invalid Token

Song Li: I do not understand why this bug's status was changed to In Progress. Are you working on a fix?

Revision history for this message
Song Li (lisong-cruise) wrote :

No, I just want to discuss the issue with you and others to make sure that the logging is unnecessary for the component.
What's your idea?

Revision history for this message
Song Li (lisong-cruise) wrote :

What about setting the bug invalid?

Revision history for this message
Ionuț Arțăriși (mapleoin) wrote :

No, this bug is not invalid. As I've explained in the description, nova-novncproxy should log to a file when told to do so. That is the bug.

Changed in nova:
status: In Progress → New
assignee: Song Li (lisong-cruise) → nobody
Tracy Jones (tjones-i)
tags: added: console
Revision history for this message
Tiantian Gao (gtt116) wrote :
Changed in nova:
assignee: nobody → Tiantian Gao (gtt116)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit aa4b65301cf02bf42e870f7189782a80e3576d07
Author: gtt116 <email address hidden>
Date: Mon Jun 9 12:02:06 2014 +0800

    novncproxy: Setup log when start nova-novncproxy

    Because log system not setup, so log_dir, log_file config item not work.

    Change-Id: Iabe7a4ca41dc0de8c752f013f6afeed5fd80b4ea
    Closes-Bug: #1291949

Changed in nova:
status: New → Fix Committed
Changed in nova:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-2 → 2014.2
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.