Skip to content

Commit

Permalink
Merge branch 'master' into paladox-patch-4
Browse files Browse the repository at this point in the history
  • Loading branch information
paladox authored Jul 17, 2023
2 parents d41fa96 + 599afd9 commit 974265e
Show file tree
Hide file tree
Showing 23 changed files with 56 additions and 24 deletions.
2 changes: 2 additions & 0 deletions hieradata/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ memcached_servers_1:
- 2a10:6740::6:510:11211:1
memcached_servers_3:
- 2a10:6740::6:405:11211:1
memcached_servers_test:
- 2a10:6740::6:406:11211:1
varnish::interval-check: '60s'
varnish::interval-timeout: '60s'
varnish::backends:
Expand Down
2 changes: 1 addition & 1 deletion hieradata/hosts/mem131.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
role::memcached::threads: ~
role::memcached::threads: 2
role::memcached::version: 'present'
role::memcached::growth_factor: 1.25
role::memcached::min_slab_size: 48
Expand Down
2 changes: 1 addition & 1 deletion hieradata/hosts/mem141.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
role::memcached::threads: ~
role::memcached::threads: 2
role::memcached::version: 'present'
role::memcached::growth_factor: 1.25
role::memcached::min_slab_size: 48
Expand Down
2 changes: 1 addition & 1 deletion hieradata/hosts/mw131.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mediawiki::jobqueue::runner::redis_ip: '[2a10:6740::6:306]:6379'

role::mediawiki::use_strict_firewall: true

mediawiki::php::fpm::fpm_min_child: 30
mediawiki::php::fpm::fpm_min_child: 24
mediawiki::php::fpm::fpm_workers_multiplier: 1.0
mediawiki::php::fpm_config:
post_max_size: '250M'
Expand Down
2 changes: 1 addition & 1 deletion hieradata/hosts/mw132.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mediawiki::jobqueue::runner::redis_ip: '[2a10:6740::6:306]:6379'

role::mediawiki::use_strict_firewall: true

mediawiki::php::fpm::fpm_min_child: 30
mediawiki::php::fpm::fpm_min_child: 24
mediawiki::php::fpm::fpm_workers_multiplier: 1.0
mediawiki::php::fpm_config:
post_max_size: '250M'
Expand Down
2 changes: 1 addition & 1 deletion hieradata/hosts/mw133.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mediawiki::jobqueue::runner::redis_ip: '[2a10:6740::6:306]:6379'

role::mediawiki::use_strict_firewall: true

mediawiki::php::fpm::fpm_min_child: 30
mediawiki::php::fpm::fpm_min_child: 24
mediawiki::php::fpm::fpm_workers_multiplier: 1.0
mediawiki::php::fpm_config:
post_max_size: '250M'
Expand Down
2 changes: 1 addition & 1 deletion hieradata/hosts/mw134.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mediawiki::jobqueue::runner::redis_ip: '[2a10:6740::6:306]:6379'

role::mediawiki::use_strict_firewall: true

mediawiki::php::fpm::fpm_min_child: 30
mediawiki::php::fpm::fpm_min_child: 24
mediawiki::php::fpm::fpm_workers_multiplier: 1.0
mediawiki::php::fpm_config:
post_max_size: '250M'
Expand Down
2 changes: 1 addition & 1 deletion hieradata/hosts/mw141.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mediawiki::jobqueue::runner::redis_ip: '[2a10:6740::6:306]:6379'

role::mediawiki::use_strict_firewall: true

mediawiki::php::fpm::fpm_min_child: 30
mediawiki::php::fpm::fpm_min_child: 24
mediawiki::php::fpm::fpm_workers_multiplier: 1.0
mediawiki::php::fpm_config:
post_max_size: '250M'
Expand Down
2 changes: 1 addition & 1 deletion hieradata/hosts/mw142.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mediawiki::jobqueue::runner::redis_ip: '[2a10:6740::6:306]:6379'

role::mediawiki::use_strict_firewall: true

mediawiki::php::fpm::fpm_min_child: 30
mediawiki::php::fpm::fpm_min_child: 24
mediawiki::php::fpm::fpm_workers_multiplier: 1.0
mediawiki::php::fpm_config:
post_max_size: '250M'
Expand Down
2 changes: 1 addition & 1 deletion hieradata/hosts/mw143.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mediawiki::jobqueue::runner::redis_ip: '[2a10:6740::6:306]:6379'

