Browse Source

[train] mysql: adjust CLI args based on container cli

k8s-file log driver only exists for podman, such as log-opt path option.
For docker, we'll use syslogd log driver.

Note: this patch is only done for train and stein, where we still
support Docker.

Change-Id: Ie47e1cd81b25914d28ac63668817ce6237e2e8a9
Closes-Bug: #1898610
changes/49/756149/5
Emilien Macchi 8 months ago
parent
commit
f35c345509
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      deployment/database/mysql-pacemaker-puppet.yaml

+ 6
- 2
deployment/database/mysql-pacemaker-puppet.yaml View File

@ -580,15 +580,19 @@ outputs:
shell:
str_replace:
template:
'CONTAINER_CLI run --rm --log-driver=k8s-file --log-opt path=LOG_DIR/db-upgrade.log \
'CONTAINER_CLI run --rm CONTAINER_CLI_EXTRA_ARGS \
-u root --net=host UPGRADE_ENV UPGRADE_VOLUMES "UPGRADE_IMAGE" /bin/bash -ecx "UPGRADE_SCRIPT"'
params:
CONTAINER_CLI_EXTRA_ARGS:
if:
- docker_enabled
- '--log-driver=syslog'
- '--log-driver=k8s-file --log-opt path=/var/log/containers/mysql/db-upgrade.log'
UPGRADE_ENV: '-e "KOLLA_CONFIG_STRATEGY=COPY_ALWAYS"'
UPGRADE_IMAGE: *mysql_image_pcmklatest
UPGRADE_VOLUMES: "-v {{ mysql_upgrade_db_bind_mounts | union(['/tmp/mariadb-upgrade:/var/log/mariadb:rw,z']) | join(' -v ')}}"
UPGRADE_SCRIPT: "{{mysql_upgrade_script}}"
CONTAINER_CLI: "{{ container_cli }}"
LOG_DIR: '/var/log/containers/mysql'
external_upgrade_tasks:
# https://bugs.launchpad.net/tripleo/+bug/1753247


Loading…
Cancel
Save