summaryrefslogtreecommitdiffstats
path: root/manifests/profile/pacemaker/database
diff options
context:
space:
mode:
authorEmilien Macchi <emilien@redhat.com>2016-10-13 11:21:02 -0400
committerEmilien Macchi <emilien@redhat.com>2016-10-13 11:21:02 -0400
commit381e59f6e15ab4cb5316e0be3ba831fe61b318d2 (patch)
tree5e1c3b9d8f25bb17e8b5a28cf4ebb2940482b8a4 /manifests/profile/pacemaker/database
parentc4e7d4dc52b9351529fac6c4979aad5fa2a4cf1e (diff)
pacemaker/mysql: wait step 2 to remove default accounts
remove_default_accounts is a mysql::server parameter that, set to True, will execute some MySQL commands to cleanup MySQL defaults accounts created by packaging. In order to successfully run the commands, we need MySQL up and running, which is not the case at step 1 but at step 2. This patch make sure we run the commands at step 2 on pacemaker master only. No change for scenarios without Pacemaker. Change-Id: Ifad3cb40fd958d7ea606b9cd2ba4c8ec22a8e94e Closes-Bug: #1633113
Diffstat (limited to 'manifests/profile/pacemaker/database')
-rw-r--r--manifests/profile/pacemaker/database/mysql.pp12
1 files changed, 11 insertions, 1 deletions
diff --git a/manifests/profile/pacemaker/database/mysql.pp b/manifests/profile/pacemaker/database/mysql.pp
index 7464854..a353e5f 100644
--- a/manifests/profile/pacemaker/database/mysql.pp
+++ b/manifests/profile/pacemaker/database/mysql.pp
@@ -89,9 +89,19 @@ class tripleo::profile::pacemaker::database::mysql (
}
}
+ # remove_default_accounts parameter will execute some mysql commands
+ # to remove the default accounts created by MySQL package.
+ # We need MySQL running to run the commands successfully, so better to
+ # wait step 2 before trying to run the commands.
+ if $step >= 2 and $pacemaker_master {
+ $remove_default_accounts = true
+ } else {
+ $remove_default_accounts = false
+ }
+
class { '::tripleo::profile::base::database::mysql':
manage_resources => false,
- remove_default_accounts => $pacemaker_master,
+ remove_default_accounts => $remove_default_accounts,
mysql_server_options => $mysqld_options,
}
href='#n241'>241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435