Bug 1597959

Summary: [RHOS13-GA] OpenDaylight Container log (karaf.log) has missing in Controller host
Product: Red Hat OpenStack Reporter: Pradipta Kumar Sahoo <psahoo>
Component: opendaylightAssignee: Janki <jchhatba>
Status: CLOSED DUPLICATE QA Contact: Noam Manos <nmanos>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 13.0 (Queens)CC: aadam, jchhatba, mkolesni, nyechiel, psahoo
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
N/A
Last Closed: 2018-07-04 10:14:30 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:

Description Pradipta Kumar Sahoo 2018-07-04 03:45:05 UTC
In RHOSP13 GA puddle, the karaf.log of OpenDaylight container has missed in controller host which seems a bug based OSP13 architecture.

Ideally, all the containers logs redirect to the following directory in the overcloud nodes /var/log/containers/.

>> Referring to folowing docker inspect log of "opendaylight_api", the following log bind has missing "/var/log/containers/opendaylight:/var/log/opendaylight".

        "HostConfig": {
            "Binds": [
                "/etc/localtime:/etc/localtime:ro",
                "/etc/pki/tls/certs/ca-bundle.crt:/etc/pki/tls/certs/ca-bundle.crt:ro",
                "/var/lib/kolla/config_files/opendaylight_api.json:/var/lib/kolla/config_files/config.json:ro",
                "/var/lib/opendaylight/journal:/opt/opendaylight/journal",
                "/dev/log:/dev/log",
                "/etc/ssh/ssh_known_hosts:/etc/ssh/ssh_known_hosts:ro",
                "/etc/pki/tls/certs/ca-bundle.trust.crt:/etc/pki/tls/certs/ca-bundle.trust.crt:ro",
                "/etc/puppet:/etc/puppet:ro",
                "/var/lib/config-data/puppet-generated/opendaylight/:/var/lib/kolla/config_files/src:ro",
                "/etc/hosts:/etc/hosts:ro",
                "/etc/pki/ca-trust/extracted:/etc/pki/ca-trust/extracted:ro",
                "/etc/pki/tls/cert.pem:/etc/pki/tls/cert.pem:ro",
                "/var/lib/opendaylight/snapshots:/opt/opendaylight/snapshots",
                "/var/lib/opendaylight/data:/opt/opendaylight/data"
            ],

>> Due to this Opendaylight log directory is not avaible in controller.

	@controller-1 ~]# ls /var/log/containers/
	cinder/   glance/   heat/     horizon/  httpd/    keystone/ mysql/    neutron/  nova/     rabbitmq/ redis/    swift/    


Can we bind the container log to host which can help to avoid the following workaround?
	
	# docker exec -it opendaylight_api vi /var/log/opendaylight/karaf.log

Comment 2 Janki 2018-07-04 07:41:17 UTC
This is already targeted for z2 and tracked at https://bugzilla.redhat.com/show_bug.cgi?id=1597665. To enable the log file mounting on controller host, OpenDaylightLogMechanism parameter needs to be changed to "file" from "console". Doc-text describes the process. Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1559055

Comment 4 Nir Yechiel 2018-07-04 10:14:30 UTC

*** This bug has been marked as a duplicate of bug 1597665 ***