PDA

View Full Version : How to report bugs?



pelacables
November 6th, 2013, 03:58 AM
Hello,

most of the websites of http://wiki.zmanda.com/index.php/MySQL_Backup_and_Recovery do not work (bugzilla, mailling list...)
I'm trying zrm 3 and found an issue that I'd like to report but I can't.

who may I report it?

Cheers,
Arnau

paddy
November 6th, 2013, 05:52 PM
Can you report the issue here?

Thanks
Paddy

pelacables
November 7th, 2013, 12:38 AM
Sure,



# mysql --version
mysql Ver 14.14 Distrib 5.1.69, for redhat-linux-gnu (x86_64) using readline 5.1


1) mysqldump reports warning about event table:



Command used for logical backup is mysqldump --opt --extended-insert --create-options --default-character-set=utf8 --single-transactionbash -c 'mysqldump --opt --extended-insert --create-options --default-character-set=utf8 --single-transaction --all-databases > "/var/amanda/zamanda/XXXXXX/20131107092901/backup.sql" 2>>/var/backup_dir/JWol25PJZ_;echo ${PIPESTATUS[@]} > /var/backup_dir/F_8lt_lQtH 2>>/var/backup_dir/JWol25PJZ_'

# cat /var/backup_dir/JWol25PJZ_
-- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.


so any MySQL backup is marked as error becasue the dump generates some content that is saved in error file:



mysqlsrv04a.XXXX:backup:INFO: Command exit status is : 0
mysqlsrv04a.XXXX:backup:ERROR: Output of command: 'command is : bash -c 'mysqldump --opt --extended-insert --create-options --default-character-set=utf8 --single-transaction --all-databases > "/var/amanda/zamanda/mysqlsrv04a.XXXX/20131107092901/backup.sql" 2>>/var/backup_dir/JWol25PJZ_;echo ${PIPESTATUS[@]} > /var/backup_dir/F_8lt_lQtH 2>>/var/backup_dir/JWol25PJZ_'' is {
-- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.
}
mysqlsrv04a.XXXX:backup:ERROR: Output of command: 'pipe exit status' is {
0
}
mysqlsrv04a.XXXX:backup:ERROR: mysqldump did not succeed.
mysqlsrv04a.XXXX:backup:INFO: PHASE START: Cleanup
mysqlsrv04a.XXXX:backup:INFO: backup-status=Backup failed
mysqlsrv04a.XXXX:backup:INFO: Backup failed
mysqlsrv04a.XXXX:backup:INFO: mailing file /var/backup_dir/WqTmhgEn_v
mysqlsrv04a.XXXX:backup:INFO: mail command is cat "/var/backup_dir/WqTmhgEn_v"|mail -s "[ZRM for MySQL Report] ERROR during backup of backup-set mysqlsrv04a.XXXX" [email protected]
mysqlsrv04a.XXXX:backup:INFO: PHASE END: Cleanup
mysqlsrv04a.XXXX:backup:INFO: END OF BACKUP


and seems that it's a bug because skip-events is not working:

http://bugs.mysql.com/bug.php?id=68376

the code is at line 1852 of /usr/bin/mysql-zrm-backup



