[MCOL-1377] ColumnStore system logging not working after 1.1.4 ubuntu-16 install Created: 2018-05-02  Updated: 2023-10-26  Resolved: 2018-06-05

Status: Closed
Project: MariaDB ColumnStore
Component/s: ?
Affects Version/s: 1.1.4
Fix Version/s: 1.1.5, 1.2.0

Type: Bug Priority: Major
Reporter: David Hill (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Environment:

ubuntu 16 single server - fresh install of 1.1.4 debian packages


Sprint: 2018-10, 2018-11, 2018-12

 Description   

Now log files after 1.1.4 debian packages installed on ubuntu 16 single server system.

log
root@ip-172-31-27-208:/var/log/mariadb/columnstore# ll
total 20
drwxr-xr-x 5 root root 4096 May 2 09:48 ./
drwxr-xr-x 3 root root 4096 May 2 09:48 ../
drwxr-xr-x 2 root root 4096 May 2 09:48 archive/
drwxr-xr-x 2 root root 4096 May 2 09:48 corefiles/
drwxr-xr-x 2 root root 4096 May 2 09:49 trace/
root@ip-172-31-27-208:/var/log/mariadb/columnstore#
root@ip-172-31-27-208:/var/log/mariadb/columnstore#
root@ip-172-31-27-208:/var/log/mariadb/columnstore#
root@ip-172-31-27-208:/var/log/mariadb/columnstore# /usr/local/mariadb/columnstore/bin/syslogSetup.sh test
Usage: /usr/local/mariadb/columnstore/bin/syslogSetup.sh {install|uninstall|status|check)
root@ip-172-31-27-208:/var/log/mariadb/columnstore# /usr/local/mariadb/columnstore/bin/syslogSetup.sh status

System logging being used: rsyslog

/etc/rsyslog.d/49-columnstore.conf
root@ip-172-31-27-208:/var/log/mariadb/columnstore# /usr/local/mariadb/columnstore/bin/syslogSetup.sh check
MariaDB Columnstore System Logging not working
root@ip-172-31-27-208:/var/log/mariadb/columnstore# ll
total 20
drwxr-xr-x 5 root root 4096 May 2 09:48 ./
drwxr-xr-x 3 root root 4096 May 2 09:48 ../
drwxr-xr-x 2 root root 4096 May 2 09:48 archive/
drwxr-xr-x 2 root root 4096 May 2 09:48 corefiles/
drwxr-xr-x 2 root root 4096 May 2 09:49 trace/
root@ip-172-31-27-208:/var/log/mariadb/columnstore#



 Comments   
Comment by David Hill (Inactive) [ 2018-05-02 ]

info from user

root@ps-cs-pm1:/var/log/mariadb/columnstore# ll
total 32
drwxr-xr-x 5 root root 4096 Apr 30 13:29 ./
drwxr-xr-x 3 root root 4096 Mar 5 12:34 ../
rw-rr- 1 root root 0 Apr 30 13:29 activeAlarms
rw-rr- 1 root root 0 May 2 06:25 alarm.log
drwxr-xr-x 2 root root 4096 May 2 06:25 archive/
drwxr-xr-x 2 root root 4096 Mar 5 12:34 corefiles/
rw-rr- 1 root root 78 Apr 30 13:29 load_brm.log1
rw-rr- 1 root root 0 May 2 06:25 mcsadmin.log
rw-rr- 1 root root 191 Apr 30 13:29 reset_locks.log1
rw-rr- 1 root root 73 Apr 30 13:14 save_brm.log1
drwxr-xr-x 2 root root 4096 Mar 17 16:48 trace/
root@ps-cs-pm1:/var/log/mariadb/columnstore#

none of the info,warning,debug,critical logs are created.
It is the same Picture on all nodes.

root@ps-cs-pm1:/var/log/mariadb/columnstore# mcsadmin getlogconfig
getlogconfig Wed May 2 10:02:38 2018

MariaDB ColumnStore System Log Configuration Data

System Logging Configuration File being used: /etc/rsyslog.d/49-columnstore.conf

Module Configured Log Levels
------ ---------------------------------------
um1 Critical Error Warning Info Debug
um2 Critical Error Warning Info Debug
pm1 Critical Error Warning Info Debug
pm2 Critical Error Warning Info Debug
pm3 Critical Error Warning Info Debug
pm4 Critical Error Warning Info Debug
pm5 Critical Error Warning Info Debug
pm6 Critical Error Warning Info Debug
root@ps-cs-pm1:/var/log/mariadb/columnstore#

root@ps-cs-pm1:/var/log/mariadb/columnstore# cat /etc/rsyslog.d/49-columnstore.conf

  1. MariaDB Columnstore Database Platform Logging
    $FileGroup adm
    $FileOwner syslog
    local1.crit -/var/log/mariadb/columnstore/crit.log
    local1.err -/var/log/mariadb/columnstore/err.log
    local1.warning -/var/log/mariadb/columnstore/warning.log
    local1.info -/var/log/mariadb/columnstore/info.log
    local1.debug -/var/log/mariadb/columnstore/debug.log

root@ps-cs-pm1:/var/log/mariadb/columnstore#

Comment by David Hill (Inactive) [ 2018-05-02 ]

WORK-AROUND - issue is the configuration file is set to use syslog:adm permissions, but the directories weren't.

root@ip-172-31-27-208:/var/log# /usr/local/mariadb/columnstore/bin/syslogSetup.sh uninstall

System logging being used: rsyslog

root@ip-172-31-27-208:/var/log# chown syslog:adm -R mariadb
root@ip-172-31-27-208:/var/log# /usr/local/mariadb/columnstore/bin/syslogSetup.sh install

System logging being used: rsyslog

root@ip-172-31-27-208:/var/log# /usr/local/mariadb/columnstore/bin/syslogSetup.sh check
MariaDB Columnstore System Logging working
root@ip-172-31-27-208:/var/log# log
root@ip-172-31-27-208:/var/log/mariadb/columnstore# ll
total 28
drwxr-xr-x 5 syslog adm 4096 May 2 10:07 ./
drwxr-xr-x 3 syslog adm 4096 May 2 09:48 ../
drwxr-xr-x 2 syslog adm 4096 May 2 09:48 archive/
drwxr-xr-x 2 syslog adm 4096 May 2 09:48 corefiles/
rw-r---- 1 syslog adm 133 May 2 10:07 debug.log
rw-r---- 1 syslog adm 133 May 2 10:07 info.log
drwxr-xr-x 2 syslog adm 4096 May 2 09:49 trace/
root@ip-172-31-27-208:/var/log/mariadb/columnstore#

Comment by David Hill (Inactive) [ 2018-05-03 ]

added logic in syslogSetup.sh to determine the syslogging user/group and set the /var/log/mariadb directory permissions according.

TESTING:

I tested:
centos 7 root/non-root
ubuntu 16 root/non-root
Setting up buildbot to test all OSs

after a install is completed, check that the log files do exist.
then do a systemRestart and make sure the alarm logs exist in /var/log/mariadb/columnstore.
This makes sure that the new permissions arent affecting the alarm logs creations.

PULL REQUEST

https://github.com/mariadb-corporation/mariadb-columnstore-engine/pull/461

Comment by David Hill (Inactive) [ 2018-05-03 ]

https://github.com/mariadb-corporation/mariadb-columnstore-engine/pull/461

Comment by Daniel Lee (Inactive) [ 2018-06-05 ]

Build tested: 1.1.5-1 (06/04/2018 nightly buildbot build)

Verified syslog is working properly on single and multiple node installations.

Generated at Thu Feb 08 02:28:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.