Lowercase any hostname comparisons in bootstrap_* scripts
If you deploy a stack with mixed-case hostnames things will break
because no task that is supposed to run on boostrap nodes will run
due to the following code:
HOSTNAME=$(/bin/hostname -s)
SERVICE_NODEID=$(/bin/hiera -c /etc/puppet/hiera.yaml
"${SERVICE_NAME}_short_bootstrap_node_name")
if [[ "$HOSTNAME" == "$SERVICE_NODEID" ]]; then
...
The hiera key might contain mixed-case letters whereas the hostname
won't and the end result is going to be that no bootstrap tasks
will run on any nodes and, amongst other things, no database tables
will be created, making all services unusable.
Since we use bash explicitely we can leverage the ${var,,} expression
for this.
Reviewed: https:/ /review. openstack. org/570484 /git.openstack. org/cgit/ openstack/ tripleo- common/ commit/ ?id=3345557d7b6 4b29ccee258de8b cd6cfbfa88291e
Committed: https:/
Submitter: Zuul
Branch: master
commit 3345557d7b64b29 ccee258de8bcd6c fbfa88291e
Author: Michele Baldessari <email address hidden>
Date: Fri May 25 01:56:32 2018 +0200
Lowercase any hostname comparisons in bootstrap_* scripts
If you deploy a stack with mixed-case hostnames things will break $(/bin/ hostname -s) NODEID= $(/bin/ hiera -c /etc/puppet/ hiera.yaml SERVICE_ NAME}_short_ bootstrap_ node_name" )
because no task that is supposed to run on boostrap nodes will run
due to the following code:
HOSTNAME=
SERVICE_
"${
if [[ "$HOSTNAME" == "$SERVICE_NODEID" ]]; then
...
The hiera key might contain mixed-case letters whereas the hostname
won't and the end result is going to be that no bootstrap tasks
will run on any nodes and, amongst other things, no database tables
will be created, making all services unusable.
Since we use bash explicitely we can leverage the ${var,,} expression
for this.
Change-Id: Ie240b8a4217827 dd8ade82479a828 817d63143ba
Related-Bug: #1773219