Ignore case for bootstrap node checks
The bootstrap_nodeid can have capital letters while the hostname may
not. In puppet we use downcase for this comparison, so let's follow a
similar pattern for scripts from THT.
Change-Id: I8a0bec4a6f3ed0b4f2289cbe7023344fb284edf7
Closes-Bug: #16998201
(cherry picked from commit abf4444d90
)
This commit is contained in:
parent
4c002bd1d6
commit
d077b8735c
|
@ -11,7 +11,7 @@ function log_debug {
|
||||||
}
|
}
|
||||||
|
|
||||||
function is_bootstrap_node {
|
function is_bootstrap_node {
|
||||||
if [ "$(hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid)" = "$(facter hostname)" ]; then
|
if [ "$(hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid | tr '[:upper:]' '[:lower:]')" = "$(facter hostname | tr '[:upper:]' '[:lower:]')" ]; then
|
||||||
log_debug "Node is bootstrap"
|
log_debug "Node is bootstrap"
|
||||||
echo "true"
|
echo "true"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -49,7 +49,7 @@ fi
|
||||||
# of packages to update (the check for -z "$update_identifier" guarantees that this
|
# of packages to update (the check for -z "$update_identifier" guarantees that this
|
||||||
# is run only on overcloud stack update -i)
|
# is run only on overcloud stack update -i)
|
||||||
if [[ "$pacemaker_status" == "active" && \
|
if [[ "$pacemaker_status" == "active" && \
|
||||||
"$(hiera -c /etc/puppet/hiera.yaml pacemaker_short_bootstrap_node_name)" == "$(facter hostname)" ]] ; then \
|
"$(hiera -c /etc/puppet/hiera.yaml pacemaker_short_bootstrap_node_name | tr '[:upper:]' '[:lower:]')" == "$(facter hostname | tr '[:upper:]' '[:lower:]')" ]] ; then \
|
||||||
# OCF scripts don't cope with -eu
|
# OCF scripts don't cope with -eu
|
||||||
echo "Verifying if we need to fix up any IPv6 VIPs"
|
echo "Verifying if we need to fix up any IPv6 VIPs"
|
||||||
set +eu
|
set +eu
|
||||||
|
|
|
@ -189,7 +189,7 @@ outputs:
|
||||||
register: bootstrap_node
|
register: bootstrap_node
|
||||||
- name: set is_bootstrap_node fact
|
- name: set is_bootstrap_node fact
|
||||||
tags: common
|
tags: common
|
||||||
set_fact: is_bootstrap_node={{bootstrap_node.stdout == ansible_hostname}}
|
set_fact: is_bootstrap_node={{bootstrap_node.stdout|lower == ansible_hostname|lower}}
|
||||||
- name: Extra migration for nova tripleo/+bug/1656791
|
- name: Extra migration for nova tripleo/+bug/1656791
|
||||||
tags: step0,pre-upgrade
|
tags: step0,pre-upgrade
|
||||||
when: is_bootstrap_node
|
when: is_bootstrap_node
|
||||||
|
|
Loading…
Reference in New Issue