Bug 888077
Summary: | Glance logs should not include DEBUG by default | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Russell Bryant <rbryant> | ||||
Component: | openstack-glance | Assignee: | John Bresnahan <jbresnah> | ||||
Status: | CLOSED ERRATA | QA Contact: | Attila Fazekas <afazekas> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 2.1 | CC: | abaron, derekh, eglynn, jbresnah | ||||
Target Milestone: | snapshot5 | Keywords: | Triaged | ||||
Target Release: | 2.1 | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 979734 (view as bug list) | Environment: | |||||
Last Closed: | 2013-04-04 20:24:08 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 979734 | ||||||
Attachments: |
|
Description
Russell Bryant
2012-12-17 23:48:21 UTC
(In reply to comment #0) > Despite what the comment in the sample configuration says, > enabling the verbose option turns on DEBUG, not just INFO. Interesting, in glance/common/config.py if CONF.debug: root_logger.setLevel(logging.DEBUG) elif CONF.verbose: root_logger.setLevel(logging.INFO) else: root_logger.setLevel(logging.WARNING) but in glance/openstack/common/log.py if CONF.verbose or CONF.debug: log_root.setLevel(logging.DEBUG) else: log_root.setLevel(logging.INFO) Looks like a bug in openstack-common, inherited from Nova? https://github.com/openstack/oslo-incubator/commit/16916b61 Yes Alan, that makes sense. Though we may find more convenient to fix by overriding the default verbose setting to false in glance-{api|registry}.conf via some addition 'openstack-config --set' calls in: https://github.com/fedora-openstack/openstack-glance/blob/master/openstack-glance.spec (as opposed to changing the upstream behaviour that others may be depending on) Also note it isn't just the config file the services are being run with --debug --verbose glance 25639 1 0 08:30 ? 00:00:00 /usr/bin/python /usr/bin/glance-api --config-file /usr/share/glance/glance-api-dist.conf --config-file /etc/glance/glance-api.conf --debug --verbose glance 25662 1 0 08:30 ? 00:00:00 /usr/bin/python /usr/bin/glance-registry --config-file /usr/share/glance/glance-registry-dist.conf --config-file /etc/glance/glance-registry.conf --debug --verbose Created attachment 708668 [details]
Proposed patch for snap5
Comment on attachment 708668 [details]
Proposed patch for snap5
I'm just wondering if --verbose also needs to be removed from the command line ?
I tested it out and --verbose did not seem to cause DEBUG logging. Comment on attachment 708668 [details]
Proposed patch for snap5
If --verbose on the command line does not cause DEBUG logging, shouldn't it be removed from the command line?
Otherwise it may cause confusion in the output of ps -f.
I am not certain what the expected behavior is, but the bit of code in comment #2 suggests that --verbose should result in INFO level logging and --debug should result in DEBUG logging. From the --help output: --debug, -d Print debugging output (set logging level to DEBUG instead of default WARNING level). --verbose, -v Print more verbose output (set logging level to INFO instead of default WARNING level). Thus I think we have the correct behavior in this patch To test this bug: 1) Install the package 2) Note the time 3) run: service openstack-glance-registry restart service openstack-glance-api restart service openstack-glance-scrubber restart 4) verify that there are no DEBUG log messages after the previously noted time in the files: /var/log/glance/api.log /var/log/glance/registry.log /var/log/glance/scrubber.log Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-0707.html |