mysqld_safe Can't log to error log and syslog at the same time

Bug #1091950 reported by bengtan on 2012-12-19
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mylvmbackup
Medium
Lenz Grimmer

Bug Description

Hi,

I get a non-fatal warning message when I run mylvmbackup with InnoDB recovery. Platform is Lucid Lynx, mysql 5.1.66, mylvmbackup 0.13. The message is:

mysqld_safe Can't log to error log and syslog at the same time. Remove all --log-error configuration options for --syslog to take effect.

After some investigation, I think the invocation of mysqld_safe by mylvmbackup should also include a --skip-syslog switch (approximately line 625).

Here are the results prior ...

Line 625:

  my $command="echo 'select 1;' | $mysqld_safe --socket=$TMP/mylvmbackup.sock --pid-file=$pidfile --log-error=$TMP/mylvmbackup_recoverserver.err --datadir=$mountdir/$relpath --skip-networking --skip-grant --bootstrap --skip-ndbcluster --skip-slave-start";

Output:

20121218 23:16:54 Info: Recovering InnoDB...
20121218 23:16:54 Info: Running: echo 'select 1;' | mysqld_safe --socket=/tmp/mylvmbackup.sock --pid-file=/var/run/mylvmbackup_recoverserver.pid --log-error=/tmp/mylvmbackup_recoverserver.err --datadir=/var/cache/mylvmbackup/mnt/backup/ --skip-networking --skip-grant --bootstrap --skip-ndbcluster --skip-slave-start
121218 23:16:54 mysqld_safe Can't log to error log and syslog at the same time. Remove all --log-error configuration options for --syslog to take effect.
121218 23:16:54 mysqld_safe Logging to '/tmp/mylvmbackup_recoverserver.err'.
121218 23:16:55 mysqld_safe Starting mysqld daemon with databases from /var/cache/mylvmbackup/mnt/backup/
121218 23:17:00 mysqld_safe mysqld from pid file /var/run/mylvmbackup_recoverserver.pid ended
20121218 23:17:00 Info: DONE: InnoDB recovery on snapshot

... and after I include the --skip-syslog switch ...

Line 625:

  my $command="echo 'select 1;' | $mysqld_safe --socket=$TMP/mylvmbackup.sock --pid-file=$pidfile --log-error=$TMP/mylvmbackup_recoverserver.err --datadir=$mountdir/$relpath --skip-networking --skip-grant --bootstrap --skip-ndbcluster --skip-slave-start --skip-syslog";

Output:

20121218 23:15:18 Info: Recovering InnoDB...
20121218 23:15:18 Info: Running: echo 'select 1;' | mysqld_safe --socket=/tmp/mylvmbackup.sock --pid-file=/var/run/mylvmbackup_recoverserver.pid --log-error=/tmp/mylvmbackup_recoverserver.err --datadir=/var/cache/mylvmbackup/mnt/backup/ --skip-networking --skip-grant --bootstrap --skip-ndbcluster --skip-slave-start --skip-syslog
121218 23:15:18 mysqld_safe Logging to '/tmp/mylvmbackup_recoverserver.err'.
121218 23:15:18 mysqld_safe Starting mysqld daemon with databases from /var/cache/mylvmbackup/mnt/backup/
121218 23:15:24 mysqld_safe mysqld from pid file /var/run/mylvmbackup_recoverserver.pid ended
20121218 23:15:24 Info: DONE: InnoDB recovery on snapshot

Any comments? Or perhaps you can think of a cleaner solution?

Thanks.

Lenz Grimmer (lenzgr) wrote :

Makes sense. Thanks for the report, I'll look into fixing this for the next release.

Changed in mylvmbackup:
milestone: none → 0.14
assignee: nobody → Lenz Grimmer (lenzgr)
importance: Undecided → Medium
status: New → Confirmed
Lenz Grimmer (lenzgr) wrote :

This is now fixed in the trunk and will be included in version 0.14. I added "--skip-syslog" to the options that are passed to the recovery instance. Additionally, I made these options configurable by moving them into a new configuration variable "recoveryopts", which now default to "--skip-networking --skip-grant --bootstrap --skip-syslog --skip-slave-start".

This also resolves BUG#544295, which is a similar issue.

Changed in mylvmbackup:
status: Confirmed → Fix Committed
Lenz Grimmer (lenzgr) on 2013-06-24
Changed in mylvmbackup:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers