kolla-build - per container logs

Registered by Martin Matyáš

Current kolla build log output is mixed and not much usable when more parallel build threads are used.

Implement logging to particular channels/files:
- log to a separate file per container
- one specific file as general build/push progress logs ( + in parallel to stdout) + fatal errors from any container also to stderr

All log files would be stored in a newly created build-log directory. A config param would specify name of such directory; if not, a new time-stamped logging directory will be created in actual directory.

Blueprint information

Status:
Complete
Approver:
Steven Dake
Priority:
Medium
Drafter:
Martin Matyáš
Direction:
Approved
Assignee:
Martin Matyáš
Definition:
Approved
Series goal:
Accepted for ocata
Implementation:
Implemented
Milestone target:
milestone icon pike-2
Started by
Steven Dake
Completed by
Jeffrey Zhang

Related branches

Sprints

Whiteboard

I understand the use case - the current logging is all mixed up. logging to files seems acceptable, but need to take care to ensure that logging to a directory and files is not the default, but optional feature. --sdake

--------------------------
Current behavior as proposed in https://review.openstack.org/306207

standard output/terminal:
- if executed on ansi-compatible terminals -> display fancy progress information
- if executed on non-ansi terminals -> display status changes of particular images - build started, finished, push started, finished etc.
- in both cases print summary + details of errors after build is finished

Log files: logged information about docker image builds + things around it per image; beside that there is kolla.log with general kolla logs.

There is an option for not file-logging and printing everything on stdout as it's now.

sdake: my opinion is that this makes more sense than pushing everything on stdout by default, as typical kolla end-user-builder is interested in status progress info which one gets from that fancy ansi progress cookies. And then error details if some occur of course.

-- MarMat
-----------------------------------

Yes, I have implemented some of this blueprint but haven't pushed the code for review yet.

I think the "general" log must have as minimum information as possible, because, if the general log is big, the user will have a tough time co-relating it with the per-container logs and also finding out the sequence of events (thru the log messages in multiple files).

I also think that logging to files must be the default. If not, the current way prints all the logs on stdout, and the user must rebuild with logging enabled just to find out the issues/errors in the log files, and then, another build after resolving the errors. But, if logging to file is enabled by default, the user can find errors in log files and rebuild to resolve them.

When logging to file is enabled, output on stdout must be as minimum as possible.

--vhosakot

-----------------------------------
vhosakot, I think it would be good if you can try a kolla build using my gerrit patchset and see how it is behaving, I guess it's basically as you wrote above.

--MarMat

moving to newton-3 expected to be released on 2016-09-02. Please try to finish it before that otherwise it will be moved to Octata. - coolsvap

-----------------------------------

Gerrit topic: https://review.openstack.org/#q,topic:bug/1546718,n,z

Addressed by: https://review.openstack.org/306207
    Build logging per container and other logging improvements

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.