From a1291fdecdff3be551a4b490316dc833a6f0d1c2 Mon Sep 17 00:00:00 2001 From: Eduardo Gonzalez Date: Thu, 6 Jul 2017 12:25:56 +0200 Subject: [PATCH] Fix zun-api logging and state_path Zun-api is using app.wsgi as log filename. This change forzes zun-api.log to ease identification. Also changes group owner of log dir to kolla group. Remove glance version as is in zun's defaults Set state_path, this is where zun will store catched images, similar as nova cache. No need HA or volume as is only cached data. Change-Id: I20f8d311bfde1c0a07d7d35e9f1412c71efa8504 --- .../roles/common/templates/conf/filter/01-rewrite.conf.j2 | 2 +- ansible/roles/zun/templates/zun-api.json.j2 | 2 +- ansible/roles/zun/templates/zun-compute.json.j2 | 2 +- ansible/roles/zun/templates/zun.conf.j2 | 8 +++++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ansible/roles/common/templates/conf/filter/01-rewrite.conf.j2 b/ansible/roles/common/templates/conf/filter/01-rewrite.conf.j2 index 0039d80405..c677e2a779 100644 --- a/ansible/roles/common/templates/conf/filter/01-rewrite.conf.j2 +++ b/ansible/roles/common/templates/conf/filter/01-rewrite.conf.j2 @@ -25,6 +25,6 @@ rewriterule22 programname ^(watcher-api|watcher-applier|watcher-db-manage|watcher-decision-engine).* openstack_python rewriterule23 programname ^(freezer-api|freezer-api_access|freezer-manage).* openstack_python rewriterule24 programname ^(octavia-api|octavia-health-manager|octavia-housekeeping|octavia-worker).* openstack_python - rewriterule25 programname ^(zun-compute).* openstack_python + rewriterule25 programname ^(zun-api|zun-compute).* openstack_python rewriterule26 programname ^(kuryr-server).* openstack_python diff --git a/ansible/roles/zun/templates/zun-api.json.j2 b/ansible/roles/zun/templates/zun-api.json.j2 index 14feaf3bbf..db42aa81ba 100644 --- a/ansible/roles/zun/templates/zun-api.json.j2 +++ b/ansible/roles/zun/templates/zun-api.json.j2 @@ -26,7 +26,7 @@ "permissions": [ { "path": "/var/log/kolla/zun", - "owner": "zun:zun", + "owner": "zun:kolla", "recurse": true } ] diff --git a/ansible/roles/zun/templates/zun-compute.json.j2 b/ansible/roles/zun/templates/zun-compute.json.j2 index 4a92da5ced..21b04d7900 100644 --- a/ansible/roles/zun/templates/zun-compute.json.j2 +++ b/ansible/roles/zun/templates/zun-compute.json.j2 @@ -18,7 +18,7 @@ "permissions": [ { "path": "/var/log/kolla/zun", - "owner": "zun:zun", + "owner": "zun:kolla", "recurse": true } ] diff --git a/ansible/roles/zun/templates/zun.conf.j2 b/ansible/roles/zun/templates/zun.conf.j2 index df1e9c38ba..e9dbea4769 100644 --- a/ansible/roles/zun/templates/zun.conf.j2 +++ b/ansible/roles/zun/templates/zun.conf.j2 @@ -1,8 +1,15 @@ [DEFAULT] debug = {{ zun_logging_debug }} + +{% if service_name == 'zun-api' %} +# Force zun-api.log or will use app.wsgi +log_file = /var/log/kolla/zun/zun-api.log +{% endif %} + log_dir = /var/log/kolla/zun transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{% if orchestration_engine == 'KUBERNETES' %}rabbitmq{% else %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}{% endif %}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} +state_path = /var/lib/zun container_driver = docker.driver.DockerDriver image_driver_list = glance db_type = sql @@ -67,7 +74,6 @@ username = {{ zun_keystone_user }} password = {{ zun_keystone_password }} region_name = {{ openstack_region_name }} endpoint_type = internalURL -api_version = 2 [neutron_client] auth_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }}