kolla-ansible 13.0.0.0rc1 maria-db won't get live

Bug #1947534 reported by Vahid Alimohamadi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
Fix Released
Medium
Unassigned

Bug Description

TASK [mariadb : Check MariaDB service port liveness] ************************************************
fatal: [localhost]: FAILED! => {"changed": false, "elapsed": 10, "msg": "Timeout when waiting for search string MariaDB in 192.168.54.12:3306"}

then stuck at
RUNNING HANDLER [mariadb : Wait for first MariaDB service port liveness]
and count down to zero and failure.

I tried to access mariadb using mysql client and got timeout but there's no error log from container:

mariadb image:
quay.io/openstack.kolla/ubuntu-source-mariadb-server xena eb5e1822ecce 18 hours ago 624MB

mariadb container log output:

...
INFO:__main__:Setting permission for /var/lib/mysql/mysql/time_zone.MAI
INFO:__main__:Setting permission for /var/lib/mysql/mysql/index_stats.MAD
INFO:__main__:Setting permission for /var/lib/mysql/mysql/procs_priv.MAI
INFO:__main__:Setting permission for /var/lib/mysql/mysql/servers.frm
INFO:__main__:Setting permission for /var/lib/mysql/performance_schema/db.opt
++ cat /run_command
+ CMD=/usr/bin/mysqld_safe
+ ARGS=
+ sudo kolla_copy_cacerts
+ [[ ! -n '' ]]
+ . kolla_extend_start
++ : /var/log/kolla/mariadb
++ [[ ! -d /var/log/kolla/mariadb ]]
+++ stat -c %a /var/log/kolla/mariadb
++ [[ 2755 != \7\5\5 ]]
++ chmod 755 /var/log/kolla/mariadb
++ [[ -n '' ]]
++ [[ -n '' ]]
++ [[ -n 0 ]]
++ ARGS=--wsrep-new-cluster
+ echo 'Running command: '\''/usr/bin/mysqld_safe --wsrep-new-cluster'\'''
+ exec /usr/bin/mysqld_safe --wsrep-new-cluster
Running command: '/usr/bin/mysqld_safe --wsrep-new-cluster'
211018 00:30:19 mysqld_safe Logging to '/var/log/kolla/mariadb/mariadb.log'.
211018 00:30:19 mysqld_safe Starting mariadbd daemon with databases from /var/lib/mysql/

OS:
I tried on CentOS 8 stream, ubuntu 20.04 LTS and ubuntu 21.04 LTS HP G7 bare-metal.
Kernel: Linux os 5.11.0-37-generic #41-Ubuntu SMP Mon Sep 20 16:39:20 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
kolla-ansible version: 13.0.0.0rc1 all-in-one
Docker version:20.10.9, build c2ea9bc

kolla global.conf:

config_strategy: "COPY_ALWAYS"
kolla_base_distro: "ubuntu"
kolla_install_type: "source"
openstack_release: "xena"
kolla_internal_vip_address: "192.168.54.12"
network_interface: eno1
neutron_external_interface: eno2
neutron_plugin_agent: "openvswitch"
enable_haproxy: "no"
enable_ceilometer: "yes"
enable_cinder: "yes"
enable_cinder_backup: "no"
enable_cinder_backend_lvm: "no"
enable_cloudkitty: "yes"
enable_gnocchi: "yes"
enable_neutron_provider_networks: "yes"
ceph_cinder_keyring: "ceph.client.admin.keyring"
ceph_cinder_user: "admin"
ceph_cinder_pool_name: "volumes"
fernet_token_expiry: 86400
cinder_backend_ceph: "yes"
cinder_volume_group: "volumes"
nova_compute_virt_type: "kvm"
nova_console: "novnc"

This config works on kolla 12.2.0 and wallaby release but those images are on dockerhub not quay.io

tags: added: all-in-one
tags: added: mult-node
description: updated
description: updated
Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

What's in mariadb logs?

Changed in kolla-ansible:
status: New → Incomplete
Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

The path is in the error report, just need to include its contents: /var/log/kolla/mariadb/mariadb.log

Revision history for this message
Vahid Alimohamadi (cybercoder) wrote :
Download full text (12.6 KiB)

mariadb log:

