Bug 1486536

Summary: RFE: Enhance SOSReport to collect ceph logs from containers
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Christina Meno <gmeno>
Component: DocumentationAssignee: Bara Ancincova <bancinco>
Status: CLOSED CURRENTRELEASE QA Contact: ceph-qe-bugs <ceph-qe-bugs>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.0CC: anharris, asriram, dang, gmeno, hchen, jim.curtis, kdreyer, pprakash, seb, shan
Target Milestone: rcKeywords: FutureFeature
Target Release: 3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
In order to find container logs, you can use sosreport. It'll automatically collect logs stored by journald. Journald contains the logs of all the running/dead containers. You can use the following command to achieve that: sosreport -v -k docker.all=on -k docker.logs=on
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-26 03:39:34 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: 1496210    

Description Christina Meno 2017-08-30 04:16:54 UTC
Description of problem:
debugging crashed ceph deamons in a container is manual and labor intensive



Expected results:
This includes supporting collection of logs from crashed OSD daemons, with SOSreport running on the host alone, not in every container.

Comment 2 seb 2017-08-30 20:15:31 UTC
Greg, are you really expecting this for 3.0?
I don't even know how SOSreport works, I need to look into it.

Comment 3 Christina Meno 2017-09-05 19:49:24 UTC
Yes please. IF we can't let's at least have a solid plan for what it'd take in 3.1

Comment 4 seb 2017-09-19 12:47:29 UTC
I just had a look in SOSReport, it has a builtin docker module that is being executed, so to gather logs we could simply let sosreport run by default (it will collect logs from journald, which is where container logs are stored). Or we can be more specific like this:

[root@osd0 tmp]# sosreport -v -k docker.all=on -k docker.logs=on

                                                                                                                                                                        
I've looked into the generated report and I could successfully find the container logs in var/log/messages and sos_commands/logs/journalctl_--no-pager_--boot, as expected.
Thus I don't think, there is anything to do in particular.
I'll update the doc field for that, but I don't see what else can be done.

Thanks.
Greg, does that work for you?

Comment 5 Christina Meno 2017-09-27 15:23:57 UTC
Thanks for checking on this Seb.!
I am satisfied

Comment 7 Sébastien Han 2017-10-09 11:38:13 UTC
LGTM, thanks Bara.