Align novajoin container logging to other services

novajoin container was logging to stdout, not to a file in
bind mounted '/var/log/container' like other services
in tripleo.

Closes-Bug: #1796658
Change-Id: I6614f5d749b65401c44fe5a7dc98f56d55aaf6c1
This commit is contained in:
Harald Jensås 2018-10-08 13:23:10 +02:00
parent ec227891bd
commit 29a53d9eb2
2 changed files with 25 additions and 2 deletions

View File

@ -166,9 +166,9 @@ outputs:
config_image: {get_param: DockerNovajoinConfigImage} config_image: {get_param: DockerNovajoinConfigImage}
kolla_config: kolla_config:
/var/lib/kolla/config_files/novajoin_server.json: /var/lib/kolla/config_files/novajoin_server.json:
command: novajoin-server --log-file /dev/stdout --config-file /etc/novajoin/join.conf command: novajoin-server --config-file /etc/novajoin/join.conf
/var/lib/kolla/config_files/novajoin_notifier.json: /var/lib/kolla/config_files/novajoin_notifier.json:
command: novajoin-notify --log-file /dev/stdout --config-file /etc/novajoin/join.conf command: novajoin-notify --config-file /etc/novajoin/join.conf
docker_config: docker_config:
step_4: step_4:
novajoin_server: novajoin_server:
@ -185,6 +185,7 @@ outputs:
- /var/lib/config-data/novajoin/etc/novajoin/join.conf:/etc/novajoin/join.conf:z - /var/lib/config-data/novajoin/etc/novajoin/join.conf:/etc/novajoin/join.conf:z
- /etc/ipa/:/etc/ipa/:ro - /etc/ipa/:/etc/ipa/:ro
- /etc/novajoin/krb5.keytab:/etc/novajoin/krb5.keytab:ro - /etc/novajoin/krb5.keytab:/etc/novajoin/krb5.keytab:ro
- /var/log/containers/novajoin:/var/log/novajoin
environment: environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
- KRB5_CONFIG=/etc/novajoin/krb5.conf - KRB5_CONFIG=/etc/novajoin/krb5.conf
@ -202,6 +203,7 @@ outputs:
- /var/lib/config-data/novajoin/etc/novajoin/join.conf:/etc/novajoin/join.conf:Z - /var/lib/config-data/novajoin/etc/novajoin/join.conf:/etc/novajoin/join.conf:Z
- /etc/ipa/:/etc/ipa/:ro - /etc/ipa/:/etc/ipa/:ro
- /etc/novajoin/krb5.keytab:/etc/novajoin/krb5.keytab:ro - /etc/novajoin/krb5.keytab:/etc/novajoin/krb5.keytab:ro
- /var/log/containers/novajoin:/var/log/novajoin
environment: environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
- KRB5_CONFIG=/etc/novajoin/krb5.conf - KRB5_CONFIG=/etc/novajoin/krb5.conf
@ -214,6 +216,20 @@ outputs:
set_fact: set_fact:
ipa_otp: {get_param: NovajoinIpaOtp} ipa_otp: {get_param: NovajoinIpaOtp}
no_log: true no_log: true
- name: create persistent directories
file:
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- { 'path': /var/log/containers/novajoin, 'setype': svirt_sandbox_file_t }
- name: novajoin logs readme
copy:
dest: /var/log/novajoin/readme.txt
content: |
Log files from novajoin containers can be found under
/var/log/containers/novajoin
ignore_errors: true
- name: Enroll to FreeIPA - name: Enroll to FreeIPA
command: ipa-client-install -U --password={{ ipa_otp }} command: ipa-client-install -U --password={{ ipa_otp }}
args: args:

View File

@ -0,0 +1,7 @@
---
fixes:
- |
Novajoin now log's to ``/var/log/container`` in the same way other TripleO
container services do. See `Bug: 1796658
<https://bugs.launchpad.net/tripleo/+bug/1796658>`_.