2021-10-18 9:56:41 1 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1017: Can't find file: './mysql/' (errno: 2 "No such file or directory")
211018 09:56:42 mysqld_safe Starting mariadbd daemon with databases from /var/lib/mysql/
2021-10-18 9:56:42 0 [Note] /usr/sbin/mariadbd (mysqld 10.5.12-MariaDB-1:10.5.12+maria~focal-log) starting as process 264 ...
2021-10-18 9:56:42 0 [Note] InnoDB: Uses event mutexes
2021-10-18 9:56:42 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-10-18 9:56:42 0 [Note] InnoDB: Number of pools: 1
2021-10-18 9:56:42 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2021-10-18 9:56:42 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
2021-10-18 9:56:42 0 [Note] InnoDB: Using Linux native AIO
2021-10-18 9:56:42 0 [Note] InnoDB: Initializing buffer pool, total size = 8589934592, chunk size = 134217728
2021-10-18 9:56:43 0 [Note] InnoDB: Completed initialization of buffer pool
2021-10-18 9:56:43 0 [Note] InnoDB: 128 rollback segments are active.
2021-10-18 9:56:43 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-10-18 9:56:43 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-10-18 9:56:43 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2021-10-18 9:56:43 0 [Note] InnoDB: 10.5.12 started; log sequence number 45094; transaction id 20
2021-10-18 9:56:43 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2021-10-18 9:56:43 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-10-18 9:56:43 0 [Note] InnoDB: Buffer pool(s) load completed at 211018 9:56:43
2021-10-18 9:56:43 0 [Note] Reading of all Master_info entries succeeded
2021-10-18 9:56:43 0 [Note] Added new Master_info '' to hash table
2021-10-18 9:56:43 0 [Note] /usr/sbin/mariadbd: ready for connections.
Version: '10.5.12-MariaDB-1:10.5.12+maria~focal-log' socket: '/run/mysqld/mysqld.sock' port: 0 mariadb.org binary distribution
2021-10-18 9:56:43 0 [Note] /usr/sbin/mariadbd (initiated by: root[root] @ localhost []): Normal shutdown
2021-10-18 9:56:43 0 [Note] Event Scheduler: Purging the queue. 0 events
2021-10-18 9:56:43 0 [Note] InnoDB: FTS optimize thread exiting.
2021-10-18 9:56:43 0 [Note] InnoDB: Starting shutdown...
2021-10-18 9:56:43 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2021-10-18 9:56:43 0 [Note] InnoDB: Buffer pool(s) dump completed at 211018 9:56:43
2021-10-18 9:56:44 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2021-10-18 9:56:44 0 [Note] InnoDB: Shutdown completed; log sequence number 45106; transaction id 23
2021-10-18 9:56:44 0 [Note] /usr/sbin/mariadbd: Shutdown complete

211018 09:56:44 mysqld_safe mysqld from pid file /var/lib/mysql/mariadb.pid ended
211018 09:56:47 mysqld_safe Starting mariadbd daemon with databases from /var/lib/mysql/
211018 09:56:47 mysqld_safe WSREP: Running position recovery with --disable-log-error --pid-file='/var/lib/mysql//os-recover.pid'
211018 09:56:48 mysqld_safe WSREP: Recovered position 00000000-0000-0000-0000-000000000000:-1
2021-10-18 ...

description: updated
Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

Triaged; as a workaround please add:

  enable_mariadb_clustercheck: yes

Changed in kolla-ansible:
status: Incomplete → Triaged
importance: Undecided → Medium
Changed in kolla-ansible:
status: Triaged → In Progress
Revision history for this message
Vahid Alimohamadi (cybercoder) wrote (last edit ):

It works! I'm so sorry for reporting as a bug but the option you mentioned is not there in the sample global.conf

Thanks anyway.

Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

Don't feel sorry, it's a proper bug. :-) Thank you for reporting.

Revision history for this message
Victor Morales (electrocucaracha) wrote :

I got it this error as well in All-in-One setup. These are the MariaDB's errors.

