Fix MariaDB account removal race condition
authorJiri Stransky <jistr@redhat.com>
Fri, 2 Oct 2015 12:49:25 +0000 (14:49 +0200)
committerJiri Stransky <jistr@redhat.com>
Mon, 5 Oct 2015 10:58:30 +0000 (12:58 +0200)
The removal of default MariaDB accounts was being triggered roughly at
the same time on all controllers, causing a race condition -- multiple
nodes found an account present and attempted deletion, but then only one
succeeded with the deletion, the others failed.

HA controller deletes the accounts only on bootstrap node now, which
fixes the issue.

Change-Id: Ieacd10a6ce26da50f6a37eaa3221d866c24353fa

puppet/hieradata/controller.yaml
puppet/manifests/overcloud_controller.pp
puppet/manifests/overcloud_controller_pacemaker.pp

index a66c1ea..a4e2766 100644 (file)
@@ -95,7 +95,6 @@ horizon::django_session_engine: 'django.contrib.sessions.backends.cache'
 
 # mysql
 mysql::server::manage_config_file: true
-mysql::server::remove_default_accounts: true
 
 
 tripleo::loadbalancer::keystone_admin: true
index 36b91a7..0e1c7d5 100644 (file)
@@ -84,7 +84,8 @@ if hiera('step') >= 2 {
         'max_connections' => hiera('mysql_max_connections'),
         'open_files_limit' => '-1',
       },
-    }
+    },
+    remove_default_accounts => true,
   }
 
   # FIXME: this should only occur on the bootstrap host (ditto for db syncs)
index 0a0ce78..808c7a2 100644 (file)
@@ -158,12 +158,13 @@ if hiera('step') >= 1 {
   }
 
   class { '::mysql::server':
-    create_root_user   => false,
-    create_root_my_cnf => false,
-    config_file        => $mysql_config_file,
-    override_options   => $mysqld_options,
-    service_manage     => false,
-    service_enabled    => false,
+    create_root_user        => false,
+    create_root_my_cnf      => false,
+    config_file             => $mysql_config_file,
+    override_options        => $mysqld_options,
+    remove_default_accounts => $pacemaker_master,
+    service_manage          => false,
+    service_enabled         => false,
   }
 
 }