if $::hostname == boostrap_node checks are fragile
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Incomplete
|
High
|
Michele Baldessari |
Bug Description
We currently litter our code with the following if checks:
if $::hostname == downcase(
$sync_db = true
} else {
$sync_db = false
}
We do so for a bunch of reasons, but mainly for:
1) Creating pacemaker resources only from a single node
2) Call sync_db commands to create sql tables and fixup sql data in general
When we merged commit b345dbea16ad3ed
"Combine BootstrapNodeDe
This is problematic. Imagine the following scenario as an example:
- Both Controllers and Compute nodes are configured to include aodh-api
- Both controllers and computes will include the following snippet:
"""
if $::hostname == downcase(
$sync_db = true
} else {
$sync_db = false
}
if $step >= 3 and $sync_db {
include ::aodh::db::mysql
}
"""
- The if statement will hold true for both controller 0 *and* compute 0,
which means that they can be called at the same time, thereby opening up
a race condition
summary: |
- boostrap_node if checks are fragile + if $:::hostname == boostrap_node checks are fragile |
summary: |
- if $:::hostname == boostrap_node checks are fragile + if $::hostname == boostrap_node checks are fragile |
description: | updated |
description: | updated |
Changed in tripleo: | |
status: | New → Confirmed |
importance: | Undecided → High |
milestone: | none → newton-3 |
Changed in tripleo: | |
milestone: | newton-3 → newton-rc1 |
Changed in tripleo: | |
milestone: | newton-rc1 → newton-rc2 |
Changed in tripleo: | |
status: | Confirmed → Triaged |
Changed in tripleo: | |
milestone: | ocata-1 → ocata-2 |
Changed in tripleo: | |
milestone: | ocata-2 → ocata-3 |
Changed in tripleo: | |
milestone: | ocata-3 → ocata-rc1 |
Changed in tripleo: | |
milestone: | ocata-rc1 → ocata-rc2 |
Changed in tripleo: | |
milestone: | ocata-rc2 → pike-1 |
Changed in tripleo: | |
milestone: | pike-1 → pike-2 |
Changed in tripleo: | |
milestone: | pike-2 → pike-3 |
Changed in tripleo: | |
milestone: | pike-3 → pike-rc1 |
Changed in tripleo: | |
milestone: | pike-rc1 → pike-rc2 |
Changed in tripleo: | |
milestone: | pike-rc2 → queens-1 |
Changed in tripleo: | |
milestone: | queens-1 → queens-2 |
Changed in tripleo: | |
milestone: | queens-2 → queens-3 |
Changed in tripleo: | |
milestone: | queens-3 → queens-rc1 |
Changed in tripleo: | |
milestone: | queens-rc1 → rocky-1 |
Changed in tripleo: | |
milestone: | rocky-1 → rocky-2 |
Changed in tripleo: | |
milestone: | rocky-2 → rocky-3 |
Changed in tripleo: | |
milestone: | rocky-3 → rocky-rc1 |
Changed in tripleo: | |
milestone: | rocky-rc1 → stein-1 |
Changed in tripleo: | |
milestone: | stein-1 → stein-2 |
Changed in tripleo: | |
milestone: | stein-2 → stein-3 |
Changed in tripleo: | |
milestone: | stein-3 → stein-rc1 |
Changed in tripleo: | |
milestone: | stein-rc1 → train-1 |
Changed in tripleo: | |
milestone: | train-1 → train-2 |
Changed in tripleo: | |
milestone: | train-2 → train-3 |
Changed in tripleo: | |
milestone: | train-3 → ussuri-1 |
Changed in tripleo: | |
milestone: | ussuri-1 → ussuri-2 |
Changed in tripleo: | |
milestone: | ussuri-2 → ussuri-3 |
Changed in tripleo: | |
milestone: | ussuri-3 → ussuri-rc3 |
Changed in tripleo: | |
milestone: | ussuri-rc3 → victoria-1 |
Changed in tripleo: | |
milestone: | victoria-1 → victoria-3 |
Changed in tripleo: | |
milestone: | victoria-3 → wallaby-1 |
Changed in tripleo: | |
milestone: | wallaby-1 → wallaby-2 |
Changed in tripleo: | |
milestone: | wallaby-2 → wallaby-3 |
I'm not sure we can solve this in time for the newton release, it's something we'll have to document (e.g in the matrix of services, certain services can only be deployed on exactly one role), then we can look at some more flexible approach during Ocata (which will enable e.g scaling out to add some more aodh-api nodes while leaving the current services running on the ControllerRole.