[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
(cherry picked from commit f35c345509
)
This commit is contained in:
parent
65cb1808e9
commit
9f9173da38
|
@ -605,15 +605,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:
|
||||
- vars:
|
||||
|
|
Loading…
Reference in New Issue