Kirill Bespalov | 01614c0 | 2017-07-31 17:06:09 +0300 | [diff] [blame] | 1 | {%- from "cinder/map.jinja" import controller, system_cacerts_file with context %} |
Jakub Pavlik | 78517fb | 2016-10-20 14:53:34 +0200 | [diff] [blame] | 2 | |
| 3 | [DEFAULT] |
| 4 | rootwrap_config = /etc/cinder/rootwrap.conf |
| 5 | api_paste_confg = /etc/cinder/api-paste.ini |
| 6 | |
| 7 | iscsi_helper = tgtadm |
| 8 | volume_name_template = volume-%s |
| 9 | #volume_group = cinder |
| 10 | |
| 11 | verbose = True |
| 12 | |
| 13 | osapi_volume_workers = {{ controller.get('volume_workers', '4') }} |
| 14 | |
| 15 | auth_strategy = keystone |
| 16 | |
| 17 | state_path = /var/lib/cinder |
| 18 | |
| 19 | use_syslog=False |
| 20 | |
| 21 | glance_num_retries=0 |
| 22 | debug=False |
| 23 | |
| 24 | os_region_name={{ controller.identity.region }} |
Damian Szeluga | 0918f5a | 2017-04-19 12:26:56 +0200 | [diff] [blame] | 25 | allow_availability_zone_fallback = {{ controller.get('availability_zone_fallback', True) }} |
Jakub Pavlik | 78517fb | 2016-10-20 14:53:34 +0200 | [diff] [blame] | 26 | |
| 27 | #glance_api_ssl_compression=False |
| 28 | #glance_api_insecure=False |
| 29 | |
| 30 | osapi_volume_listen={{ controller.osapi.host }} |
| 31 | |
Jakub Pavlik | 196a21c | 2017-04-03 22:10:05 +0200 | [diff] [blame] | 32 | glance_api_servers = http://{{ controller.glance.host }}:{{ controller.glance.port }} |
| 33 | |
Jakub Pavlik | 78517fb | 2016-10-20 14:53:34 +0200 | [diff] [blame] | 34 | glance_host={{ controller.glance.host }} |
| 35 | glance_port={{ controller.glance.port }} |
| 36 | glance_api_version=2 |
| 37 | |
Jakub Pavlik | 196a21c | 2017-04-03 22:10:05 +0200 | [diff] [blame] | 38 | enable_v3_api = True |
| 39 | |
| 40 | os_privileged_user_name={{ controller.identity.user }} |
| 41 | os_privileged_user_password={{ controller.identity.password }} |
| 42 | os_privileged_user_tenant={{ controller.identity.tenant }} |
| 43 | os_privileged_user_auth_url=http://{{ controller.identity.host }}:5000/v3/ |
| 44 | |
Jakub Pavlik | 78517fb | 2016-10-20 14:53:34 +0200 | [diff] [blame] | 45 | volume_backend_name=DEFAULT |
| 46 | |
| 47 | {%- if controller.backend is defined %} |
| 48 | |
| 49 | default_volume_type={{ controller.default_volume_type }} |
| 50 | |
| 51 | enabled_backends={% for backend_name, backend in controller.get('backend', {}).iteritems() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %} |
| 52 | |
| 53 | {%- endif %} |
| 54 | |
Michel Nederlof | 95a73eb | 2017-02-06 14:38:17 +0100 | [diff] [blame] | 55 | {%- if controller.storage_availability_zone is defined %} |
| 56 | storage_availability_zone={{controller.storage_availability_zone}} |
| 57 | {%- endif %} |
| 58 | |
| 59 | {%- if controller.default_availability_zone is defined %} |
| 60 | default_availability_zone={{controller.default_availability_zone}} |
| 61 | {%- endif %} |
| 62 | |
| 63 | |
Jakub Pavlik | 78517fb | 2016-10-20 14:53:34 +0200 | [diff] [blame] | 64 | #RPC response timeout recommended by Hitachi |
| 65 | rpc_response_timeout=3600 |
| 66 | |
| 67 | #Rabbit |
Jakub Pavlik | 78517fb | 2016-10-20 14:53:34 +0200 | [diff] [blame] | 68 | control_exchange=cinder |
| 69 | |
| 70 | |
| 71 | volume_clear={{ controller.wipe_method }} |
| 72 | |
| 73 | |
| 74 | |
| 75 | volume_name_template = volume-%s |
| 76 | |
| 77 | #volume_group = vg_cinder_volume |
| 78 | |
| 79 | volumes_dir = /var/lib/cinder/volumes |
| 80 | log_dir=/var/log/cinder |
| 81 | |
| 82 | # Use syslog for logging. (boolean value) |
| 83 | #use_syslog=false |
| 84 | |
| 85 | use_syslog=false |
| 86 | verbose=True |
| 87 | lock_path=/var/lock/cinder |
| 88 | |
Andrii Ostapenko | b7aa34d | 2017-04-20 14:22:44 +0300 | [diff] [blame] | 89 | {%- if controller.query_volume_filters is defined %} |
| 90 | query_volume_filters = {{ controller.query_volume_filters|join(",") }} |
| 91 | {%- endif %} |
| 92 | |
Jakub Pavlik | 78517fb | 2016-10-20 14:53:34 +0200 | [diff] [blame] | 93 | nova_catalog_admin_info = compute:nova:adminURL |
Jakub Pavlik | 196a21c | 2017-04-03 22:10:05 +0200 | [diff] [blame] | 94 | nova_catalog_info = compute:nova:{{ controller.identity.get('endpoint_type', 'publicURL') }} |
Jakub Pavlik | 78517fb | 2016-10-20 14:53:34 +0200 | [diff] [blame] | 95 | |
| 96 | osapi_volume_extension = cinder.api.contrib.standard_extensions |
| 97 | |
Kirill Bespalov | 01614c0 | 2017-07-31 17:06:09 +0300 | [diff] [blame] | 98 | {%- set rabbit_port = controller.message_queue.get('port', 5671 if controller.message_queue.get('ssl',{}).get('enabled', False) else 5672) %} |
Jakub Pavlik | 196a21c | 2017-04-03 22:10:05 +0200 | [diff] [blame] | 99 | {%- if controller.message_queue.members is defined %} |
| 100 | transport_url = rabbit://{% for member in controller.message_queue.members -%} |
Kirill Bespalov | 01614c0 | 2017-07-31 17:06:09 +0300 | [diff] [blame] | 101 | {{ controller.message_queue.user }}:{{ controller.message_queue.password }}@{{ member.host }}:{{ member.get('port',rabbit_port) }} |
Jakub Pavlik | 196a21c | 2017-04-03 22:10:05 +0200 | [diff] [blame] | 102 | {%- if not loop.last -%},{%- endif -%} |
Jakub Pavlik | 196a21c | 2017-04-03 22:10:05 +0200 | [diff] [blame] | 103 | {%- endfor -%} |
Jakub Pavlik | 3f092dd | 2017-04-06 21:31:34 +0200 | [diff] [blame] | 104 | /{{ controller.message_queue.virtual_host }} |
Jakub Pavlik | 196a21c | 2017-04-03 22:10:05 +0200 | [diff] [blame] | 105 | {%- else %} |
Kirill Bespalov | 01614c0 | 2017-07-31 17:06:09 +0300 | [diff] [blame] | 106 | transport_url = rabbit://{{ controller.message_queue.user }}:{{ controller.message_queue.password }}@{{ controller.message_queue.host }}:{{ rabbit_port }}/{{ controller.message_queue.virtual_host }} |
Jakub Pavlik | 196a21c | 2017-04-03 22:10:05 +0200 | [diff] [blame] | 107 | {%- endif %} |
| 108 | |
Ondrej Smola | ed6abbf | 2017-04-25 11:55:44 +0200 | [diff] [blame] | 109 | {%- if controller.backup.engine != None %} |
| 110 | {%- set backup_backend_fragment = "cinder/files/backup_backend/_" + controller.backup.engine + ".conf" %} |
| 111 | {%- include backup_backend_fragment %} |
| 112 | {%- endif %} |
Dmitry Stremkovskiy | ef4c7d0 | 2017-07-30 16:51:52 +0300 | [diff] [blame] | 113 | {%- if controller.nas_secure_file_permissions is defined %} |
| 114 | nas_secure_file_permissions={{ controller.nas_secure_file_permissions }} |
| 115 | {%- endif %} |
| 116 | {%- if controller.nas_secure_file_operations is defined %} |
| 117 | nas_secure_file_operations={{ controller.nas_secure_file_operations }} |
| 118 | {%- endif %} |
Dmitry Stremkovskiy | a5dd799 | 2017-07-30 19:54:23 +0300 | [diff] [blame] | 119 | {%- if controller.cinder_internal_tenant_user_id is defined %} |
| 120 | cinder_internal_tenant_user_id={{ controller.cinder_internal_tenant_user_id }} |
| 121 | {%- endif %} |
| 122 | {%- if controller.cinder_internal_tenant_project_id is defined %} |
| 123 | cinder_internal_tenant_project_id={{ controller.cinder_internal_tenant_project_id }} |
| 124 | {%- endif %} |
Ondrej Smola | ed6abbf | 2017-04-25 11:55:44 +0200 | [diff] [blame] | 125 | |
Jakub Pavlik | 78517fb | 2016-10-20 14:53:34 +0200 | [diff] [blame] | 126 | [oslo_messaging_notifications] |
Simon Pasquier | 8bb897e | 2016-11-30 10:52:12 +0100 | [diff] [blame] | 127 | {%- if controller.notification is mapping %} |
| 128 | driver = {{ controller.notification.get('driver', 'messagingv2') }} |
| 129 | {%- if controller.notification.topics is defined %} |
| 130 | topics = {{ controller.notification.topics }} |
| 131 | {%- endif %} |
| 132 | {%- elif controller.notification %} |
Jakub Pavlik | 78517fb | 2016-10-20 14:53:34 +0200 | [diff] [blame] | 133 | driver = messagingv2 |
| 134 | {%- endif %} |
| 135 | |
| 136 | [oslo_concurrency] |
| 137 | |
| 138 | lock_path=/var/lock/cinder |
| 139 | |
Jakub Pavlik | 196a21c | 2017-04-03 22:10:05 +0200 | [diff] [blame] | 140 | [oslo_middleware] |
Jakub Pavlik | 78517fb | 2016-10-20 14:53:34 +0200 | [diff] [blame] | 141 | |
Jakub Pavlik | 196a21c | 2017-04-03 22:10:05 +0200 | [diff] [blame] | 142 | enable_proxy_headers_parsing = True |
| 143 | |
Kirill Bespalov | 01614c0 | 2017-07-31 17:06:09 +0300 | [diff] [blame] | 144 | {%- if controller.message_queue.get('ssl',{}).get('enabled', False) %} |
Jakub Pavlik | 196a21c | 2017-04-03 22:10:05 +0200 | [diff] [blame] | 145 | [oslo_messaging_rabbit] |
Kirill Bespalov | 01614c0 | 2017-07-31 17:06:09 +0300 | [diff] [blame] | 146 | rabbit_use_ssl=true |
| 147 | |
| 148 | {%- if controller.message_queue.ssl.version is defined %} |
| 149 | kombu_ssl_version = {{ controller.message_queue.ssl.version }} |
| 150 | {%- elif salt['grains.get']('pythonversion') > [2,7,8] %} |
| 151 | kombu_ssl_version = TLSv1_2 |
| 152 | {%- endif %} |
| 153 | |
| 154 | {%- if controller.message_queue.ssl.cacert_file is defined %} |
| 155 | kombu_ssl_ca_certs = {{ controller.message_queue.ssl.cacert_file }} |
| 156 | {%- else %} |
| 157 | kombu_ssl_ca_certs={{ system_cacerts_file }} |
| 158 | {%- endif %} |
| 159 | {%- endif %} |
| 160 | |
Jakub Pavlik | 78517fb | 2016-10-20 14:53:34 +0200 | [diff] [blame] | 161 | |
| 162 | [keystone_authtoken] |
| 163 | signing_dir=/tmp/keystone-signing-cinder |
| 164 | revocation_cache_time = 10 |
| 165 | auth_type = password |
| 166 | user_domain_name = {{ controller.identity.get('domain', 'Default') }} |
| 167 | project_domain_name = {{ controller.identity.get('domain', 'Default') }} |
| 168 | project_name = {{ controller.identity.tenant }} |
| 169 | username = {{ controller.identity.user }} |
| 170 | password = {{ controller.identity.password }} |
| 171 | |
| 172 | auth_uri=http://{{ controller.identity.host }}:5000 |
| 173 | auth_url=http://{{ controller.identity.host }}:35357 |
| 174 | # Temporary disabled for backward compataiblity |
| 175 | #auth_uri=http://{{ controller.identity.host }}/identity |
| 176 | #auth_url=http://{{ controller.identity.host }}/identity_v2_admin |
| 177 | {%- if controller.cache is defined %} |
| 178 | memcached_servers={%- for member in controller.cache.members %}{{ member.host }}:11211{% if not loop.last %},{% endif %}{%- endfor %} |
| 179 | {%- endif %} |
Jakub Pavlik | 196a21c | 2017-04-03 22:10:05 +0200 | [diff] [blame] | 180 | auth_version = v3 |
| 181 | |
| 182 | [barbican] |
| 183 | auth_endpoint=http://{{ controller.identity.host }}:5000 |
Jakub Pavlik | 78517fb | 2016-10-20 14:53:34 +0200 | [diff] [blame] | 184 | |
| 185 | [database] |
| 186 | idle_timeout=3600 |
| 187 | max_pool_size=30 |
| 188 | max_retries=-1 |
| 189 | max_overflow=40 |
Jakub Pavlik | 3f092dd | 2017-04-06 21:31:34 +0200 | [diff] [blame] | 190 | connection = {{ controller.database.engine }}+pymysql://{{ controller.database.user }}:{{ controller.database.password }}@{{ controller.database.host }}/{{ controller.database.name }}?charset=utf8 |
Jakub Pavlik | 78517fb | 2016-10-20 14:53:34 +0200 | [diff] [blame] | 191 | |
| 192 | {%- if controller.backend is defined %} |
| 193 | |
| 194 | {%- for backend_name, backend in controller.get('backend', {}).iteritems() %} |
| 195 | |
| 196 | {%- set backend_fragment = "cinder/files/backend/_" + backend.engine + ".conf" %} |
| 197 | {%- include backend_fragment %} |
| 198 | |
| 199 | {%- endfor %} |
| 200 | |
| 201 | {%- endif %} |
Ondrej Smola | 74af21b | 2017-04-28 12:30:24 +0200 | [diff] [blame] | 202 | |
| 203 | [cors] |
| 204 | |
| 205 | # |
| 206 | # From oslo.middleware.cors |
| 207 | # |
| 208 | |
| 209 | # Indicate whether this resource may be shared with the domain |
| 210 | # received in the requests "origin" header. (list value) |
| 211 | #allowed_origin = <None> |
| 212 | {%- if controller.cors.allowed_origin is defined %} |
| 213 | allowed_origin = {{ controller.cors.allowed_origin }} |
| 214 | {%- endif %} |
| 215 | |
| 216 | # Indicate that the actual request can include user credentials |
| 217 | # (boolean value) |
| 218 | #allow_credentials = true |
| 219 | {%- if controller.cors.allow_credentials is defined %} |
| 220 | allow_credentials = {{ controller.cors.allow_credentials }} |
| 221 | {%- endif %} |
| 222 | |
| 223 | # Indicate which headers are safe to expose to the API. Defaults to |
| 224 | # HTTP Simple Headers. (list value) |
| 225 | #expose_headers = X-Image-Meta-Checksum,X-Auth-Token,X-Subject-Token,X-Service-Token,X-OpenStack-Request-ID |
| 226 | {%- if controller.cors.expose_headers is defined %} |
| 227 | expose_headers = {{ controller.cors.expose_headers }} |
| 228 | {%- endif %} |
| 229 | |
| 230 | # Maximum cache age of CORS preflight requests. (integer value) |
| 231 | #max_age = 3600 |
| 232 | {%- if controller.cors.max_age is defined %} |
| 233 | max_age = {{ controller.cors.max_age }} |
| 234 | {%- endif %} |
| 235 | |
| 236 | # Indicate which methods can be used during the actual request. (list |
| 237 | # value) |
| 238 | #allow_methods = GET,PUT,POST,DELETE,PATCH |
| 239 | {%- if controller.cors.allow_methods is defined %} |
| 240 | allow_methods = {{ controller.cors.allow_methods }} |
| 241 | {%- endif %} |
| 242 | |
| 243 | # Indicate which header field names may be used during the actual |
| 244 | # request. (list value) |
| 245 | #allow_headers = Content-MD5,X-Image-Meta-Checksum,X-Storage-Token,Accept-Encoding,X-Auth-Token,X-Identity-Status,X-Roles,X-Service-Catalog,X-User-Id,X-Tenant-Id,X-OpenStack-Request-ID |
| 246 | {%- if controller.cors.allow_headers is defined %} |
| 247 | allow_headers = {{ controller.cors.allow_headers }} |
| 248 | {%- endif %} |