$ docker exec mariadb grep ERROR /var/log/kolla/mariadb/mariadb.log
ERROR 2002 (HY000): Can't connect to MySQL server on '10.0.2.204' (115)
2021-10-19 16:39:26 2 [ERROR] WSREP: Process completed with error: /usr/local/bin/wsrep-notify.sh --status connected: 1 (Operation not permitted)
2021-10-19 16:39:26 2 [ERROR] WSREP: Notification command failed: 1 (Operation not permitted): "/usr/local/bin/wsrep-notify.sh --status connected"
ERROR 2002 (HY000): Can't connect to MySQL server on '10.0.2.204' (115)
2021-10-19 16:39:26 2 [ERROR] WSREP: Process completed with error: /usr/local/bin/wsrep-notify.sh --status joiner: 1 (Operation not permitted)
2021-10-19 16:39:26 2 [ERROR] WSREP: Notification command failed: 1 (Operation not permitted): "/usr/local/bin/wsrep-notify.sh --status joiner"
ERROR 2002 (HY000): Can't connect to MySQL server on '10.0.2.204' (115)
2021-10-19 16:39:26 2 [ERROR] WSREP: Process completed with error: /usr/local/bin/wsrep-notify.sh --status initializing: 1 (Operation not permitted)
2021-10-19 16:39:26 2 [ERROR] WSREP: Notification command failed: 1 (Operation not permitted): "/usr/local/bin/wsrep-notify.sh --status initializing"

The documentation mentions[2] that All-in-One setups can run without haproxy and keepalived setting enable_haproxy to false but this enables[3] wsrep-notify.sh execution[1]. Is it correct this disabling logic[1]?

[1] https://review.opendev.org/c/openstack/kolla-ansible/+/786182
[2] https://github.com/openstack/kolla-ansible/blob/stable/xena/etc/kolla/globals.yml#L49-L52
[3] https://github.com/openstack/kolla-ansible/blob/stable/xena/ansible/roles/mariadb/defaults/main.yml#L121

Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

Hi Victor, the workaround is in comment #4.
The real fix is in https://review.opendev.org/c/openstack/kolla-ansible/+/814393

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (master)

Reviewed: https://review.opendev.org/c/openstack/kolla-ansible/+/814393
Committed: https://opendev.org/openstack/kolla-ansible/commit/b6b7401c0d71298ac32b1437c3a309c6957ef5c0
Submitter: "Zuul (22348)"
Branch: master

commit b6b7401c0d71298ac32b1437c3a309c6957ef5c0
Author: Michal Nasiadka <email address hidden>
Date: Mon Oct 18 12:09:03 2021 +0200

    mariadb: Remove wsrep-notify.sh

    Closes-Bug: #1947534

    Change-Id: I08be074c3633cc4fb0a0bc6c9cb8d03eb5226d89

Changed in kolla-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (stable/xena)

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/kolla-ansible/+/814667

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/kolla-ansible/+/814668

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/kolla-ansible/+/814667
Committed: https://opendev.org/openstack/kolla-ansible/commit/70087813c71e6442d26185812b32b2447c8202fe
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 70087813c71e6442d26185812b32b2447c8202fe
Author: Michal Nasiadka <email address hidden>
Date: Mon Oct 18 12:09:03 2021 +0200

    mariadb: Remove wsrep-notify.sh

    Closes-Bug: #1947534

    Change-Id: I08be074c3633cc4fb0a0bc6c9cb8d03eb5226d89
    (cherry picked from commit b6b7401c0d71298ac32b1437c3a309c6957ef5c0)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/kolla-ansible/+/814668
Committed: https://opendev.org/openstack/kolla-ansible/commit/1a1fb864385f2b798be6fe8554cbdc0acb96bf7c
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 1a1fb864385f2b798be6fe8554cbdc0acb96bf7c
Author: Michal Nasiadka <email address hidden>
Date: Mon Oct 18 12:09:03 2021 +0200

    mariadb: Do not use wsrep-notify.sh on Debian

    Closes-Bug: #1947534

    Change-Id: I08be074c3633cc4fb0a0bc6c9cb8d03eb5226d89
    (cherry picked from commit b6b7401c0d71298ac32b1437c3a309c6957ef5c0)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 13.0.0.0rc2

This issue was fixed in the openstack/kolla-ansible 13.0.0.0rc2 release candidate.

Revision history for this message
zhuxiaochun (zhuxiaochun1995) wrote :

There is an unexpected } in line 11 of mariadb.json.j2 on branch stable/wallaby, please fix it.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 12.3.0

This issue was fixed in the openstack/kolla-ansible 12.3.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 14.0.0.0rc1

This issue was fixed in the openstack/kolla-ansible 14.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.