Merge "Fix cinder-api ubuntu binary deploy"
This commit is contained in:
commit
cec609f225
@ -21,6 +21,9 @@
|
|||||||
or cinder_conf.changed | bool
|
or cinder_conf.changed | bool
|
||||||
or policy_json.changed | bool
|
or policy_json.changed | bool
|
||||||
or cinder_api_container.changed | bool
|
or cinder_api_container.changed | bool
|
||||||
|
or (kolla_base_distro in ['debian', 'ubuntu']
|
||||||
|
and kolla_install_type == 'binary'
|
||||||
|
and wsgi_cinder_api | changed)
|
||||||
|
|
||||||
- name: Restart cinder-scheduler container
|
- name: Restart cinder-scheduler container
|
||||||
vars:
|
vars:
|
||||||
|
@ -24,6 +24,25 @@
|
|||||||
- Restart cinder-volume container
|
- Restart cinder-volume container
|
||||||
- Restart cinder-backup container
|
- Restart cinder-backup container
|
||||||
|
|
||||||
|
- name: Copying over cinder-wsgi.conf
|
||||||
|
vars:
|
||||||
|
service: "{{ cinder_services['cinder-api'] }}"
|
||||||
|
template:
|
||||||
|
src: "{{ item }}"
|
||||||
|
dest: "{{ node_config_directory }}/cinder-api/cinder-wsgi.conf"
|
||||||
|
with_first_found:
|
||||||
|
- "{{ node_custom_config }}/cinder/{{ inventory_hostname }}/cinder-wsgi.conf"
|
||||||
|
- "{{ node_custom_config }}/cinder/cinder-wsgi.conf"
|
||||||
|
- "cinder-wsgi.conf.j2"
|
||||||
|
register: wsgi_cinder_api
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[service.group]
|
||||||
|
- service.enabled | bool
|
||||||
|
- kolla_base_distro in ['debian', 'ubuntu']
|
||||||
|
- kolla_install_type == 'binary'
|
||||||
|
notify:
|
||||||
|
- Restart cinder-api container
|
||||||
|
|
||||||
- name: Copying over cinder.conf
|
- name: Copying over cinder.conf
|
||||||
merge_configs:
|
merge_configs:
|
||||||
vars:
|
vars:
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
{% set command = '/usr/sbin/apache2 -DFOREGROUND' if kolla_base_distro in ['ubuntu', 'debian'] and kolla_install_type == 'binary' else 'cinder-api --config-file /etc/cinder/cinder.conf' %}
|
||||||
{
|
{
|
||||||
"command": "cinder-api --config-file /etc/cinder/cinder.conf",
|
"command": "{{ command }}",
|
||||||
"config_files": [
|
"config_files": [
|
||||||
{
|
{
|
||||||
"source": "{{ container_config_directory }}/cinder.conf",
|
"source": "{{ container_config_directory }}/cinder.conf",
|
||||||
@ -13,7 +14,13 @@
|
|||||||
"owner": "cinder",
|
"owner": "cinder",
|
||||||
"perm": "0600",
|
"perm": "0600",
|
||||||
"optional": true
|
"optional": true
|
||||||
}
|
}{% if kolla_base_distro in ['ubuntu', 'debian'] and kolla_install_type == 'binary' %},
|
||||||
|
{
|
||||||
|
"source": "{{ container_config_directory }}/cinder-wsgi.conf",
|
||||||
|
"dest": "/etc/apache2/conf-enabled/cinder-wsgi.conf",
|
||||||
|
"owner": "cinder",
|
||||||
|
"perm": "0600"
|
||||||
|
}{% endif %}
|
||||||
],
|
],
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
|
15
ansible/roles/cinder/templates/cinder-wsgi.conf.j2
Normal file
15
ansible/roles/cinder/templates/cinder-wsgi.conf.j2
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{% set python_path = '/usr/lib/python2.7/site-packages' if kolla_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %}
|
||||||
|
Listen {{ api_interface_address }}:{{ cinder_api_port }}
|
||||||
|
|
||||||
|
<VirtualHost *:{{ cinder_api_port }}>
|
||||||
|
WSGIDaemonProcess cinder-api processes={{ openstack_service_workers }} threads=1 user=cinder group=cinder display-name=%{GROUP} python-path={{ python_path }}
|
||||||
|
WSGIProcessGroup cinder-api
|
||||||
|
WSGIScriptAlias / /var/www/cgi-bin/cinder/cinder-wsgi
|
||||||
|
WSGIApplicationGroup %{GLOBAL}
|
||||||
|
WSGIPassAuthorization On
|
||||||
|
<IfVersion >= 2.4>
|
||||||
|
ErrorLogFormat "%{cu}t %M"
|
||||||
|
</IfVersion>
|
||||||
|
ErrorLog /var/log/kolla/cinder/cinder-api.log
|
||||||
|
CustomLog /var/log/kolla/cinder/cinder-api-access.log combined
|
||||||
|
</VirtualHost>
|
@ -1,7 +1,7 @@
|
|||||||
<match kolla.var.log.kolla.*.*.log>
|
<match kolla.var.log.kolla.*.*.log>
|
||||||
@type rewrite_tag_filter
|
@type rewrite_tag_filter
|
||||||
capitalize_regex_backreference yes
|
capitalize_regex_backreference yes
|
||||||
rewriterule1 programname ^(horizon-access|ceilometer-api-access|keystone-apache-admin-access|keystone-apache-public-access)$ apache_access
|
rewriterule1 programname ^(horizon-access|ceilometer-api-access|keystone-apache-admin-access|keystone-apache-public-access|cinder-api-access)$ apache_access
|
||||||
rewriterule2 programname ^aodh_wsgi_access$ wsgi_access
|
rewriterule2 programname ^aodh_wsgi_access$ wsgi_access
|
||||||
rewriterule3 programname ^(nova-api|nova-compute|nova-conductor|nova-consoleauth|nova-manage|nova-novncproxy|nova-scheduler|nova-placement-api|placement-api|placement-api-access|privsep-helper).* openstack_python
|
rewriterule3 programname ^(nova-api|nova-compute|nova-conductor|nova-consoleauth|nova-manage|nova-novncproxy|nova-scheduler|nova-placement-api|placement-api|placement-api-access|privsep-helper).* openstack_python
|
||||||
rewriterule4 programname ^(sahara-api|sahara-engine).* openstack_python
|
rewriterule4 programname ^(sahara-api|sahara-engine).* openstack_python
|
||||||
|
Loading…
Reference in New Issue
Block a user