Bug #24544 Backup report in ndb_mgm and logfile suggestion
Submitted: 23 Nov 2006 13:12 Modified: 6 Dec 2006 11:21
Reporter: Geert Vanderkelen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:5.1.12 OS:Any (*)
Assigned to: Jonas Oreland
Tags: Backup, log, NDB_MGM

[23 Nov 2006 13:12] Geert Vanderkelen
Description:
With MySQL 5.1.12 the backup report is not printed anymore to STDOUT (or STDERR). This is useful information for automated processes for example. It would be great that this could be enabled again. (see also bug 4590)

Also, currently the output is on 3 lines, but it would be probably better to put this one line. It makes it easier to parse for scripts.
In log files, printing 3 lines like that breaks the flow of the log a bit. Maybe it should be logged also as 1 line and with a timestamp in front of it like the other log entries.

How to repeat:
With current version 5.1.14 from bk (and 5.1.12-beta):

shell> ndb_mgm -e "START BACKUP"
Connected to Management Server at: localhost:1186
Waiting for completed, this may take several minutes
shell>

Output in cluster logs:

2006-11-23 14:05:36 [MgmSrvr] INFO     -- Node 3: Backup 1 started from node 1 completed
 StartGCP: 46 StopGCP: 49
 #Records: 2050 #LogRecords: 0
 Data: 32960 bytes Log: 0 bytes

Suggested fix:
Output the report again on STDOUT like it was before 5.1.12-beta:

shell> ndb_mgm -e "START BACKUP"
Connected to Management Server at: localhost:1186
Waiting for completed, this may take several minutes
 StartGCP: 46 StopGCP: 49
 #Records: 2050 #LogRecords: 0
 Data: 32960 bytes Log: 0 bytes
shell>

Even better, put it on one line:

shell> ndb_mgm -e "START BACKUP"
Connected to Management Server at: localhost:1186
Waiting for completed, this may take several minutes
Backup report: StartGCP: 46 StopGCP: 49 #Records: 2050 #LogRecords: 0 Data: 32960 bytes Log: 0 bytes

And in logs, something like this:
2006-11-23 14:05:36 [MgmSrvr] INFO     -- Node 3: Backup 1 started from node 1 completed, StartGCP: 46 StopGCP: 49 #Records: 2050 #LogRecords: 0 Data: 32960 bytes Log: 0 bytes
[23 Nov 2006 13:13] Geert Vanderkelen
Verified using 5.1.11 (where it works) and 5.1.12 and 5.1.14 from bk on Linux.
[28 Nov 2006 14:11] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/15955

ChangeSet@1.2331, 2006-11-28 15:11:13+01:00, jonas@perch.ndb.mysql.com +4 -0
  ndb - bug#24544
    fix so backup message is printed even in case of "ndb_mgm -e"
[28 Nov 2006 14:12] Jonas Oreland
comment: it still multi line printout...
[6 Dec 2006 11:21] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.htmlk

Documented in 5.1.14 changelog, and in Backups section of Cluster chapter in the 5.1 Manual.