1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
Commit Graph

41 Commits

Author SHA1 Message Date
Robin Candau
701c1d01ef Migrate 'with_X' to 'loop' 2024-12-23 17:43:01 +00:00
Christian Heusel
79d069df89
mariadb: Add switch for innodb_snapshot_isolation
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>
2024-12-16 17:58:56 +01:00
Evangelos Foutras
743dd1faeb
borg_client: refactor database related vars/tasks
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.
2024-03-30 19:08:37 +02:00
Evangelos Foutras
578b781966
Capitalize the handler name in handler invocations
Fixes: 26f289b72bfb ("Capitalize the first letter of all task names")
2022-08-29 21:46:39 +03:00
Evangelos Foutras
26f289b72b
Capitalize the first letter of all task names
ansible-lint 6.5.0 complains about:

  name: All names should start with an
        uppercase letter. (name[casing])
2022-08-23 06:57:13 +03:00
Evangelos Foutras
a9e0790f53
Remove the three dashes from all YAML documents
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.
2022-06-08 14:35:45 +03:00
Evangelos Foutras
6534413cf3
mariadb: Tweak query cache settings
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.
2021-08-18 19:56:50 +03:00
Evangelos Foutras
1b2cfa7120
mariadb: Remove no-auto-rehash setting 2021-08-18 19:36:49 +03:00
Evangelos Foutras
de7582913c
mariadb: Move two common variables out of playbooks
Default query_cache_type to 0 and innodb_file_per_table to true.
2021-08-18 03:07:12 +03:00
Kristian Klausen
4112bdf9fd Make ansible-lint happy
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.
2021-02-14 14:22:05 +01:00
Jelle van der Waa
4bc660d6be
Remove zabbix-agent, zabbix roles
Zabbix has been replaced by Prometheus for monitoring our services.
2020-11-21 22:14:20 +01:00
Jelle van der Waa
8d8974a36d
Allow network access for mariadb for prometheus
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.
2020-09-12 22:33:27 +02:00
Jakub Klinkovský
13de2781bd mariadb: bump mariadb_table_open_cache to the upstream default of 2000
The upstream default value is 2000 since 10.1.7:
https://mariadb.com/kb/en/server-system-variables/#table_open_cache

See also commit f164d0001f
2020-09-12 20:11:10 +00:00
Jakub Klinkovský
37d6326c8c
mariadb: remove zabbix_agentd.my.cnf.j2 which is installed by the zabbix_agent role
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...
2020-09-05 21:27:21 +02:00
Frederik Schwan
63887d3b09 fix E208 'File permissions not mentioned' 2020-08-27 05:29:00 +00:00
Jelle van der Waa
f164d0001f
Update mariadb defaults to upstream's
Upstream mariadb has with a default server much higher defaults and our
servers have plenty of ram to spare as well.
2020-08-18 17:30:29 +02:00
Frederik Schwan
2b2bd06512
fix E206 'Variables should have spaces before and after: {{ var_name }}' 2020-06-12 22:20:48 +02:00
Jan Alexander Steffens (heftig)
dead8234a6
borg: Move mysql backup config to mariadb role 2020-05-10 16:42:51 +02:00
Jelle van der Waa
d09500ca65 mariadb: do not open holes in the firewall for mariadb
We always run mariadb on the host where the service is located which
requires a mariadb database.
2019-11-24 15:57:26 +01:00
Florian Pritz
881f0b409d
mariadb: Add TODO for zabbix agent access
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2019-08-07 19:31:28 +02:00
Florian Pritz
0426323328
mariadb: Remove deprecated option
Remvoed in mariadb 10.3.0

Signed-off-by: Florian Pritz <bluewind@xinu.at>
2019-07-27 16:01:52 +02:00
Florian Pritz
5a41d8036e
mariadb: Fix server config filename
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2019-07-27 16:00:21 +02:00
Jelle van der Waa
86abccee13 mariadb: update configuration location 2019-07-26 22:51:06 +02:00
Florian Pritz
8e1cdea4f9
mariadb: Switch python module to python3 version
This is used by ansible to run mysql queries, e.g. when adding users.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-10-27 10:42:17 +02:00
Phillip Smith
8d681f0040 add "firewall" tag to all relevant tasks 2018-08-17 14:56:37 +10:00
Phillip Smith
1258e6b7d1 make all firewalld changes take effect immediately 2018-08-17 10:32:10 +10:00
Florian Pritz
13078f8651
Enable cpu/memory accounting by default
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>
2018-06-25 14:50:58 +02:00
Florian Pritz
9e655f8012 Improve group vars vault usage for mariadb 2018-06-07 12:11:06 +02:00
Florian Pritz
b847916c61
Disable firewalld tasks
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>
2018-03-21 12:38:01 +01:00
Florian Pritz
f116173785
mariadb: Disable firewall rules when networking is disabled
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-03-11 00:47:37 +01:00
Florian Pritz
669f7f5420
mariadb: Disable networking
We don't use it so it doesn't need to listen.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-03-11 00:40:16 +01:00
Phillip Smith
59807399ed initial commit of firewalld role and tasks 2018-03-06 08:46:24 +11:00
Giancarlo Razzolini
45a96de0e8
Increase the max_allowed_packet and innodb_log_file_size variables
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.
2018-03-02 18:11:21 -03:00
Florian Pritz
b59d6b99df
Add cpu/memory accounting to many roles
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-02-28 19:50:32 +01:00
Florian Pritz
6488df5ada
mariadb: Copy config before starting service
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>
2018-02-16 15:03:24 +01:00
Florian Pritz
be940a62a9
mariadb: Enable userstat for monitoring via zabbix
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-02-16 15:03:05 +01:00
Florian Pritz
2f93303013
mariadb: Add zabbix-agent support
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-08-30 18:19:58 +02:00
Florian Pritz
e41eaea76e
Fix deprecation warnings about starting services
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-06-19 14:52:51 +02:00
Giancarlo Razzolini
c68da528b7
roles/mariadb: Add no_log to the client configuration 2017-02-06 15:44:32 -02:00
Giancarlo Razzolini
1fe2c959c2
roles/mariadb: Add missing mariadb_users.root password. Also make the task no_log: true 2017-02-06 15:44:31 -02:00
Bartłomiej Piotrowski
9db7810528 mariadb: Initial commit 2016-12-12 14:44:17 +01:00