From cd193a53aad2f7940551c21155dacf1a02a99b06 Mon Sep 17 00:00:00 2001 From: Artem Goncharov Date: Tue, 20 Jul 2021 17:50:29 +0200 Subject: [PATCH] tune logging in the container (#32) tune logging in the container Reviewed-by: None Reviewed-by: OpenTelekomCloud Bot --- .dockerignore | 4 ++++ .zuul.yaml | 15 ++++++++++----- Dockerfile | 3 ++- etc/octavia_proxy.conf | 1 + 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.dockerignore b/.dockerignore index 92c57501..73917c53 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,3 +2,7 @@ .stestr octavia_proxy.egg-info .eggs +.zuul.yaml +doc +build +releasenotes diff --git a/.zuul.yaml b/.zuul.yaml index 07ac070a..2d2d5e37 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -5,7 +5,7 @@ Execute tests with latest dependencies required-projects: - name: opentelekomcloud/python-otcextensions - override-checkout: elb + override-checkout: master - job: name: octavia-proxy-build-image @@ -13,21 +13,26 @@ description: Build octavia-proxy container image timeout: 2700 # 45 minutes provides: octavia-proxy-container-image + required-projects: + - name: opentelekomcloud/python-otcextensions + override-checkout: master vars: &octavia-proxy_image_vars + zuul_work_dir: "{{ zuul.projects['github.com/opentelekomcloud-infra/octavia-proxy'].src_dir }}" docker_images: - context: . repository: opentelekomcloud/octavia-proxy tags: - # If zuul.tag is defined: [ '3', '3.19', '3.19.0' ]. Only works for 3-component tags. - # Otherwise: ['latest'] &imagetag "{{ zuul.tag is defined | ternary([zuul.get('tag', '').split('.')[0], '.'.join(zuul.get('tag', '').split('.')[:2]), zuul.get('tag', '')], ['latest']) }}" - siblings: - - opentelekomcloud/python-otcextensions + siblings: + - github.com/opentelekomcloud/python-otcextensions - job: name: octavia-proxy-upload-image parent: otcinfra-upload-image-quay provides: octavia-proxy-container-image + required-projects: + - name: opentelekomcloud/python-otcextensions + override-checkout: master vars: *octavia-proxy_image_vars - project: diff --git a/Dockerfile b/Dockerfile index ae4d5ae2..14fd87d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ FROM docker.io/opendevorg/python-builder:3.9 as builder ENV DEBIAN_FRONTEND=noninteractive +ARG ZUUL_SIBLINGS="" COPY . /tmp/src RUN echo "gunicorn" >> /tmp/src/requirements.txt RUN assemble @@ -33,6 +34,6 @@ RUN /output/install-from-bindep \ VOLUME /var/lib/octavia_proxy USER 10001 -EXPOSE 9876 CMD ["gunicorn", "-b 0.0.0.0:9876", \ + "--access-logfile", "-", \ "octavia_proxy.api.app:setup_app(argv=[])"] diff --git a/etc/octavia_proxy.conf b/etc/octavia_proxy.conf index 0a5b1520..ef491751 100644 --- a/etc/octavia_proxy.conf +++ b/etc/octavia_proxy.conf @@ -1,6 +1,7 @@ [DEFAULT] # Print debugging output (set logging level to DEBUG instead of default WARNING level). # debug = False +log_level = INFO # Plugin options are hot_plug_plugin (Hot-pluggable controller plugin) # octavia_plugins = hot_plug_plugin