'onedb fsck' drops group_pool table on the slave MySQL
|Assignee:||Carlos Martín||% Done:|
|Category:||Core & System|
|Target version:||Release 4.14.2|
|Affected Versions:||OpenNebula 4.14|
After upgrading from 4.12 to 4.14 I noticed group_pool table is missing on the slave MySQL server (slave zone in federation).
Here are the relevant queries from MySQL log:
6 Query CREATE TABLE group_pool_new (oid INTEGER PRIMARY KEY, name VARCHAR, body MEDIUMTEXT, uid INTEGER, gid INTEGER, owner_u INTEGER, group_u INTEGER, other_u INTEGER, UNIQUE)
6 Query SELECT * from group_pool
6 Query INSERT INTO `group_pool_new` (`oid`, `name`, `body`, `uid`, `gid`, `owner_u`, `group_u`, `other_u`) VALUES (...)
6 Query DROP TABLE group_pool
6 Query ALTER TABLE group_pool_new RENAME TO group_pool
#2 Updated by Stoyan Dimov almost 5 years ago
I followed the 4.12 to 4.14 upgrade guide. I first upgraded the slave zone and all was fine. Then I upgraded the master zone. Little later we noticed that we cannot login into the slave zone. oned.log file had an error about missing group_pool table. I checked slave mysql db and it was there. I restored it from backup and everything was back to normal.
Upgrade guide has 3 steps which affect the database:
onedb fsck was the easiest to try so I ran it on the master frontend and group_pool disappeared from the slave mysql. Again I restored it from backup. I turned on logging on master mysql server and I ran onedb fsck again. As you can see from the excerpt I posted initially table group_pool is copied into a temp table group_pool_new and then group_pool is dropped. group_pool table is replicated to the slave mysql and it is dropped on the slave mysql as well. group_pool_new table is not replicated to the slave mysql thus slave mysql has not way of recreating group_pool.
Please let me know if you need more information.
#5 Updated by Carlos Martín almost 5 years ago
- Category set to Core & System
- Status changed from Pending to Assigned
I've updated the fsck file with a fix for this bug. Can you please replace /usr/lib/one/ruby/onedb/fsck.rb with this one, and give it a try?