Bug #4030

'onedb fsck' drops group_pool table on the slave MySQL

Added by Stoyan Dimov almost 6 years ago. Updated over 5 years ago.

Status:ClosedStart date:10/07/2015
Priority:NormalDue date:
Assignee:Carlos Martín% Done:

0%

Category:Core & System
Target version:Release 4.14.2
Resolution:fixed Pull request:
Affected Versions:OpenNebula 4.14

Description

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

Associated revisions

Revision 73de55bc
Added by Carlos Martín over 5 years ago

Bug #4030: Do not drop table group_pool in fsck

Revision 7def22f7
Added by Carlos Martín over 5 years ago

Bug #4030: Do not drop table group_pool in fsck

(cherry picked from commit 2929f05c895483e8d33d0286a057958dcda4c313)

History

#1 Updated by Carlos Martín almost 6 years ago

  • Target version set to Release 4.14.2

Hi,

Can you provide more detail of the actions executed and their order?
Did you notice the problem after executing onedb fsck in the master or the slave?

#2 Updated by Stoyan Dimov almost 6 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 upgrade
onedb patch
onedb fsck

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.

#3 Updated by Stoyan Dimov almost 6 years ago

I am sorry. "I checked slave mysql db and it was there." should read:
I checked slave mysql db and it wasn't there

#4 Updated by Carlos Martín almost 6 years ago

  • Assignee set to Carlos Martín

#5 Updated by Carlos Martín over 5 years ago

  • Category set to Core & System
  • Status changed from Pending to Assigned

Hi Stoyan,

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?

http://dev.opennebula.org/projects/opennebula/repository/revisions/one-4.14/entry/src/onedb/fsck.rb

#6 Updated by Stoyan Dimov over 5 years ago

Hi Carlos,

I tried it and it did not drop group_pool table.

Thanks

#7 Updated by Carlos Martín over 5 years ago

  • Status changed from Assigned to Closed
  • Resolution set to fixed

Also available in: Atom PDF