Red Hat Bugzilla – Bug 1023614
No logging to files
Last modified: 2016-04-26 18:38:33 EDT
Description of problem:
Glance does not log anything to configured logfiles
Version-Release number of selected component (if applicable):
("yum info" says it came from "opentack-havana" repo)
Steps to Reproduce:
1. yum install openstack-glance
2. grep log_file /etc/glance-*.conf
verify that log_file is commented and points /var/log/glance/FOO.log
3. Verify that /var/log/glance is owned by glance (should be ok)
4. . keystonerc
5. glance index (should succeed)
6. ls -l /var/log/glance/registry.log -- missing or empty
No logging at all
If I uncomment the log_file statement, log is written properly.
Therefore, I conclude that the default in the code is incorrect.
(In reply to Pete Zaitcev from comment #0)
> Steps to Reproduce:
> 1. yum install openstack-glance
> 2. grep log_file /etc/glance-*.conf
> verify that log_file is commented and points /var/log/glance/FOO.log
You meant not commented, right?
What's the value of verbose and debug ?
Could you please attach the config file to the bug?
(In reply to Flavio Percoco from comment #1)
> > verify that log_file is commented and points /var/log/glance/FOO.log
> You meant not commented, right?
No, I mean commented, as stated. If log_file is uncommented, then logging
works. Step 2 verifies that openstack-glance is installed as expected.
Created attachment 817635 [details]
From what I'm reading, if the 'log_file' directive is omitted or commented out, then log messages are sent to stdout. It sounds like what is described in the bug report is the intended behaviour. Am I not understanding this correctly?
One way or the other, the comment in the stock glance-foo.conf has to be
made to match the reality. If the default is stderr, then fix the comment
to reflect that fact.
I submitted a patch upstream, currently waiting on review: https://review.openstack.org/#/c/55312/.
If that gets accepted I'll go through the backport process.