Fix 'Address already in use' for barbican-api

By default barbican uwsgi is configured to listen all address on host
[1], we need to change this to the ip address of the host.

[1]:
https://github.com/openstack/barbican/blob/master/etc/barbican/vassals/barbican-api.ini

Change-Id: I4a1f9fb44ad55caf21f82c1b6d272a9743d65fd8
Closes-bug: #1632177
This commit is contained in:
liyingjun 2016-10-11 10:05:07 +08:00
parent b13b0aad05
commit cd0336658f
3 changed files with 26 additions and 1 deletions

View File

@ -5,7 +5,7 @@
state: "directory"
recurse: yes
with_items:
- "barbican-api"
- "barbican-api/vassals"
- "barbican-keystone-listener"
- "barbican-worker"
@ -18,6 +18,14 @@
- "barbican-worker"
- "barbican-keystone-listener"
- name: Copying over barbican-api.ini
merge_configs:
sources:
- "{{ role_path }}/templates/barbican-api.ini.j2"
- "{{ node_custom_config }}/barbican-api/barbican-api.ini"
- "{{ node_custom_config }}/barbican-api/{{ inventory_hostname }}/barbican-api.ini"
dest: "{{ node_config_directory }}/barbican-api/vassals/barbican-api.ini"
- name: Copying over barbican.conf
merge_configs:
vars:

View File

@ -0,0 +1,11 @@
[uwsgi]
socket = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ barbican_api_port }}
protocol = http
processes = {{ openstack_service_workers }}
lazy = true
vacuum = true
no-default-app = true
memory-report = true
plugins = python
paste = config:/etc/barbican/barbican-api-paste.ini
add-header = Connection: close

View File

@ -6,6 +6,12 @@
"dest": "/etc/barbican/barbican.conf",
"owner": "barbican",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/vassals/barbican-api.ini",
"dest": "/etc/barbican/vassals/barbican-api.ini",
"owner": "barbican",
"perm": "0600"
}
]
}