Merge "Add the ability to offload amphora logs" into stable/train

This commit is contained in:
Zuul 2020-06-10 17:05:44 +00:00 committed by Gerrit Code Review
commit ed55876d5e
3 changed files with 77 additions and 18 deletions

View File

@ -185,6 +185,12 @@ parameters:
description: CLI tool used to manage containers. description: CLI tool used to manage containers.
constraints: constraints:
- allowed_values: ['docker', 'podman'] - allowed_values: ['docker', 'podman']
OctaviaLogOffload:
default: false
description: When true, log messages from the amphora will be forwarded
to the administrative log endponts and will be stored with
the controller logs.
type: boolean
conditions: conditions:
octavia_raw_image_check: octavia_raw_image_check:
@ -251,6 +257,7 @@ resources:
octavia_local_tmpdir: "{{playbook_dir}}/octavia-ansible/local_dir" octavia_local_tmpdir: "{{playbook_dir}}/octavia-ansible/local_dir"
octavia_group_vars_dir: "{{playbook_dir}}/octavia-ansible/group_vars" octavia_group_vars_dir: "{{playbook_dir}}/octavia-ansible/group_vars"
container_cli: { get_param: ContainerCli } container_cli: { get_param: ContainerCli }
enable_log_offloading: { get_param: OctaviaLogOffload }
outputs: outputs:
role_data: role_data:

View File

@ -10,6 +10,9 @@ parameters:
ContainerOctaviaConfigImage: ContainerOctaviaConfigImage:
description: The container image to use for the octavia config_volume description: The container image to use for the octavia config_volume
type: string type: string
ContainerOctaviaRsyslogImage:
description: The container image to use for the rsyslog-sidecar
type: string
OctaviaHealthManagerLoggingSource: OctaviaHealthManagerLoggingSource:
type: json type: json
default: default:
@ -54,6 +57,16 @@ parameters:
description: Name of the octavia management network interface using description: Name of the octavia management network interface using
for communication between octavia worker/health-manager for communication between octavia worker/health-manager
with the amphora machine. with the amphora machine.
OctaviaLogOffload:
default: false
description: When true, log messages from the amphora will be forwarded
to the administrative log endponts and will be stored with
the controller logs.
type: boolean
conditions:
log_offload_enabled: {equals: [{get_param: OctaviaLogOffload}, true]}
resources: resources:
@ -88,6 +101,10 @@ outputs:
proto: udp proto: udp
dport: 5555 dport: 5555
iniface: {get_param: OctaviaMgmtPortDevName} iniface: {get_param: OctaviaMgmtPortDevName}
'210 octavia lb-mgmt-net offload rsyslog':
proto: udp
dport: 514
iniface: {get_param: OctaviaMgmtPortDevName}
service_config_settings: service_config_settings:
rsyslog: rsyslog:
tripleo_logging_sources_octavia_health_manager: tripleo_logging_sources_octavia_health_manager:
@ -114,6 +131,17 @@ outputs:
- path: /var/log/octavia - path: /var/log/octavia
owner: octavia:octavia owner: octavia:octavia
recurse: true recurse: true
/var/lib/kolla/config_files/octavia_rsyslog.json:
command: /usr/sbin/rsyslogd -n
config_files:
- source: "/var/lib/kolla/config_files/src/*"
dest: "/"
merge: true
preserve_properties: true
permissions:
- path: /var/log/octavia
owner: octavia:octavia
recurse: true
docker_config: docker_config:
step_2: step_2:
octavia_health_manager_init_dirs: octavia_health_manager_init_dirs:
@ -130,24 +158,44 @@ outputs:
- /var/lib/config-data/puppet-generated/octavia/etc/octavia:/etc/octavia/:z - /var/lib/config-data/puppet-generated/octavia/etc/octavia:/etc/octavia/:z
command: ['/bin/bash', '-c', 'mkdir -p /etc/octavia/conf.d/octavia-health-manager; chown -R octavia:octavia /etc/octavia/conf.d/octavia-health-manager'] command: ['/bin/bash', '-c', 'mkdir -p /etc/octavia/conf.d/octavia-health-manager; chown -R octavia:octavia /etc/octavia/conf.d/octavia-health-manager']
step_5: step_5:
octavia_health_manager: map_merge:
start_order: 2 - octavia_health_manager:
stop_grace_period: 300 start_order: 2
image: *octavia_health_manager_image stop_grace_period: 300
net: host image: *octavia_health_manager_image
privileged: false net: host
restart: always privileged: false
healthcheck: restart: always
test: /openstack/healthcheck healthcheck:
volumes: test: /openstack/healthcheck
list_concat: volumes:
- {get_attr: [ContainersCommon, volumes]} list_concat:
- - {get_attr: [ContainersCommon, volumes]}
- /var/lib/kolla/config_files/octavia_health_manager.json:/var/lib/kolla/config_files/config.json:ro -
- /var/lib/config-data/puppet-generated/octavia:/var/lib/kolla/config_files/src:ro - /var/lib/kolla/config_files/octavia_health_manager.json:/var/lib/kolla/config_files/config.json:ro
- /var/log/containers/octavia:/var/log/octavia:z - /var/lib/config-data/puppet-generated/octavia:/var/lib/kolla/config_files/src:ro
environment: - /var/log/containers/octavia:/var/log/octavia:z
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS environment:
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
- if:
- log_offload_enabled
- octavia_rsyslog:
start_order: 2
image: {get_param: ContainerOctaviaRsyslogImage}
net: host
privileged: false
restart: always
volumes:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- /var/lib/kolla/config_files/octavia_rsyslog.json:/var/lib/kolla/config_files/config.json:ro
- /var/lib/config-data/puppet-generated/octavia:/var/lib/kolla/config_files/src:ro
- /var/log/containers/octavia:/var/log/octavia:z
environment:
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
- {}
host_prep_tasks: host_prep_tasks:
- name: create persistent directories - name: create persistent directories
file: file:

View File

@ -0,0 +1,4 @@
---
features:
- |
Adds the "OctaviaLogOffload" setting to enable amphora log offloading.