Browse code

Merge "Configure nova's use of placement more correctly"

Zuul authored on 2019/01/24 10:54:52
Showing 2 changed files
... ...
@@ -597,6 +597,21 @@ function create_nova_conf {
597 597
     fi
598 598
 }
599 599
 
600
+# Configure access to placement from a nova service, usually
601
+# compute, but sometimes conductor.
602
+function configure_placement_nova_compute {
603
+    # Use the provided config file path or default to $NOVA_CONF.
604
+    local conf=${1:-$NOVA_CONF}
605
+    iniset $conf placement auth_type "password"
606
+    iniset $conf placement auth_url "$KEYSTONE_SERVICE_URI"
607
+    iniset $conf placement username placement
608
+    iniset $conf placement password "$SERVICE_PASSWORD"
609
+    iniset $conf placement user_domain_name "$SERVICE_DOMAIN_NAME"
610
+    iniset $conf placement project_name "$SERVICE_TENANT_NAME"
611
+    iniset $conf placement project_domain_name "$SERVICE_DOMAIN_NAME"
612
+    iniset $conf placement region_name "$REGION_NAME"
613
+}
614
+
600 615
 function configure_console_compute {
601 616
     # All nova-compute workers need to know the vnc configuration options
602 617
     # These settings don't hurt anything if n-xvnc and n-novnc are disabled
... ...
@@ -93,19 +93,6 @@ function _config_placement_apache_wsgi {
93 93
     " -i $placement_api_apache_conf
94 94
 }
95 95
 
96
-function configure_placement_nova_compute {
97
-    # Use the provided config file path or default to $NOVA_CONF.
98
-    local conf=${1:-$NOVA_CONF}
99
-    iniset $conf placement auth_type "password"
100
-    iniset $conf placement auth_url "$KEYSTONE_SERVICE_URI"
101
-    iniset $conf placement username placement
102
-    iniset $conf placement password "$SERVICE_PASSWORD"
103
-    iniset $conf placement user_domain_name "$SERVICE_DOMAIN_NAME"
104
-    iniset $conf placement project_name "$SERVICE_TENANT_NAME"
105
-    iniset $conf placement project_domain_name "$SERVICE_DOMAIN_NAME"
106
-    iniset $conf placement auth_strategy $PLACEMENT_AUTH_STRATEGY
107
-}
108
-
109 96
 # create_placement_conf() - Write config
110 97
 function create_placement_conf {
111 98
     rm -f $PLACEMENT_CONF