Namespace metadata proxy runs without logging in devstack by default

Bug #1183614 reported by Maru Newby
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
yong sheng gong

Bug Description

The L3 agent is responsible for spawning the metadata proxy (quantum-ns-metadata-proxy), and at present only supports configuration of file-based logging for the proxy. Even file-based logging will not be configured if log_dir is not set in the L3 agent config (see [1] and [2]). This is the default in devstack, and the result is that the metadata proxy doesn't log anywhere, making any errors with the proxy opaque to a developer.

Either a sane default should be provided to ensure that some kind of logging is always configured for the proxy, or the L3 agent (and the DHCP agent going forward) should error out when it realizes that it can't configure logging for the proxy.

[1] https://github.com/openstack/quantum/blob/master/quantum/agent/l3_agent.py#L263
[2] https://github.com/openstack/quantum/blob/master/quantum/agent/common/config.py#L40

Tags: quantum-core
Maru Newby (maru)
description: updated
Revision history for this message
Maru Newby (maru) wrote :

Maybe log at a warning level to syslog by default?

Revision history for this message
yong sheng gong (gongysh) wrote :

to make the subprocess metadata proxy leave a log, currently, we need to start the parent process with log_dir or log_file set. I think it is the production way(maybe we need syslog too). In devstack, it can use SCREEN_LOGDIR to catch the parent process's stdout log to a log file. Without setting the log_dir or log_file of l3 or dhcp agent process, the metadata proxy process can not do logging.

I think devstack is for concept-proof or sales demo or some easy stuff. So options are:
1. leave it alone. If devstacker wants to see the logs of metadata proxy, he/she must stop related screen process, and edit the generated quantum.conf, l3 or dhcp configure file to set log_dir or log_file of l3 agent or dhcp agent

2. we add a configuration item for metadata proxy, such as metadata_proxy_log_dir, and let devstack script to set it as the same SCREEN_LOGDIR. metadata proxy will do logging regardless of the log_dir or log_file of parent process.

3. let the metadata proxy do logging to stdout as parent processes are doing.
metadata proxy is started as daemon subprocess, so it seems impossible

4. let the metadata proxy do logging to syslog
first, if parent is using syslog, we can use syslog for metadata proxy too. but it does not fix the devstack problem. In devstack, parent process is doing logging to stdout.

Revision history for this message
yong sheng gong (gongysh) wrote :

I think, we can do metadata proxy log to syslog if log_dir or log_fle is not set.

Changed in quantum:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → yong sheng gong (gongysh)
milestone: none → havana-2
Revision history for this message
yong sheng gong (gongysh) wrote :

I think, we can do metadata proxy log to syslog if log_dir and log_fle is not set.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/30379

Changed in quantum:
status: Triaged → In Progress
tags: added: quantum-core
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/30379
Committed: http://github.com/openstack/quantum/commit/3ab6ad34ec0e498945f7031e86e45686b2df6ea5
Submitter: Jenkins
Branch: master

commit 3ab6ad34ec0e498945f7031e86e45686b2df6ea5
Author: gongysh <email address hidden>
Date: Fri May 24 09:49:33 2013 +0800

    metadata proxy will use syslog as default log

    Bug #1183614

    Change-Id: I39f07fc7d232148c50cf85fbc4ca6ca7cde8fdfa

Changed in quantum:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in quantum:
status: Fix Committed → Fix Released
milestone: havana-2 → havana-1
Revision history for this message
Maru Newby (maru) wrote :

Can this be considered for backport? Anybody using grizzly would benefit from at least having the issue documented, if not resolved via logging to syslog by default.

Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-1 → 2013.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.