We currently litter our code with the following if checks:
if $::hostname == downcase($bootstrap_node) {
$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 b345dbea16ad3edd600c62848d8ee116f4df16ee
"Combine BootstrapNodeDeployment with AllNodesDeployment" we added a bootstrap
node id not not only for controller nodes but for each type of nodes.
This is problematic. Imagine the following scenario as an example:
- Both Controllers and Compute nodes are configured with service aodh-api
- Both controllers and computes will include the following snippet:
"""
if $::hostname == downcase($bootstrap_node) {
$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 the controller 0 *and* compute 0, which means that
they can be called at the same time, thereby opening up a race condition
We currently litter our code with the following if checks: $bootstrap_ node) {
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 d600c62848d8ee1 16f4df16ee ployment with AllNodesDeployment" we added a bootstrap
"Combine BootstrapNodeDe
node id not not only for controller nodes but for each type of nodes.
This is problematic. Imagine the following scenario as an example: $bootstrap_ node) {
- Both Controllers and Compute nodes are configured with service 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 the controller 0 *and* compute 0, which means that
they can be called at the same time, thereby opening up a race condition