Skip to content

Commit

Permalink
Merge "mariadb: switch to use mariadb flavored commands"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Dec 3, 2024
2 parents c7b4cfa + 065bc80 commit 97e69bc
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ansible/roles/mariadb/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
become: true
command: >-
{{ kolla_container_engine }} exec {{ mariadb_service.container_name }}
mysql -uroot -p{{ database_password }}
mariadb -uroot -p{{ database_password }}
--silent --skip-column-names
-e 'SHOW STATUS LIKE "wsrep_local_state_comment"'
changed_when: false
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/mariadb/tasks/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
become: true
command: >
{{ kolla_container_engine }} exec {{ mariadb_service.container_name }}
mysql -h {{ database_address }} -P {{ database_port }}
mariadb -h {{ database_address }} -P {{ database_port }}
-u {{ mariadb_shard_database_user }} -p{{ database_password }} -e 'show databases;'
register: result
until: result is success
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/mariadb/tasks/lookup_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
become: true
command: >-
{{ kolla_container_engine }} exec {{ mariadb_service.container_name }}
mysql -uroot -p{{ database_password }}
mariadb -uroot -p{{ database_password }}
--silent --skip-column-names
-e 'SHOW STATUS LIKE "wsrep_local_state_comment"'
changed_when: false
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/mariadb/tasks/recover_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@

- name: Set first MariaDB container as primary
become: true
shell: "{{ kolla_container_engine }} exec {{ mariadb_service.container_name }} mysql -uroot -p{{ database_password }} -e \"SET GLOBAL wsrep_provider_options='pc.bootstrap=yes';\""
shell: "{{ kolla_container_engine }} exec {{ mariadb_service.container_name }} mariadb -uroot -p{{ database_password }} -e \"SET GLOBAL wsrep_provider_options='pc.bootstrap=yes';\""
no_log: True
when:
- bootstrap_host is defined
Expand All @@ -156,7 +156,7 @@
become: true
command: >-
{{ kolla_container_engine }} exec {{ mariadb_service.container_name }}
mysql -uroot -p{{ database_password }}
mariadb -uroot -p{{ database_password }}
--silent --skip-column-names
-e 'SHOW STATUS LIKE "wsrep_evs_state"'
changed_when: false
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/mariadb/tasks/restart_services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
become: true
command: >-
{{ kolla_container_engine }} exec {{ mariadb_service.container_name }}
mysql -uroot -p{{ database_password }}
mariadb -uroot -p{{ database_password }}
-h {{ api_interface_address }} -P {{ mariadb_port }}
--silent --skip-column-names
-e 'SHOW STATUS LIKE "wsrep_local_state_comment"'
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/mariadb/templates/mariadb.json.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% set mysql_dir = 'mysql' if kolla_base_distro in ['ubuntu', 'debian'] else '' %}
{
"command": "/usr/bin/mysqld_safe",
"command": "/usr/bin/mariadbd-safe",
"config_files": [
{
"source": "{{ container_config_directory }}/galera.cnf",
Expand Down

0 comments on commit 97e69bc

Please sign in to comment.