Commit graph

134 commits

Author SHA1 Message Date
Aurélien Bompard
d884a0f8ba
Use the combined RabbitMQ CA cert in the clients
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2025-04-11 15:15:45 +02:00
Michal Konecny
c3dac79544 [mailman3] Another missed variable rename
Fixing failing CI is not easy
2025-03-27 13:56:08 +00:00
Michal Konecny
3eec83ec9a [mailman3] Fix the incorrect variable names 2025-03-27 13:50:25 +01:00
Michal Konecny
a807fb3d4f [mailman3] Create gunicorn configuration file
To make changing the gunicorn configuration more easily let's move
configuration values from systemd service to separate configuration
file.

The file will live in /etc/mailman3/gunicorn.conf.py.
2025-03-27 13:01:13 +01:00
Michal Konecny
2ec055db6f Use first uppercase letter for all handlers
This will unify all the handlers to use first uppercase letter for
ansible-lint to stop complaining.

I went through all `notify:` occurrences and fixed them by running
```
set TEXT "text_to_replace"; set REPLACEMENT "replacement_text"; git grep
-rlz "$TEXT" . | xargs -0 sed -i "s/$TEXT/$REPLACEMENT/g"
```

Then I went through all the changes and removed the ones that wasn't
expected to be changed.

Fixes https://pagure.io/fedora-infrastructure/issue/12391

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-02-10 20:31:49 +00:00
Seddik Alaoui Ismaili
24aaee6429 move apps to memcached02 2024-12-11 23:22:28 +00:00
Michal Konecny
c851192805 [mailman3] Fix for DMARC mitigation task
The task checked wrong variable for output. Let's fix that.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-12-10 14:20:25 +01:00
Seddik Alaoui Ismaili
c88ab2cb08 test move apps to memcached02 2024-11-25 13:20:45 +00:00
Michal Konecny
f9da525994 [mailman] Remove the logrotate config
The config is now provided by the mailman3 package and it's the same
provided by the ansible role.

And we have two of them in the role, probably a oversight.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-11-12 13:37:16 +01:00
Michal Konecny
9bc7448cb3 [mailman] Increase HTTP proxy timeout
The timeout is already set in gunicorn, so let's set the HTTP proxy to higher one.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-11-01 11:19:03 +01:00
Michal Konecny
107b9d5991 Fix the condition for DB migration task
It seems that combining jinja2 template ansible code in when condition is
considered unsafe.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-11-01 09:45:19 +00:00
Michal Konecny
f239f3db02 [mailman3] Fix ansible-lint issues
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-10-31 20:21:21 +00:00
Michal Konecny
c83cd910bf [mailman3] Remove the search restriction from hyperkitty
The list search index generation is finished now and this should re-enable the
search on hyperkitty web page again. This should fix both
https://pagure.io/fedora-infrastructure/issue/12027 and
https://pagure.io/fedora-infrastructure/issue/12043

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-10-31 20:21:21 +00:00
Michal Konecny
58f8c45973 [mailman] Use xapian as a backend for fulltext search
The whoosh engine doesn't seem to be maintained anymore and when generating the
index it got stuck when the size was about 20 GB. Xapian on the other hand looks
more stable and much quicker when generating the index.

Unfortunately the xapian-haystack package is not available in Fedora/EPEL yet
and waiting for review to be finished.

Link to review bug: https://bugzilla.redhat.com/show_bug.cgi?id=2313507

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-10-07 07:43:36 +00:00
Michal Konecny
ffcc5d8195 [mailman] Another try with command module
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-09-27 15:09:03 +02:00
Michal Konecny
2c31607cf1 [mailman] Use command instead script module
Script module is for executing local scripts rather use command.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-09-27 10:47:30 +02:00
Michal Konecny
a5ed1c6a2a [mailman] Add script to enable DMARC mitigation
This script is added to implement
https://pagure.io/fedora-infrastructure/issue/11427

The script was already executed on staging environment and finished without
issue. It could be executed multiple times and only affects list that don't have
the settings set yet. I will document this as another step to take when creating
a new list.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-09-27 08:35:11 +00:00
Jiri Podivin
6c5a88e986 Moving import to top
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
2024-09-18 19:57:30 +00:00
Michal Konecny
087bbe3ce0 [mailman] Use the correct notify
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-09-18 11:04:39 +02:00
Michal Konecny
5d4c302097 [mailman] Patch directly the file
With basedir patch says No file to patch, let's specify the file directly.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-09-18 11:01:15 +02:00
Michal Konecny
44234d5634 [mailman] Add patch for orphan issue
Fix for https://pagure.io/fedora-infrastructure/issue/12011
Already tested on staging.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-09-18 08:51:22 +00:00
Michal Konecny
04f26a1221 [mailman3] Fix the rest API on mailman
The API didn't work and failed with 500, because the REST framework didn't know
how to render the response. This fixes the issue.

https://pagure.io/fedora-infrastructure/issue/12134

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-08-20 11:57:33 +02:00
Michal Konecny
3209b886ee [mailman3] Remove the duplicated information
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-07-29 16:25:04 +00:00
Michal Konecny
39d7b07b0c [mailman3] Add more info to generate_search_index script
Add information about number of remaining mailing lists to process to script output.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-07-29 18:06:12 +02:00
Michal Konecny
be2edf7b47 [mailman3] Add script for generating fulltext index for mailing lists
The index generated by the hyperkitty-hourly script generated unusually big
index (around 1TB).