role::mediawiki::use_strict_firewall: true

mediawiki::php::fpm::fpm_min_child: 30
mediawiki::php::fpm::fpm_min_child: 24
mediawiki::php::fpm::fpm_workers_multiplier: 1.0
mediawiki::php::fpm_config:
post_max_size: '250M'
Expand Down
10 changes: 10 additions & 0 deletions hieradata/hosts/test131.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,13 @@ nginx::logrotate_number: 2
nginx::use_graylog: true

puppetserver_hostname: 'puppet141.miraheze.org'

# memcached
role::memcached::threads: ~
role::memcached::version: 'present'
role::memcached::growth_factor: 1.25
role::memcached::min_slab_size: 48
role::memcached::max_seq_reqs: 200
role::memcached::size: 512
role::memcached::extended_options: []
role::memcached::port: 11211
1 change: 1 addition & 0 deletions manifests/site.pp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@

node 'test131.miraheze.org' {
include base
include role::memcached
include role::mediawiki
include role::redis
include mediawiki::jobqueue::chron
Expand Down
4 changes: 2 additions & 2 deletions modules/mariadb/templates/config/mw.cnf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ innodb-buffer-pool-size = <%= @innodb_buffer_pool_size %>
innodb_lock_wait_timeout = 120
innodb-stats-on-metadata = OFF
# Defaults to 8000000 (8MB)
# We set this to 150000000 (150MB)
innodb_ft_cache_size = 150000000
# We set this to 150000000 (200MB)
innodb_ft_cache_size = 200000000
innodb_ft_total_cache_size = 640000000
innodb_adaptive_hash_index = OFF
# From 10.5.7+ the default has been changed to 90%.
Expand Down
6 changes: 6 additions & 0 deletions modules/mariadb/templates/grants/mediawiki-grants.sql.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE, ALTER, INDEX, CREATE VIEW, L
GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE, ALTER, INDEX, CREATE VIEW, LOCK TABLES
ON `parsercache`.* TO 'mediawiki'@'%';

GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE, ALTER, INDEX, CREATE VIEW, LOCK TABLES
ON `testparsercache`.* TO 'mediawiki'@'%';

GRANT SELECT, INSERT, UPDATE, DELETE, DROP, ALTER
ON `incidents`.* TO 'mediawiki'@'%';

Expand Down Expand Up @@ -65,6 +68,9 @@ GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE, ALTER, INDEX, CREATE VIEW, L
GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE, ALTER, INDEX, CREATE VIEW, LOCK TABLES
ON `parsercache`.* TO 'wikiadmin'@'%';

GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE, ALTER, INDEX, CREATE VIEW, LOCK TABLES
ON `testparsercache`.* TO 'wikiadmin'@'%';

GRANT SELECT, INSERT, UPDATE, DELETE, DROP, ALTER
ON `incidents`.* TO 'wikiadmin'@'%';

Expand Down
2 changes: 1 addition & 1 deletion modules/matomo/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
git::clone { 'matomo':
directory => '/srv/matomo',
origin => 'https://github.com/matomo-org/matomo',
branch => '4.14.2', # Current stable
branch => '4.15.0', # Current stable
recurse_submodules => true,
owner => 'www-data',
group => 'www-data',
Expand Down
5 changes: 0 additions & 5 deletions modules/mediawiki/manifests/cgroup.pp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,4 @@
grub::bootparam { 'cgroup.memory':
value => 'nokmem',
}

# Force use of cgroups v1
grub::bootparam { 'systemd.unified_cgroup_hierarchy':
value => '0',
}
}
4 changes: 2 additions & 2 deletions modules/mediawiki/manifests/jobqueue/runner.pp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@

cron { 'purge_parsercache':
ensure => present,
command => '/usr/bin/php /srv/mediawiki/w/maintenance/purgeParserCache.php --age 864000 --msleep 200 --wiki loginwiki',
command => '/usr/bin/php /srv/mediawiki/w/maintenance/purgeParserCache.php --wiki loginwiki --tag pc1 --age 864000 --msleep 200',
user => 'www-data',
special => 'daily',
}
Expand All @@ -116,7 +116,7 @@
if $wiki == 'loginwikibeta' {
cron { 'purge_parsercache':
ensure => present,
command => '/usr/bin/php /srv/mediawiki/w/maintenance/purgeParserCache.php --age 864000 --msleep 200 --wiki loginwikibeta',
command => '/usr/bin/php /srv/mediawiki/w/maintenance/purgeParserCache.php --wiki loginwikibeta --tag pc1 --age 864000 --msleep 200',
user => 'www-data',
special => 'daily',
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# This file is managed by Puppet.
[Unit]
Description=Miraheze JobRunner
After=network.target

[Service]
Type=simple
Expand Down
5 changes: 4 additions & 1 deletion modules/mediawiki/templates/jobrunner-hi.json.erb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"low-priority": [
"refreshLinksDynamic",
"refreshLinks"
],
]
},
"hi": {
// Number of runner processes in this group
Expand Down Expand Up @@ -90,6 +90,9 @@
// runJobs.php memory limits
"memory": {
"*": "300M",
"refreshLinks": "700M",
"refreshLinksDynamic": "700M",
"refreshLinksPrioritized": "700M",
"RequestWikiAIJob": "2000M"
}
},
Expand Down
6 changes: 3 additions & 3 deletions modules/mediawiki/templates/jobrunner.json.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
"AssembleUploadChunks",
"DataDumpGenerateJob",
"PublishStashedFile",
"refreshLinks",
"refreshLinksDynamic",
"refreshLinksPrioritized",
"RequestWikiAIJob",
"uploadFromUrl",
"webVideoTranscode",
"webVideoTranscodePrioritized"
],
"low-priority": [
"refreshLinks",
"refreshLinksDynamic",
"refreshLinksPrioritized",
"htmlCacheUpdate"
]
}
Expand Down
2 changes: 1 addition & 1 deletion modules/php/manifests/fpm/pool.pp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
'listen.backlog' => 256,
'pm' => 'static',
'pm.max_children' => $facts['processors']['count'],
'pm.max_requests' => 20000,
'pm.max_requests' => 5000,
'pm.status_path' => '/php_status',
'access.format' => '%{%Y-%m-%dT%H:%M:%S}t [%p] %{microseconds}d %{HTTP_HOST}e/%r %m/%s %{mega}M',
'process.dumpable' => yes,
Expand Down
11 changes: 11 additions & 0 deletions modules/role/manifests/mediawiki/nutcracker.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
class role::mediawiki::nutcracker (
Array[Variant[Stdlib::Host,String]] $memcached_servers_1 = lookup('memcached_servers_1', {'default_value' => []}),
Array[Variant[Stdlib::Host,String]] $memcached_servers_3 = lookup('memcached_servers_3', {'default_value' => []}),
Array[Variant[Stdlib::Host,String]] $memcached_servers_test = lookup('memcached_servers_test', {'default_value' => []}),
) {

if $memcached_servers_1 != [] and $memcached_servers_3 != [] {
Expand All @@ -26,6 +27,16 @@
timeout => 1000, # milliseconds
servers => $memcached_servers_3,
},
'memcached_test' => {
auto_eject_hosts => false,
distribution => 'ketama',
hash => 'md5',
listen => '127.0.0.1:11215',
preconnect => true,
server_connections => 1,
timeout => 1000, # milliseconds
servers => $memcached_servers_test,
},
}

# Ship a tmpfiles.d configuration to create /run/nutcracker
Expand Down
3 changes: 3 additions & 0 deletions modules/swift/files/swift-container-stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
re.compile(r'-deleted(\.[a-z0-9][a-z0-9])?$'): 'deleted',
re.compile(r'-transcoded(\.[a-z0-9][a-z0-9])?$'): 'transcoded',
re.compile(r'-render(\.[a-z0-9][a-z0-9])?$'): 'render',
re.compile(r'-avatars(\.[a-z0-9][a-z0-9])?$'): 'avatars',
re.compile(r'-awards(\.[a-z0-9][a-z0-9])?$'): 'awards',
re.compile(r'-dumps-backup(_segments)?$'): 'dumps',
},
}

Expand Down

0 comments on commit 974265e

Please sign in to comment.