Description:
The mtr test ndb.ndb_index_stat_restart does an inital cluster restart.
That clears SYSTAB_0 including the current backup id which are stored wherein.
But cluster backup files are not removed by successful tests.
So if ndb_index_stat_restart are preceded with a backup test there will be backup files especially with backup id 1.
If there later are another backup test run after ndb_index_stat_restart this will use backup id 1 again but since there are already files for backup id 1 the backup command will fail with Error: 1350 in cluster logs (meaning "Backup failed: file already exists (use 'START BACKUP <backup id>'))
There are other tests doing initial restart like ndb.ndb_share but since that uses its own configuration there will be a total restart of all processes by mtr which also clears old backup files, so no problem there.
Yet another test is ndb_team.ndb_autodiscover3 which already have code for restoring the backup id after the inital restart.
How to repeat:
Make mtr run a backup test, then ndb.ndb_index_stat_restart, and then a backup test again.
The second backup test will fail with something like below in cluster log:
[MgmtSrvr] ALERT -- Node 1: Backup 1 started from 3 has been aborted. Error: 1350
./mtr --no-reorder ndb.ndb_restore_compat_compression ndb.ndb_index_stat_restart ndb.ndb_fk_restore
worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
ndb.ndb_restore_compat_compression [ pass ] 67442
ndb.ndb_index_stat_restart [ pass ] 16013
ndb.ndb_fk_restore [ fail ]
Test ended at 2016-02-03 11:18:58
CURRENT_TEST: ndb.ndb_fk_restore
mysqltest: In included file ./include/ndb_backup.inc at line 6:
included from /home/msundell/dev/mysql-7.5-wl8817/src/mysql-test/suite/ndb/t/ndb_fk_restore.inc at line 29:
included from /home/msundell/dev/mysql-7.5-wl8817/src/mysql-test/suite/ndb/t/ndb_fk_restore.test at line 27:
At line 5: command "$NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "start backup" >> $NDB_TOOLS_OUTPUT" failed
Output from before failure:
exec of '/home/msundell/dev/mysql-7.5-wl8817/bld/storage/ndb/src/mgmclient/ndb_mgm --no-defaults --ndb-connectstring="localhost:13000" -e "start backup" >> /home/msundell/dev/mysql-7.5-wl8817/bld/mysql-test/var/tmp/ndb_testrun.log' failed, error: 65280, status: 255, errno: 2
Suggested fix:
Restore backup_id after initial restart.
Another approach could be that all tests that do backups removes its backup files before finish.