Commit Graph

71 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
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
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
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
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
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
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
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
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
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
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
Michal Konecny
c69ef120c3 [mailman3] Add logrotate capabilities
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-28 11:02:10 +02:00
Michal Konecny
62b319cadb [mailman3] Fix the migration task
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-27 14:14:12 +02:00
Michal Konecny
84e83a16e1 [mailman3] Use the correct syntax for env
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-27 13:58:36 +02:00
Michal Konecny
08f990cf79 [mailman3] We need admin access to database for migrations
We didn't need that on staging, but on production the permissions are more
granular.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-27 13:47:20 +02:00
Michal Konecny
bba5d4340e [mailman3] Enable memcached before enabling hyperkitty
For `mailman-web compress` memcached have to be running.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-24 17:45:25 +02:00
Michal Konecny
df67f2be1f [mailman3] Start and enable timers not services
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-21 14:00:11 +02:00
Michal Konecny
996cef7d22 [mailman3] Add missing tags to patch task
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-21 12:46:08 +02:00
Michal Konecny
0fbd79a26e [mailman3] Fix the patch file and how it is applied
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-21 11:55:10 +02:00
Michal Konecny
d0e06d1ab0 [mailman3] Add patch for django_mailman3
Till https://src.fedoraproject.org/rpms/python-django-mailman3/pull-request/2 is
merged let's apply the patch directly.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-21 09:09:34 +00:00
Lenka Segura
889f20be54 mailman: Enable and start timers
Signed-off-by: Lenka Segura <lsegura@redhat.com>
2024-06-18 10:22:43 +02:00
Lenka Segura
789bf6fcac mailman3: Fix quarter_hourly timer format and add hperkitty.target
Signed-off-by: Lenka Segura <lsegura@redhat.com>
2024-06-06 11:44:31 +00:00
Lenka Segura
7a862baa5b mailman3: copy files with copy module, not file
Signed-off-by: Lenka Segura <lsegura@redhat.com>
2024-06-03 09:03:01 +00:00
Lenka Segura
73612b973a Create systemd timers for tasks
Signed-off-by: Lenka Segura <lsegura@redhat.com>
2024-05-31 11:52:49 +00:00
Michal Konecny
132d5ce608 [mailman3] Fix the initial-data.json dataload
The fedora isn't available in allauth library and mailman user needs to have
access to initial-data.json

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-05-31 11:55:40 +02:00
Michal Konecny
06ed86e690 [mailman3] Migrate initial-data.json from mailman role
This JSON file contains authentication providers set up in mailman. This change
should allow it to be used in mailman3 role.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-05-30 16:15:54 +02:00
Michal Konecny
454d844a9e [mailman3] Fix 500 when opening admin page for some lists
The postorius was missing python3-cmarkgfm in dependencies which caused
rendering of info metadata in lists to throw 500 because markdown renderer was
missing.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-05-30 15:38:27 +02:00
Michal Konecny
16f8d40075 [mailman3] Process static files every time
Waiting for static_root_dir change could skip files that were added to static
after the initial deployment. This should prevent that.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-04-26 15:33:50 +02:00
Michal Konecny
89c45beb9f [mailman3] Fix the remaining SELinux issues
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-04-26 15:27:53 +02:00
Michal Konecny
4e221cf347 [mailman3] Fix the ownership of log file
Both become and become_user needs to be set to work. So the script was executed
as root which caused the hyperkitty log file to be created with root owner.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-04-26 14:04:31 +02:00
Michal Konecny
4b54cadbdc [mailman3] Use the correct handler
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-04-26 12:48:07 +02:00
Michal Konecny
6416dd6249 [mod_wsgi] Install the mod_wsgi correctly on RHEL9
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-04-26 12:07:12 +02:00
Michal Konecny
8e19bddb1c [mailman3] Fix syntax issue
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-04-26 11:27:58 +02:00
Michal Konecny
88c28e2b09 [mailman3] Fix yamllint errors
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-04-26 11:02:47 +02:00
Michal Konecny
261ec360fa [mailman3] Remove the superuser creation
We don't need the superuser if we knew how to add the permissions to any user.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-04-26 10:43:52 +02:00
Michal Konecny
a8cd5dfff3 [mailman3] Add migration script for Fedora auth provider
This will add migration script for Fedora auth provider. This is only needed
when updating to Fedora auth provider using OpenID Connect.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-04-26 10:43:52 +02:00
Michal Konecny
4c7885c89d [mailman3] Add django superuser creation task
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-04-26 10:43:52 +02:00
Michal Konecny
6605685527 [mailman3] Add missing script and config file
* Add mailman-sar script
* Add fedora-messaging config

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-04-26 10:43:52 +02:00