-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change default value of ONE_DIR #2148
Conversation
@@ -23,7 +23,7 @@ LABEL org.opencontainers.image.source="https://github.com/docker-mailserver/dock | |||
|
|||
ENV ENABLE_POSTGREY=0 | |||
ENV FETCHMAIL_POLL=300 | |||
ENV ONE_DIR=0 | |||
ENV ONE_DIR=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does anyone knows, whats the purpose of having this ENV here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this variable is read in some scripts / needed somewhere even before it is read in start-mailserver.sh
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
somewhere even before it is read in start-mailserver.sh
Startup: dumb-init --> supervisor --> start-mailserver.sh
I couldn't find / think of a place that comes before start-mailserver.sh
. The same goes as well for the other ENVs.
Maybe in a separate PR we can give it a try (removing the ENVs) and see if tests pass 😃
The build-and-test check fails due a temporary clamav issue. This is not related to changes in PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just copying this over from maintainer discussion to provide additional context behind the decision for the change, in case anyone stumbles upon this PR and wonders why it was done:
The only downside I can think of is the additional disk space used.
But when using fail2ban for example, this preserves the bans during container restarts. See also this comment
If I remember correctly, ClamAV will take some good amount of space. My mail-state is currently arround ~24MB (without ClamAV)
Most notably the linked comment mentions ONE_DIR=1
places all state into /var/mail-state
so that state like Fail2Ban can be preserved across restarts. That's usually desirable for this service, so makes a good default.
Are you sure it's temporary? The error message seems to make it rather clear that it'll continue to be an issue. I don't think it matters how much we run the CI test, but that it'd be from Github IPs that would be getting blocked?:
If it continues to be a problem we might need a workaround (perhaps a separate base image as a cache). I'll restart the test suite. |
I also encounter this, when building DMS locally. So the error is not (only?) related to Github IPs. |
Seems we have a test failure, could it be related to this change? The test doesn't seem to have used
docker-mailserver/test/tests.bats Lines 899 to 902 in 13e8c79
docker-mailserver/test/tests.bats Lines 16 to 37 in 13e8c79
|
I re-ran CI yesterday and the error is still present. So yeah, the error does not seem to be temporary. |
If ONE_DIR is not defined, it now defaults to 1. Before it was 0. I'll add ONE_DIR=0 and see if that makes a change. |
8cc892c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests have passed, but this is also an indication that the test is not covering ONE_DIR=1
which we want to make the default, it may be worth looking into fixing that?
I am not that familiar with our tests. But in theory, there should be no difference in how DMS services works, if ONE_DIR is set or not (at least, I can't imagine a reason). |
I've no idea right now why our tests fail with Is anyone else going to take a look? Merge anyway or discard this PR? What do you think @georglauterbach @polarathene |
Hi, can you re-enable |
I agree with @NorseGaud, we can leave this open, no rush ATM. Ideally, we want to have |
You can see the failed test here:
|
The quota test has always been an issue, and we can "safely" restart the test suite if this test fails. The tests seem to pass ATM. |
Because of 8cc892c I'll revert that to see if the test still fails. |
Ah, I see. But test still pass :) |
As our tests pass, with |
Agreed. |
@georglauterbach @casperklein this is a pretty large change for existing users right? Maybe we should wait until a minor version bump? |
This is built for |
As @georglauterbach wrote, merging only affects the :edge build. Users with versioned or latest tags are not affected. Only, once 10.2.0 is released. |
@casperklein I think you can merge this. It would be interesting to see what happens when the |
This was missed during the `ONE_DIR` default change in #2148
* docs: Improve FAQ entry for `mail-state` folder - Links to relevant script logic. - Better list of services data moved to `mail-state`. * Update docs/content/faq.md Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com> * docs(fix): ONE_DIR env default is now `1` This was missed during the `ONE_DIR` default change in #2148 * fix relative filepath * fix: use new URI anchor Co-authored-by: Casper <casperklein@users.noreply.github.com> Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
* ONE_DIR=1 * Update Dockerfile * Update start-mailserver.sh * Update tests.bats * Update tests.bats Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
* docs: Improve FAQ entry for `mail-state` folder - Links to relevant script logic. - Better list of services data moved to `mail-state`. * Update docs/content/faq.md Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com> * docs(fix): ONE_DIR env default is now `1` This was missed during the `ONE_DIR` default change in docker-mailserver#2148 * fix relative filepath * fix: use new URI anchor Co-authored-by: Casper <casperklein@users.noreply.github.com> Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
* ONE_DIR=1 * Update Dockerfile * Update start-mailserver.sh * Update tests.bats * Update tests.bats Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
* docs: Improve FAQ entry for `mail-state` folder - Links to relevant script logic. - Better list of services data moved to `mail-state`. * Update docs/content/faq.md Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com> * docs(fix): ONE_DIR env default is now `1` This was missed during the `ONE_DIR` default change in docker-mailserver#2148 * fix relative filepath * fix: use new URI anchor Co-authored-by: Casper <casperklein@users.noreply.github.com> Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
Description
This changes the default value of
ONE_DIR
from0
to1
.Type of change
Checklist:
docs/
)