incorrect log-error added to /etc/my.cnf

Bug #1590203 reported by monty solomon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.6
Invalid
Undecided
Unassigned
5.7
Triaged
High
Unassigned

Bug Description

When I install Percona-Server-server-57-5.7.12-5.1.el6.x86_64.rpm it adds an incorrect log-error entry to my /etc/my.cnf file:

# diff /etc/my.cnf /etc/my.cnf.save
20d19
< log-error=/var/log/mysqld.log

My /etc/my.cnf file already contains entries of the form "log_error"

log_error = /opt/mysql/dblogs1/monty-q0/gen/error.log

Tags: pkg regression
Revision history for this message
monty solomon (monty+launchpad) wrote :

When I install upstream version 5.7.12 or version 5.7.13 the installer does not modify my /etc/my.cnf file.

Revision history for this message
monty solomon (monty+launchpad) wrote :

Even when my /etc/my.cnf file does not contain any log_error or log-error entries the upstream installer does not modify the file.

Revision history for this message
monty solomon (monty+launchpad) wrote :

Status please?

Revision history for this message
monty solomon (monty+launchpad) wrote :

The bug status is still Undecided. Has this bug been triaged?

tags: added: pkg
Revision history for this message
monty solomon (monty+launchpad) wrote :

The bug status is still New/Undecided. Has this bug been triaged?

Changed in percona-server:
assignee: nobody → Muhammad Irfan (muhammad-irfan)
Revision history for this message
Muhammad Irfan (muhammad-irfan) wrote :

I tried to reproduce this but not able to identify any problem.

I had Percona Server 5.6.36 installed and removed those rpms and installed Percona Server 5.7.12 rpms and it used previous my.cnf without any issues. my.cnf look likes as below:

[client]
socket=/var/lib/mysql/mysql.sock

[mysqld]
user=mysql
socket=/var/lib/mysql/mysql.sock
datadir=/var/lib/mysql
log-error=/var/lib/mysql-logs/mysqld.err
pid-file=/var/run/mysqld/mysqld.pid

Can you please provide exact steps to reproduce this problem. Thanks.

Changed in percona-server:
status: New → Incomplete
Revision history for this message
monty solomon (monty+launchpad) wrote :

It happens with the current version.

It may be an issue with hyphen vs underscore.

I have the following entry using underscore in both the [mysqld] and [mysqld_safe] sections

log_error = /opt/mysql/dblogs1/monty-q1/gen/error.log

After the install the following entry was added to the [mysqld] section

log-error=/var/log/mysqld.log

Remove PS 5.7.18

rpm -e --nodeps `rpm -qa | grep Percona | grep 57`

Save the /etc/my.cnf file

cp -p /etc/my.cnf /etc/my.cnf.save

Install PS 5.7.18

yum install Percona-Server-devel-57-5.7.18-15.1.el6.x86_64 Percona-Server-client-57-5.7.18-15.1.el6.x86_64 Percona-Server-shared-57-5.7.18-15.1.el6.x86_64 Percona-Server-server-57-5.7.18-15.1.el6.x86_64

Compare the /etc/my.cnf file and the saved version

diff /etc/my.cnf /etc/my.cnf.save
20d19
< log-error=/var/log/mysqld.log

Revision history for this message
monty solomon (monty+launchpad) wrote :

That appears to be one of the issues. I renamed my log_error entry to log-error and PS did not install its own entry.

Why does PS install an error log entry when upstream does not?

"Even when my /etc/my.cnf file does not contain any log_error or log-error entries the upstream installer does not modify the file."

Changed in percona-server:
status: Incomplete → New
Revision history for this message
Muhammad Irfan (muhammad-irfan) wrote :

I'm able to reproduce this problem with Percona Server 5.7.18 with "underscore" but not when PID location pointed with "dash". That's how my.cnf look likes.

$ cp /etc/my.cnf /etc/my.cnf.save

$ cat /etc/my.cnf

[client]
socket=/var/lib/mysql/mysql.sock

[mysqld]
user=mysql
socket=/var/lib/mysql/mysql.sock
datadir=/var/lib/mysql
log_error=/var/lib/mysql-logs/mysqld.err
pid_file=/var/run/mysqld/mysqld.pid

performance_schema=ON
innodb_use_native_aio = 0

server-id = 2
log-bin = slave-bin
skip-name-resolve

[mysqld_safe]
log_error=/var/lib/mysql-logs/mysqld.err
pid_file=/var/run/mysqld/mysqld.pid

Installed Percona Server 5.7 via yum repository.

$ yum install Percona-Server-devel-57 Percona-Server-client-57 Percona-Server-shared-57 Percona-Server-server-57

$ /etc/init.d/mysql start
Starting mysqld: [ OK ]

$ ps -ef | grep mysql
root 21310 1 0 05:27 pts/0 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --basedir=/usr --user=mysql
mysql 21612 21310 6 05:27 pts/0 00:00:01 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql-logs/mysqld.err --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock

Now that's how my.cnf look likes, pid_file and log_error with default location /var/log/mysqld.log added and override custom location of log_error /var/lib/mysql-logs/mysqld.err

$ cat /etc/my.cnf

[client]
socket=/var/lib/mysql/mysql.sock

[mysqld]
pid-file=/var/run/mysqld/mysqld.pid
log-error=/var/log/mysqld.log
user=mysql
socket=/var/lib/mysql/mysql.sock
datadir=/var/lib/mysql
#log-error=/var/log/mysqld.log
log_error=/var/lib/mysql-logs/mysqld.err
pid_file=/var/run/mysqld/mysqld.pid

performance_schema=ON
innodb_use_native_aio = 0

server-id = 2
log-bin = slave-bin
skip-name-resolve

[mysqld_safe]
log_error=/var/lib/mysql-logs/mysqld.err
pid_file=/var/run/mysqld/mysqld.pid

However, I couldn't reproduce this problem with Percona Server 5.6 and neither with upstream Oracle MySQL 5.7

tags: added: regression
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-989

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.