Containers should output logs when running "docker logs"

Bug #1980603 reported by Vince Mulhollon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
New
Undecided
李学海

Bug Description

Standard recently installed recently upgraded Kolla-Ansible Yoga Ubuntu Source although I don't think this issue is environment dependent?

What happened:

The following containers DO NOT output log messages when running "docker logs" on the container.

neutron_server, horizon. This is probably not a complete list.

What I expected to happen:

The following containers DO output helpful log and error messages when running "docker logs" on the container.

nova_compute, monsasca_logs_persister. This is probably not a complete list.

You can reproduce the experience above by simply running "docker logs neutron_server" on a controller, and comparing its very short list of startup messages followed by no log messages at all, to the detailed log error messages seen when running "docker logs nova_compute" on a compute node, or running "docker logs monasca_logs_persister" which will output gigs of repeated restarting errors/crashes on a controller node due to other issues.

Another way to reproduce is to compare the output of "docker logs neutron_server" with running a "docker exec -i neutron_server /bin/bash" then cd /var/log/kolla/neutron and look at those beautiful log message files in that directory that are not output by "docker logs".

I'm just asking for consistency to make troubleshooting somewhat easier.

Obviously I could look at logs using centralized_logging, if centralized_logging worked, which it does not, LOL. And the log messages are accessible, at some extra effort, by logging into the container so troubleshooting IS possible its just harder than running a short simple "docker logs horizon".

It is somewhat misleading when troubleshooting if you're having a problem with neutron or horizon and a quick glance at "docker logs" shows no errors, but actually if you log into the container its full of error messages. This recently happened to me due to a VLAN network misconfiguration such that "docker logs nova_compute" outputs beautiful error messages about port binding failing and suggesting in the error message that I look at the neutron logs, and "docker logs neutron_server" is empty although if you log in and look at /var/log/kolla/neutron log files there WERE errors and I used them to fix the problem, although it would have been easier if "docker logs neutron_server" were not misleadingly empty.

If one were to set up portainer_agent on an OpenStack host, then Portainer does a truly excellent job of handling and displaying log messages for a container, and that would make Portainer a really useful tool when used to troubleshoot a nova_compute problem but currently is much less useful when troubleshooting a neutron_server problem, if you would like a concrete example of how this could be helpful.

I would suggest tagging this as a wishlist item as per above. I think its a really great idea to help when troubleshooting and there shouldn't be a downside. Its probably low hanging fruit, probably just a simple docker file option needs adjusting to make some containers picking up their logs, or all of their logs.

Anyway, thanks for your time, and have a nice day.

李学海 (lixuehai)
Changed in kolla-ansible:
assignee: nobody → 李学海 (lixuehai)
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.