From 068face6fa52d19d421913b9969b291500a39c6d Mon Sep 17 00:00:00 2001
From: Lars Kellogg-Stedman <lars@redhat.com>
Date: Sun, 5 Oct 2014 16:12:44 -0400
Subject: [PATCH] use renamed mariadb services

This patch updates all the json files that reference the mariadb service
variables to ues the new names.

Labelling things foo-master crept into this repository from the
kubernetes guestbook example (which has redis-master and redis-slaves).
We're not running clustered software at the moment so these labels are
unnecessary.

Change-Id: I229d04c89aa13cb6cc2e1c33a0a7b21e1c6e9caa
---
 docker/cinder/start.sh                     | 2 +-
 docker/glance/glance-base/config-glance.sh | 2 +-
 docker/glance/glance-registry/start.sh     | 2 +-
 docker/heat/heat-engine/start.sh           | 2 +-
 docker/keystone/start.sh                   | 6 +++---
 docker/nova-compute/nova-compute/start.sh  | 2 +-
 docker/swift/swift-account/start.sh        | 2 +-
 docker/swift/swift-container/start.sh      | 2 +-
 docker/swift/swift-object/start.sh         | 2 +-
 9 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/docker/cinder/start.sh b/docker/cinder/start.sh
index fedd868871..84b79e5011 100755
--- a/docker/cinder/start.sh
+++ b/docker/cinder/start.sh
@@ -21,7 +21,7 @@ if ! [ "$CINDER_DB_PASSWORD" ]; then
         export CINDER_DB_PASSWORD
 fi
 
-mysql -h ${MARIADBMASTER_PORT_3306_TCP_ADDR} -u root \
+mysql -h ${MARIADB_PORT_3306_TCP_ADDR} -u root \
         -p${DB_ROOT_PASSWORD} mysql <<EOF
 EOF                                                                
 CREATE DATABASE IF NOT EXISTS ${CINDER_DB_NAME};                                                        
diff --git a/docker/glance/glance-base/config-glance.sh b/docker/glance/glance-base/config-glance.sh
index 2b2ae04738..6cdd76efd0 100644
--- a/docker/glance/glance-base/config-glance.sh
+++ b/docker/glance/glance-base/config-glance.sh
@@ -50,5 +50,5 @@ crudini --set $cfg
 crudini --set $cfg \
         database \
         connection \
-        "mysql://${GLANCE_DB_USER}:${GLANCE_DB_PASSWORD}@${MARIADBMASTER_PORT_3306_TCP_ADDR}:${MARIADBMASTER_PORT_3306_TCP_PORT}/${GLANCE_DB_NAME}"
+        "mysql://${GLANCE_DB_USER}:${GLANCE_DB_PASSWORD}@${MARIADB_PORT_3306_TCP_ADDR}:${MARIADB_PORT_3306_TCP_PORT}/${GLANCE_DB_NAME}"
 
diff --git a/docker/glance/glance-registry/start.sh b/docker/glance/glance-registry/start.sh
index 4918e24540..c169087a9c 100755
--- a/docker/glance/glance-registry/start.sh
+++ b/docker/glance/glance-registry/start.sh
@@ -23,7 +23,7 @@ fi
 
 sh /opt/glance/config-glance.sh registry
 
-mysql -h ${MARIADBMASTER_PORT_3306_TCP_ADDR} -u root -p${DB_ROOT_PASSWORD} mysql <<EOF
+mysql -h ${MARIADB_PORT_3306_TCP_ADDR} -u root -p${DB_ROOT_PASSWORD} mysql <<EOF
 CREATE DATABASE IF NOT EXISTS ${GLANCE_DB_NAME} DEFAULT CHARACTER SET utf8;
 GRANT ALL PRIVILEGES ON ${GLANCE_DB_NAME}.* TO
        '${GLANCE_DB_USER}'@'%' IDENTIFIED BY '${GLANCE_DB_PASSWORD}'
diff --git a/docker/heat/heat-engine/start.sh b/docker/heat/heat-engine/start.sh
index ac95ad3a1d..35df8f04ae 100644
--- a/docker/heat/heat-engine/start.sh
+++ b/docker/heat/heat-engine/start.sh
@@ -23,7 +23,7 @@ fi
 
 sh /opt/heat/config-heat.sh engine
 
-mysql -h ${MARIADBMASTER_PORT_3306_TCP_ADDR} -u root \
+mysql -h ${MARIADB_PORT_3306_TCP_ADDR} -u root \
 	-p${DB_ROOT_PASSWORD} mysql <<EOF
 CREATE DATABASE IF NOT EXISTS ${GLANCE_DB_NAME};
 GRANT ALL PRIVILEGES ON heat* TO
