Merge "Configure ODL Logging mechanism"

This commit is contained in:
Zuul 2018-01-17 12:48:08 +00:00 committed by Gerrit Code Review
commit 750fa306ce
4 changed files with 16 additions and 5 deletions

View File

@ -72,7 +72,7 @@ outputs:
config_image: {get_param: DockerOpendaylightConfigImage} config_image: {get_param: DockerOpendaylightConfigImage}
kolla_config: kolla_config:
/var/lib/kolla/config_files/opendaylight_api.json: /var/lib/kolla/config_files/opendaylight_api.json:
command: /opt/opendaylight/bin/karaf command: /opt/opendaylight/bin/karaf server
config_files: config_files:
- source: "/var/lib/kolla/config_files/src/*" - source: "/var/lib/kolla/config_files/src/*"
dest: "/" dest: "/"
@ -100,7 +100,6 @@ outputs:
- -
- /var/lib/kolla/config_files/opendaylight_api.json:/var/lib/kolla/config_files/config.json:ro - /var/lib/kolla/config_files/opendaylight_api.json:/var/lib/kolla/config_files/config.json:ro
- /var/lib/config-data/puppet-generated/opendaylight/:/var/lib/kolla/config_files/src:ro - /var/lib/config-data/puppet-generated/opendaylight/:/var/lib/kolla/config_files/src:ro
- /var/log/containers/opendaylight:/opt/opendaylight/data/log
- /var/lib/opendaylight/journal:/opt/opendaylight/journal - /var/lib/opendaylight/journal:/opt/opendaylight/journal
- /var/lib/opendaylight/snapshots:/opt/opendaylight/snapshots - /var/lib/opendaylight/snapshots:/opt/opendaylight/snapshots
environment: environment:
@ -111,15 +110,13 @@ outputs:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
with_items: with_items:
- /var/log/containers/opendaylight
- /var/lib/opendaylight/snapshots - /var/lib/opendaylight/snapshots
- /var/lib/opendaylight/journal - /var/lib/opendaylight/journal
- name: opendaylight logs readme - name: opendaylight logs readme
copy: copy:
dest: /var/log/opendaylight/readme.txt dest: /var/log/opendaylight/readme.txt
content: | content: |
Log files from opendaylight containers can be found under Logs from opendaylight container can be found by running "docker logs opendaylight_api"
/var/log/containers/opendaylight.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- name: Check if opendaylight is deployed - name: Check if opendaylight is deployed

View File

@ -13,3 +13,4 @@ parameter_defaults:
NeutronPluginExtensions: 'port_security' NeutronPluginExtensions: 'port_security'
NeutronMechanismDrivers: 'opendaylight_v2' NeutronMechanismDrivers: 'opendaylight_v2'
NeutronServicePlugins: 'odl-router_v2,trunk' NeutronServicePlugins: 'odl-router_v2,trunk'
OpenDaylightLogMechanism: 'console'

View File

@ -66,6 +66,14 @@ parameters:
- allowed_values: - allowed_values:
- conntrack - conntrack
- controller - controller
OpenDaylightLogMechanism:
description: Logging mechanism to be used
default: 'file'
type: string
constraints:
- allowed_values:
- file
- console
outputs: outputs:
role_data: role_data:
@ -89,6 +97,7 @@ outputs:
- 2550 - 2550
- 8185 - 8185
opendaylight::snat_mechanism: {get_param: OpenDaylightSNATMechanism} opendaylight::snat_mechanism: {get_param: OpenDaylightSNATMechanism}
opendaylight::log_mechanism: {get_param: OpenDaylightLogMechanism}
step_config: | step_config: |
include tripleo::profile::base::neutron::opendaylight include tripleo::profile::base::neutron::opendaylight
upgrade_tasks: upgrade_tasks:

View File

@ -0,0 +1,4 @@
---
features:
- Configure ODL to log karaf logs to file for non-containarised deployment and
to console for containarised deployment.