mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
672e9cf19a
* tests: Ensure excessive FD limits are avoided Processes that run as daemons (`postsrsd` and `fail2ban-server`) initialize by closing all FDs (File Descriptors). This behaviour queries that maximum limit and iterates through the entire range even if only a few FDs are open. In some environments (Docker, limit configured by distro) this can be a range exceeding 1 billion (from kernel default of 1024 soft, 4096 hard), causing an 8 minute delay with heavy CPU activity. `postsrsd` has since been updated to use `close_range()` syscall, and `fail2ban` will now iterate through `/proc/self/fd` (open FDs) which should resolve the performance hit. Until those updates reach our Docker image, we need to workaround it with `--ulimit` option. NOTE: If `docker.service` on a distro sets `LimitNOFILE=` to approx 1 million or lower, it should not be an issue. On distros such as Fedora 36, it is `LimitNOFILE=infinity` (approx 1 billion) that causes excessive delays. * chore: Use Docker host limits instead Typically on modern distros with systemd, this should equate to 1024 (soft) and 512K (hard) limits. A distro may override the built-in global defaults systemd sets via setting `DefaultLimitNOFILE=` in `/etc/systemd/user.conf` and `/etc/systemd/system.conf`. * tests(fix): Better prevent non-deterministic failures - `no_containers.bats` tests the external script `setup.sh` (without `-c`). It's expected that no existing DMS container is running - otherwise it may attempt to use that container and fail. Detect this and fail early via `setup_file()` step. - `mail_hostname.bats` had a odd timing failure with teardown due to the last tests bringing the containers down earlier (`docker stop` paired with the `docker run --rm`). Adding a moment of delay via `sleep` helps avoid that false positive scenario. |
||
---|---|---|
.. | ||
bats@410dd229a5 | ||
config | ||
docker-openldap | ||
linting | ||
test-files | ||
test_helper | ||
default_relay_host.bats | ||
dovecot_inet_protocol.bats | ||
helper-functions.bats | ||
mail_changedetector.bats | ||
mail_disabled_clamav_spamassassin.bats | ||
mail_dnsbl.bats | ||
mail_fail2ban.bats | ||
mail_fetchmail.bats | ||
mail_fetchmail_parallel.bats | ||
mail_hostname.bats | ||
mail_lmtp_ip.bats | ||
mail_pop3.bats | ||
mail_postfix_inet.bats | ||
mail_postscreen.bats | ||
mail_privacy.bats | ||
mail_quotas_disabled.bats | ||
mail_smtponly.bats | ||
mail_spam_bounced.bats | ||
mail_spam_junk_folder.bats | ||
mail_special_use_folders.bats | ||
mail_ssl_letsencrypt.bats | ||
mail_ssl_manual.bats | ||
mail_time.bats | ||
mail_tls_dhparams.bats | ||
mail_undef_spam_subject.bats | ||
mail_with_imap.bats | ||
mail_with_ldap.bats | ||
mail_with_mdbox.bats | ||
mail_with_postgrey.bats | ||
mail_with_postgrey_disabled_by_default.bats | ||
mail_with_relays.bats | ||
mail_with_sdbox.bats | ||
no_container.bats | ||
open_dkim.bats | ||
permit_docker.bats | ||
security_tls_cipherlists.bats | ||
sedfile.bats | ||
setup-cli.bats | ||
test_helper.bats | ||
tests.bats |