diff --git a/docker/keystone/start.sh b/docker/keystone/start.sh
index 6e0ff7cd74..a825c39d8d 100755
--- a/docker/keystone/start.sh
+++ b/docker/keystone/start.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 # Exit the container if MariaDB is not yet up - then depend on kube to restart
-if [ -z "$MARIADBMASTER_PORT_3306_TCP_PORT" ]; then
+if [ -z "$MARIADB_PORT_3306_TCP_PORT" ]; then
     exit 1
 fi
 
@@ -16,7 +16,7 @@ if ! [ "$KEYSTONE_DB_PASSWORD" ]; then
     KEYSTONE_DB_PASSWORD=$(openssl rand -hex 15)
 fi
 
-mysql -h ${MARIADBMASTER_PORT_3306_TCP_ADDR} -u root -p${DB_ROOT_PASSWORD} mysql <<EOF
+mysql -h ${MARIADB_PORT_3306_TCP_ADDR} -u root -p${DB_ROOT_PASSWORD} mysql <<EOF
 CREATE DATABASE IF NOT EXISTS keystone;
 GRANT ALL PRIVILEGES ON keystone.* TO
     'keystone'@'%' IDENTIFIED BY '${KEYSTONE_DB_PASSWORD}'
@@ -25,7 +25,7 @@ EOF
 crudini --set /etc/keystone/keystone.conf \
     database \
     connection \
-    "mysql://keystone:${KEYSTONE_DB_PASSWORD}@${MARIADBMASTER_PORT_3306_TCP_ADDR}:${MARIADBMASTER_PORT_3306_TCP_PORT}/keystone"
+    "mysql://keystone:${KEYSTONE_DB_PASSWORD}@${MARIADB_PORT_3306_TCP_ADDR}:${MARIADB_PORT_3306_TCP_PORT}/keystone"
 crudini --set /etc/keystone/keystone.conf \
     DEFAULT \
     admin_token \
diff --git a/docker/nova-compute/nova-compute/start.sh b/docker/nova-compute/nova-compute/start.sh
index 58b4a3f18f..ed6631cfcd 100644
--- a/docker/nova-compute/nova-compute/start.sh
+++ b/docker/nova-compute/nova-compute/start.sh
@@ -23,7 +23,7 @@ fi
 
 sh /opt/nova/config-nova.sh compute
 
-mysql -h ${MARIADBMASTER_PORT_3306_TCP_ADDR} -u root \
+mysql -h ${MARIADB_PORT_3306_TCP_ADDR} -u root \
 	-p${DB_ROOT_PASSWORD} mysql <<EOF
 CREATE DATABASE IF NOT EXISTS ${NOVA_DB_NAME};
 GRANT ALL PRIVILEGES ON nova* TO
diff --git a/docker/swift/swift-account/start.sh b/docker/swift/swift-account/start.sh
index 783df0a668..29269d5774 100644
--- a/docker/swift/swift-account/start.sh
+++ b/docker/swift/swift-account/start.sh
@@ -23,7 +23,7 @@ fi
 
 sh /opt/swift/config-swift.sh account-server
 
-mysql -h ${MARIADBMASTER_PORT_3306_TCP_ADDR} -u root \
+mysql -h ${MARIADB_PORT_3306_TCP_ADDR} -u root \
 	-p${DB_ROOT_PASSWORD} mysql <<EOF
 CREATE DATABASE IF NOT EXISTS ${SWIFT_DB_NAME};
 GRANT ALL PRIVILEGES ON swift* TO
diff --git a/docker/swift/swift-container/start.sh b/docker/swift/swift-container/start.sh
index 8e952c7297..aa22739b7d 100644
--- a/docker/swift/swift-container/start.sh
+++ b/docker/swift/swift-container/start.sh
@@ -23,7 +23,7 @@ fi
 
 sh /opt/swift/config-swift.sh container
 
-mysql -h ${MARIADBMASTER_PORT_3306_TCP_ADDR} -u root \
+mysql -h ${MARIADB_PORT_3306_TCP_ADDR} -u root \
 	-p${DB_ROOT_PASSWORD} mysql <<EOF
 CREATE DATABASE IF NOT EXISTS ${SWIFT_DB_NAME};
 GRANT ALL PRIVILEGES ON swift* TO
diff --git a/docker/swift/swift-object/start.sh b/docker/swift/swift-object/start.sh
index 4b294d5086..4f0a8febfa 100644
--- a/docker/swift/swift-object/start.sh
+++ b/docker/swift/swift-object/start.sh
@@ -23,7 +23,7 @@ fi
 
 sh /opt/swift/config-swift.sh engine
 
-mysql -h ${MARIADBMASTER_PORT_3306_TCP_ADDR} -u root \
+mysql -h ${MARIADB_PORT_3306_TCP_ADDR} -u root \
 	-p${DB_ROOT_PASSWORD} mysql <<EOF
 CREATE DATABASE IF NOT EXISTS ${SWIFT_DB_NAME};
 GRANT ALL PRIVILEGES ON swift* TO
-- 
GitLab