Update salt-formula to be tested on pike
Following warning and error were occured in pike deployment:
- WARNING octavia.api.root_controller [-] Both v1 and v2.0 API endpoints are enabled
Now there are 2 version of api, should be ability to enable/disable them.
- CRITICAL octavia [-] Unhandled error: MissingRequiredOptions:
Auth plugin requires parameters which were not given: auth_url
auth_url parameter was added.
- ERROR keystonemiddleware.auth_token [-] Bad response code while validating token: 400:
BadRequest: Expecting to find username or userId in passwordCredentials.
auth_section = service_auth was defined for keystonemiddleware.
PROD-22016
PROD-22019
Change-Id: Id3b17e836c07b75d9603f81c68ae9a30e2d06725
diff --git a/metadata/service/api/cluster.yml b/metadata/service/api/cluster.yml
index e86c56b..f6bd55e 100644
--- a/metadata/service/api/cluster.yml
+++ b/metadata/service/api/cluster.yml
@@ -7,10 +7,14 @@
keystone_octavia_endpoint_type: internal
octavia_api_bind_address: ${_param:cluster_local_address}
octavia_api_bind_port: 9876
+ octavia_api_v1_enabled: True
+ octavia_api_v2_enabled: True
octavia:
api:
enabled: true
version: ${_param:octavia_version}
+ api_v1_enabled: ${_param:octavia_api_v1_enabled}
+ api_v2_enabled: ${_param:octavia_api_v2_enabled}
debug: true
bind:
address: ${_param:octavia_api_bind_address}
diff --git a/metadata/service/api/single.yml b/metadata/service/api/single.yml
index dabaa6b..dfd1128 100644
--- a/metadata/service/api/single.yml
+++ b/metadata/service/api/single.yml
@@ -5,10 +5,14 @@
parameters:
_param:
keystone_octavia_endpoint_type: internal
+ octavia_api_v1_enabled: True
+ octavia_api_v2_enabled: True
octavia:
api:
enabled: true
version: ${_param:octavia_version}
+ api_v1_enabled: ${_param:octavia_api_v1_enabled}
+ api_v2_enabled: ${_param:octavia_api_v2_enabled}
debug: true
bind:
address: ${_param:single_address}
diff --git a/octavia/files/pike/octavia_api.conf b/octavia/files/pike/octavia_api.conf
index 38bed3c..bdb77a8 100644
--- a/octavia/files/pike/octavia_api.conf
+++ b/octavia/files/pike/octavia_api.conf
@@ -28,6 +28,12 @@
# The path for API extensions (string value)
#api_extensions_path =
+# Enable/disable exposing API endpoints (boolean value)
+# api_v1_enabled = True
+api_v1_enabled = {{ api.get('api_v1_enabled', 'True') }}
+# api_v2_enabled = True
+api_v2_enabled = {{ api.get('api_v2_enabled', 'True') }}
+
# Allow the usage of the bulk API (boolean value)
#allow_bulk = true
@@ -942,9 +948,14 @@
# *not* be the same endpoint the service user utilizes for validating tokens,
# because normal end users may not be able to reach that endpoint. (string
# value)
+# The auth_uri is the public endpoint and is returned in headers on a 401
#auth_uri = <None>
auth_uri=http://{{ api.identity.host }}:5000
+# The auth_url is the admin endpoint actually used for validating tokens
+#auth_url = <None>
+auth_url=http://{{ api.identity.host }}:35357
+
# API version of the admin Identity API endpoint. (string value)
#auth_version = <None>
@@ -1105,7 +1116,7 @@
auth_type = password
# Config Section from which to load plugin specific options (string value)
-#auth_section = <None>
+auth_section = service_auth
[matchmaker_redis]
diff --git a/octavia/files/pike/octavia_manager.conf b/octavia/files/pike/octavia_manager.conf
index 1d563e6..8926ffa 100644
--- a/octavia/files/pike/octavia_manager.conf
+++ b/octavia/files/pike/octavia_manager.conf
@@ -33,6 +33,15 @@
# The path for API extensions (string value)
#api_extensions_path =
+# Enable/disable exposing API endpoints (boolean value)
+# api_v1_enabled = True
+# api_v2_enabled = True
+
+{%- if pillar.octavia.api is defined %}
+api_v1_enabled = {{ api.get('api_v1_enabled', 'True') }}
+api_v2_enabled = {{ api.get('api_v2_enabled', 'True') }}
+{% endif %}
+
# Allow the usage of the bulk API (boolean value)
#allow_bulk = true
@@ -977,6 +986,10 @@
#auth_uri = <None>
auth_uri=http://{{ manager.identity.host }}:5000
+# The auth_url is the admin endpoint actually used for validating tokens
+#auth_url = <None>
+auth_url=http://{{ manager.identity.host }}:35357
+
# API version of the admin Identity API endpoint. (string value)
#auth_version = <None>
@@ -1137,7 +1150,7 @@
auth_type = password
# Config Section from which to load plugin specific options (string value)
-#auth_section = <None>
+auth_section = service_auth
[matchmaker_redis]