if(( $r > 0 ) || (-s $CMDERR)) {


CMDERR content should be checked(?)

I've added "--events" to $MYSQLDUMP5:


my $MYSQLDUMP5="mysqldump --opt --events --extended-insert --create-options";


but I don't know if this is the best solution because (IMHO) those MySQL Warnings should be ingnored (same happens https://forums.zmanda.com/showthread.php?5006-ZRM-Failing-to-backup


I'm currently testing it, so I'll be rpeorting any other issue.

Cheers!
Arnau

orion
April 23rd, 2014, 03:02 PM
This is my suggestion, unless there are error conditions for which mysqldump does not return 0. We probably always want to see the output from mysqldump (and we did before). We should also not return and not fall trhough to unlinking the output files. And "verbose empty" output and 0 exit status is probably not useful. Perhaps would want to post the output at WARNING level.



if( $r > 0 ) {
&printLog("Command exit status is : $r \n" );
&printCommandOutputToLog( "ERROR", "command is : $command", $CMDERR );
&printCommandOutputToLog( "ERROR", "pipe exit status", $pipestatus );
&printAndDie("mysqldump did not succeed.\n");
}elsif ( -s $CMDERR ) {
&printCommandOutputToLog( "INFO", "mysqldump output for command : $command", $CMDERR );
}
unlink($CMDERR);
unlink($pipestatus);




diff -up MySQL-zrm-3.0/usr/bin/mysql-zrm-backup.output MySQL-zrm-3.0/usr/bin/mysql-zrm-backup
--- MySQL-zrm-3.0/usr/bin/mysql-zrm-backup.output 2014-04-03 17:02:13.648882414 -0600
+++ MySQL-zrm-3.0/usr/bin/mysql-zrm-backup 2014-04-23 15:54:57.878992944 -0600
@@ -1833,51 +1833,18 @@ sub doMySqlDump()
if( $abort_flag ){
&abortAndDie( );
}
- if(( $r > 0 ) || (-s $CMDERR)) {
+ if( $r > 0 ) {
&printLog("Command exit status is : $r \n" );
- if( $r eq 0 && -s $CMDERR){
- if(&checkCmdWarning($CMDERR)){
- &printCommandOutputToLog( "INFO", "mysqldump output for command : $command", $CMDERR );
- return;
- }
- }
&printCommandOutputToLog( "ERROR", "command is : $command", $CMDERR );
&printCommandOutputToLog( "ERROR", "pipe exit status", $pipestatus );
&printAndDie("mysqldump did not succeed.\n");
- }else {
- if( $verbose ) {
- &printCommandOutputToLog( "INFO", "mysqldump output for command : $command", $CMDERR );
- &printCommandOutputToLog( "INFO", "mysqldump output for command : $command", $pipestatus );
- }
+ }elsif ( -s $CMDERR ) {
+ &printCommandOutputToLog( "INFO", "mysqldump output for command : $command", $CMDERR );
}
unlink($CMDERR);
unlink($pipestatus);
}

-sub checkCmdWarning()
-{
- my $CMDERR = $_[0];
- if(-s $CMDERR) {
- unless(open(CMD_ERR, $CMDERR)) {
- &printLog( "Could not open $CMDERR for reading ,$!\n" );
- return(0);
- }
- my $found = 0;
- while (<CMD_ERR>) {
- my $err_output = $_;
- chomp($err_output);
- if($err_output =~ /Using a password on the command line interface can be insecure/i) {
- $found = 1;
- last;
- }
- }
- if($found){
- return 1;
- }
- }
- return 0;
-}
-
sub checkAndBackupReplicationData()
{
if( !$inputs{replication} || $inputs{replication} eq "0" ) {

merkutio
May 5th, 2014, 07:14 AM
We have exactly the same problem...



What's the final solution here ? applying patch ?

I've tried to specify mysql as exclude pattern. Verbose text say's that the "mysql" database will be excluded but its not obviously...


When i specify database method it works but we can't afford to change the configuration file each time we create a new database...

Is there an official .patch file that we can apply ? does the problem exists in older release ?

Thanks for your help.


This is my suggestion, unless there are error conditions for which mysqldump does not return 0. We probably always want to see the output from mysqldump (and we did before). We should also not return and not fall trhough to unlinking the output files. And "verbose empty" output and 0 exit status is probably not useful. Perhaps would want to post the output at WARNING level.



if( $r > 0 ) {
&printLog("Command exit status is : $r \n" );
&printCommandOutputToLog( "ERROR", "command is : $command", $CMDERR );
&printCommandOutputToLog( "ERROR", "pipe exit status", $pipestatus );
&printAndDie("mysqldump did not succeed.\n");
}elsif ( -s $CMDERR ) {
&printCommandOutputToLog( "INFO", "mysqldump output for command : $command", $CMDERR );
}
unlink($CMDERR);
unlink($pipestatus);




diff -up MySQL-zrm-3.0/usr/bin/mysql-zrm-backup.output MySQL-zrm-3.0/usr/bin/mysql-zrm-backup
--- MySQL-zrm-3.0/usr/bin/mysql-zrm-backup.output 2014-04-03 17:02:13.648882414 -0600
+++ MySQL-zrm-3.0/usr/bin/mysql-zrm-backup 2014-04-23 15:54:57.878992944 -0600
@@ -1833,51 +1833,18 @@ sub doMySqlDump()
if( $abort_flag ){
&abortAndDie( );
}
- if(( $r > 0 ) || (-s $CMDERR)) {
+ if( $r > 0 ) {
&printLog("Command exit status is : $r \n" );
- if( $r eq 0 && -s $CMDERR){
- if(&checkCmdWarning($CMDERR)){
- &printCommandOutputToLog( "INFO", "mysqldump output for command : $command", $CMDERR );
- return;
- }
- }
&printCommandOutputToLog( "ERROR", "command is : $command", $CMDERR );
&printCommandOutputToLog( "ERROR", "pipe exit status", $pipestatus );
&printAndDie("mysqldump did not succeed.\n");
- }else {
- if( $verbose ) {
- &printCommandOutputToLog( "INFO", "mysqldump output for command : $command", $CMDERR );
- &printCommandOutputToLog( "INFO", "mysqldump output for command : $command", $pipestatus );
- }
+ }elsif ( -s $CMDERR ) {
+ &printCommandOutputToLog( "INFO", "mysqldump output for command : $command", $CMDERR );
}
unlink($CMDERR);
unlink($pipestatus);
}

-sub checkCmdWarning()
-{
- my $CMDERR = $_[0];
- if(-s $CMDERR) {
- unless(open(CMD_ERR, $CMDERR)) {
- &printLog( "Could not open $CMDERR for reading ,$!\n" );
- return(0);
- }
- my $found = 0;
- while (<CMD_ERR>) {
- my $err_output = $_;
- chomp($err_output);
- if($err_output =~ /Using a password on the command line interface can be insecure/i) {
- $found = 1;
- last;
- }
- }
- if($found){
- return 1;
- }
- }
- return 0;
-}
-
sub checkAndBackupReplicationData()
{
if( !$inputs{replication} || $inputs{replication} eq "0" ) {

port12345
May 9th, 2014, 05:21 AM
We've genuinely tried out to help you select mysql since banish style. Verbose text message say's the way the "mysql" repository is going to be ruled out on the other hand their particular certainly not certainly...


Though i select repository strategy them works on the other hand we are not able to be capable of change your current setup information file each time we make a brand new repository...

orion
July 25th, 2014, 09:54 AM
Updated patch:



diff -up MySQL-zrm-3.0/usr/bin/mysql-zrm-backup.mysqldump-warnings MySQL-zrm-3.0/usr/bin/mysql-zrm-backup
--- MySQL-zrm-3.0/usr/bin/mysql-zrm-backup.mysqldump-warnings 2014-07-25 10:41:36.938823874 -0600
+++ MySQL-zrm-3.0/usr/bin/mysql-zrm-backup 2014-07-25 10:45:45.897755336 -0600
@@ -1833,51 +1833,18 @@ sub doMySqlDump()
if( $abort_flag ){
&abortAndDie( );
}
- if(( $r > 0 ) || (-s $CMDERR)) {
+ if( $r > 0 ) {
&printLog("Command exit status is : $r \n" );
- if( $r eq 0 && -s $CMDERR){
- if(&checkCmdWarning($CMDERR)){
- &printCommandOutputToLog( "INFO", "mysqldump output for command : $command", $CMDERR );
- return;
- }
- }
&printCommandOutputToLog( "ERROR", "command is : $command", $CMDERR );
&printCommandOutputToLog( "ERROR", "pipe exit status", $pipestatus );
&printAndDie("mysqldump did not succeed.\n");
- }else {
- if( $verbose ) {
- &printCommandOutputToLog( "INFO", "mysqldump output for command : $command", $CMDERR );
- &printCommandOutputToLog( "INFO", "mysqldump output for command : $command", $pipestatus );
- }
+ }elsif ( -s $CMDERR ) {
+ &printCommandOutputToLog( ($CMDERR =~ /warning/i) ? "INFO" : "WARNING", "mysqldump output for command : $command", $CMDERR );
}
unlink($CMDERR);
unlink($pipestatus);
}

-sub checkCmdWarning()
-{
- my $CMDERR = $_[0];
- if(-s $CMDERR) {
- unless(open(CMD_ERR, $CMDERR)) {
- &printLog( "Could not open $CMDERR for reading ,$!\n" );
- return(0);
- }
- my $found = 0;
- while (<CMD_ERR>) {
- my $err_output = $_;
- chomp($err_output);
- if($err_output =~ /Using a password on the command line interface can be insecure/i) {
- $found = 1;
- last;
- }
- }
- if($found){
- return 1;
- }
- }
- return 0;
-}
-
sub checkAndBackupReplicationData()
{
if( !$inputs{replication} || $inputs{replication} eq "0" ) {

mosafer1
December 22nd, 2014, 12:58 AM
i got the same problem as Merkutio mentioned before
please inform me if the solution is found

svejorange
September 20th, 2018, 02:21 AM
I am having the same problem! What would you recommend?