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.
Note: this backport also modify the Newton specific bits.
Change-Id: I8a0bec4a6f3ed0b4f2289cbe7023344fb284edf7
Closes-Bug: #16998201
(cherry picked from commit d077b8735c
)
This commit is contained in:
parent
f62da2870a
commit
5c00b6ed30
|
@ -52,7 +52,7 @@ check_disk_for_mysql_dump()
|
|||
{
|
||||
mysql_need_update
|
||||
|
||||
if [ "$(hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid)" = "$(facter hostname)" ]; then
|
||||
if [[ -n $(is_bootstrap_node) ]]; then
|
||||
if [ $DO_MYSQL_UPGRADE -eq 1 ]; then
|
||||
|
||||
if [ -d "$MYSQL_BACKUP_DIR" ]; then
|
||||
|
|
|
@ -156,7 +156,7 @@ if [ $DO_MYSQL_UPGRADE -eq 1 ]; then
|
|||
mysql_install_db --datadir=/var/lib/mysql --user=mysql
|
||||
chown -R mysql:mysql /var/lib/mysql/
|
||||
|
||||
if [ "$(hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid)" = "$(facter hostname)" ]; then
|
||||
if [[ -n $(is_bootstrap_node) ]]; then
|
||||
mysqld_safe --wsrep-new-cluster &
|
||||
# We have a populated /root/.my.cnf with root/password here so
|
||||
# we need to temporarily rename it because the newly created
|
||||
|
|
|
@ -33,7 +33,7 @@ function log_debug {
|
|||
}
|
||||
|
||||
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"
|
||||
echo "true"
|
||||
fi
|
||||
|
|
|
@ -74,7 +74,7 @@ touch /etc/httpd/conf.d/ssl.conf
|
|||
# Fix the redis/rabbit resource start/stop timeouts. See https://bugs.launchpad.net/tripleo/+bug/1633455
|
||||
# and https://bugs.launchpad.net/tripleo/+bug/1634851
|
||||
if [[ "$pacemaker_status" == "active" && \
|
||||
"$(hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid)" = "$(facter hostname)" ]] ; then
|
||||
-n $(is_bootstrap_node) ]] ; then
|
||||
if pcs resource show rabbitmq | grep -E "start.*timeout=100"; then
|
||||
pcs resource update rabbitmq op start timeout=200s
|
||||
fi
|
||||
|
@ -160,7 +160,7 @@ fi
|
|||
# a performance impairment. So, as a stop-gap-solution we run it here on the
|
||||
# first controller node, which is a noop if there is nothing to do.
|
||||
if hiera -c /etc/puppet/hiera.yaml service_names | grep -q nova_api && \
|
||||
[[ "$(hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid)" = "$(facter hostname)" ]] ; then
|
||||
[[ -n $(is_bootstrap_node) ]] ; then
|
||||
/usr/bin/nova-manage db online_data_migrations
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue