With the 11.6.2 release mariadb has made snapshot isolation a default
setting which recently caused issues on the AUR and the Forums, where
the respective database engines would fail due to the table changing
since the last time they read it:
PHP Fatal error: Uncaught mysqli_sql_exception: Record has changed since last read in table 'fluxbb_online' in /srv/http/fluxbb/include/dblayer/mysqli_innodb.php:79
Stack trace:
#0 /srv/http/fluxbb/include/dblayer/mysqli_innodb.php(79): mysqli_query()
#1 /srv/http/fluxbb/include/functions.php(485): DBLayer->query()
#2 /srv/http/fluxbb/include/common.php(162): update_users_online()
#3 /srv/http/fluxbb/viewtopic.php(10): require('...')
#4 {main}
We therefore introduce a config switch to restore the old behavior and
apply the changed setting on the two services.
Link: https://mariadb.com/kb/en/mariadb-11-6-2-release-notes/#innodb
Link: https://bbs.archlinux.org/viewtopic.php?id=301802
Link: https://gitlab.archlinux.org/archlinux/aurweb/-/issues/525
Signed-off-by: Christian Heusel <christian@heusel.eu>
Move backup-related variable defaults from the database roles into the
borg_client role. Also check group membership to guard installation of
database backup helper scripts.
These are used to signal the start of the document in a stream of many
documents. As Ansible only supports one YAML document per file this is
unnecessary. About a third of our YAML documents already lacked these.
We used to set query_cache_type to 0 in the default settings but we were
also setting query_cache_size to a non-zero/non-default value, which was
in turn re-enabling the query cache. Update the configuration to reflect
the actual cache state and make sure query_cache_size is set to zero for
the "query_cache_type = 0" case.
Now that the setting controls the real state of the query cache, disable
it for bbs.archlinux.org; its hit rate is small compared to insert rate.
yaml: truthy value should be one of [false, true] (truthy)
yaml: wrong indentation: expected 4 but found 2 (indentation)
yaml: too few spaces before comment (comments)
yaml: missing starting space in comment (comments)
yaml: too many blank lines (1 > 0) (empty-lines)
yaml: too many spaces after colon (colons)
yaml: comment not indented like content (comments-indentation)
yaml: no new line character at the end of file (new-line-at-end-of-file)
load-failure: Failed to load or parse file
parser-error: couldn't resolve module/action 'hosts'. This often indicates a misspelling, missing collection, or incorrect module path.
The prometheus-mysqld-exporter connects over localhost to collect
stats, so networking has to be enabled. mariadb's default is to serve on
0.0.0.0, so change the configuration to serve on localhost.
The previous task creating the "zabbix_agent" user in the database stays
here as it actually needs the mariadb role. But note that it uses a
hardcoded name "zabbix_agent" for setting the password. The zabbix_agent
uses a different variable ("{{zabbix_agent_mysql_password}}") in the
my.cnf.j2 template, but I don't see where the variable is defined...
The discovery script now uses a regex and no longer cares where exactly
accounting is enabled. Follow systemd upstream by enabling it by
default.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Disable firewall because python2 module is not avaible and the tasks
fail which makes the playbooks fail and leads to handlers not being run.
https://github.com/ansible/ansible/issues/24855
Signed-off-by: Florian Pritz <bluewind@xinu.at>
The defaults for max_allowed_packet (1M) and innodb_log_file_size (5) are too small for doing larger imports.
Increase the max_allowed_packet to 16M and innodb_log_file_size to 64M.
If the service is started before the config is copied, we can't recover
from a typo in the config file because maraidb will refused to start. At
least not without manually fixing that typo. This way the typo can be
fixed in ansible and then deployed normally.
Signed-off-by: Florian Pritz <bluewind@xinu.at>