This script should help with generating the search index from scratch, after
that we can leave it to hyperkitty-hourly job again.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-07-29 14:41:12 +02:00
Michal Konecny
cabd6b7385 [mailman3] Set logging level for database to warning
The database log is really big even on info level, let' set it manually to
warning to save space and don't generate GB of logs.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-07-24 10:49:12 +02:00
Michal Konecny
d655c7b366 [mailman3] Update logging for mailman
There was a typo in logging section of mailman configuration, which caused that
only default log files were created.
Also there is separate logging for gunicorn now, let's use that.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-07-18 11:30:54 +00:00
Michal Konecny
19769b6e77 [mailman3] Add info about disabled search
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-07-12 11:05:29 +02:00
Michal Konecny
cdd78d1442 [mailman3] Disable search in hyperkitty
Mailman has huge memory spikes after migration, those are caused by visiting
`/archives/search` URL. This is probably because of the search index still being
regenerated.

This patch will disable the search from both web UI and as a HTTP URL endpoint.

Fixes https://pagure.io/fedora-infrastructure/issue/12043

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-07-12 11:05:18 +02:00
Michal Konecny
a048feb1ea [mailman3] Fix mailmanweb not starting
Remove the `--log-level=debug` as this is causing failure when starting
mailmanweb service.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-07-11 10:03:49 +02:00
Michal Konecny
e3de4275bd [mailman3] Enable autostart for timers
To be able to enable timer it needs to have WantedBy in [Install] section. Let's
add a hyperkitty.target to that section.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-07-11 09:32:50 +02:00
Michal Konecny
2f1529f76e [mailman3] Disable sending e-mails on staging
This commit is setting both mailman and hyperkitty to devmode and doesn't allow
them to sent mails anywhere.

I tested that from web UI and using `mail` command on the machine.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-07-11 09:30:42 +02:00
Kevin Fenzi
1da59362cd mailman: adjust some settings to try and avoid OOM
Set django to have 4 workers and have a retry longer than the timeout.
Disable local memcached and use the memcached01 instance.
Enabled debug logging on gunicorn to see what it's doing.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-07-09 13:27:32 -07:00
Stephen Smoogen
969bbfcf2a Add blockers to dl.fedoraproject.org
Looked at logs of servers being hit by the 'non-responsive' bots and
the following were hit heavily every day multiple times a day:

100006 nagios.fedoraproject.org-access.log
102150 koschei.fedoraproject.org-access.log
162296 lists.fedoraproject.org-access.log
495776 fedoraproject.org-access.log
850471 dl.fedoraproject.org-access.log

Added bloks to dl.fedoraproject to try and lower its hit rate. Others
need review from people who know their internals more.

Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>
2024-07-09 09:18:56 +00:00
Stephen Smoogen
7e426dbf37 Add more spiders which do not seem to honour robots.txt
I went through the last couple of logs afer the first round of 'turn
off the spiders' went out. I looked at the areas which the /robots.txt
disregard and then looked for the bots which ignored it and still
looked up stuff in 'accounts'. This may cut down CPU spikes as these
are looking at dynamic data which can 'blow' things up.

It might be good to add similar tooling to pagure and src since they
seem to be hit a lot in the logs also.

Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>
2024-07-09 09:18:56 +00:00
Michal Konecny
bebc73c9e3 [mailman3] Fix the syntax error
ansible-playbook is complaining about missing quotes.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-07-04 09:46:49 +02:00
Michal Konecny
9892b05601 [mailman3] Fix yamllint error
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-07-04 09:35:42 +02:00
Michal Konecny
2c4f7c6968 [mailman3] Improve the gunicorn setup
Use the recommended CPU*2+1 amount of workers and limit max requests done. After
that the gunicorn reloads itself and free up all the memory.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-07-04 09:27:46 +02:00
Kevin Fenzi
35902dad8b mailman: lets try 9 workers
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-07-03 13:46:36 -07:00
Kevin Fenzi
95a5a8b6ae mailman: try 15 gunicorn workers
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-07-03 12:36:48 -07:00
Kevin Fenzi
8707b2799d mailman: fix missing }
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-07-03 12:35:49 -07:00
Stephen Smoogen
4937c5be2a Attempt to stop various spiders which do not follow rules.
The ByteSpider and ClaudeBot do not follow robots.txt so need to be
dealt with in other ways.

Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>
2024-07-03 17:18:06 +00:00
Kevin Fenzi
536e0a71b0 mailman: try adding crawl-delay to robots.txt
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-07-03 09:29:22 -07:00
Michal Konecny
61cb8fd515 [mailman3] Add correct permissions to fedora-messaging certificates
The mailman user needs to have access to fedora-messaging certificates to send
messages.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-07-02 15:54:49 +02:00
Michal Konecny
24eb9a4eda [mailman3] Use the correct mailman certificate
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-07-02 10:28:17 +02:00
Michal Konecny
05078de742 [mailman3] Use the correct topic prefix
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-07-02 10:07:37 +02:00
Michal Konecny
deb5a143cd [mailman3] Fix the fedora-messaging config
The fedora-messaging archiver config missed some required values. Let's fix that.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-07-02 09:55:57 +02:00
Michal Konecny
98417787d6 [mailman3] Fix the YAML error
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-07-01 18:19:10 +02:00
Michal Konecny
ae8efd0dd4 [mailman3] Fix the yamllint errors
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-07-01 18:04:42 +02:00
Michal Konecny
319bc2204a [mailman3] Add fedora-messaging certificates
It seems that I forgot to actually create the certificates for new mailman
fedora archiver. Let's fix that.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-07-01 17:56:42 +02:00