This change addresses a few inconsistencies in how nova processes
are configured to speak to the placement service.
The initial inspiration was that region_name was not being set in the
[placement] section, despite $REGION_NAME being used when setting
the endpoint in the catalog. That's fixed.
While fixing that two other issues became clear:
* Configuring nova process to use placement should happen in lib/nova
not lib/placement so the function has been moved.
* auth_strategy is not relevant in the [placement] section of a
nova process
The name of the function is maintained, in case there are plugins which
call it, but a comment is added to indicate that other services besides
nova compute (such as the cell conductor) may use the function.
Change-Id: I4a46b6460596e9a445bd90de2d52dbb71fb963df
| ... | ... |
@@ -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 |