Ask Your Question
0

Logs permission denied mariadb.log and dnsmasq.log

asked 2017-01-21 09:03:16 -0600

HallFonce gravatar image

I have an all-in-one kolla 3.0.1 installed on a CentOS 7.3. In my /var/log/messages, I can see the below traces in loop:

Jan 21 15:55:44 server journal: 2017/01/21 15:55:44 Input 'openstack_logstreamer_input' error: open /var/log/kolla/neutron/dnsmasq.log: permission denied#015
Jan 21 15:55:44 server journal: 2017/01/21 15:55:44 Input 'mariadb_logstreamer_input' error: open /var/log/kolla/mariadb/mariadb.log: permission denied#015
Jan 21 15:55:44 server journal: 2017/01/21 15:55:44 Input 'openstack_logstreamer_input' error: open /var/log/kolla/neutron/dnsmasq.log: permission denied#015
Jan 21 15:55:45 server journal: 2017/01/21 15:55:45 Input 'mariadb_logstreamer_input' error: open /var/log/kolla/mariadb/mariadb.log: permission denied#015

I don't get it, because looking into the container (6168a52738f6 is kolla mariadb container) , these files seems to be well appended:

[root@server kolla]# docker exec -it 6168a52738f6 /bin/bash
(mariadb)[mysql@server /]$ ll /var/log/kolla/mariadb/mariadb.log
-rw-rw----. 1 mysql mysql 76168 Jan 21 12:02 /var/log/kolla/mariadb/mariadb.log
(mariadb)[mysql@server /]$ ll /var/log/kolla/neutron/dnsmasq.log
-rw-r-----. 1 nobody 995 364152 Jan 21 12:05 /var/log/kolla/neutron/dnsmasq.log

Am I missing something?

edit retag flag offensive close merge delete

Comments

The issue is: /var/log/kolla/ is created with permissions for kolla group by default but MariaDB creates log files with umask 0660. Heka is not allowed to read there even in the same group. Is a know issue and will be fixed in the next release with the replacement from heka to fluentd. Regards

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2017-01-23 03:25:24 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2017-01-22 13:35:50 -0600

maniram477 gravatar image

I think the problem is with the heka container which is used for log processing. heka container's user might not have proper access permission for /var/log/kolla/mariadb/mariadb.log and /var/log/kolla/neutron/dnsmasq.log.

edit flag offensive delete link more

Comments

Thanks for the insight, I was then able to fix it by doing docker exec -it --user root <container_id> /bin/bash, then chown nobody.kolla /var/log/kolla/neutron/dnsmasq.log;chown mysql.kolla /var/log/kolla/mariadb/mariadb.log

HallFonce gravatar imageHallFonce ( 2017-01-26 18:55:47 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2017-01-21 09:03:16 -0600

Seen: 287 times

Last updated: Jan 22 '17