-
Notifications
You must be signed in to change notification settings - Fork 446
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
Bugfix: correctly shutdown even without replication #554
Bugfix: correctly shutdown even without replication #554
Conversation
PR Summary
|
This is also a good pull request. Let's merge #552 first, rebase on top of it and get this merged as well. |
start.sh: Add comments in stopServices() and exit code 0
apply fix also to version 4.3
17559cf
to
04466a2
Compare
@@ -8,9 +8,10 @@ ENV LANG=C.UTF-8 | |||
|
|||
WORKDIR /app | |||
|
|||
RUN true \ | |||
RUN \ | |||
--mount=type=cache,target=/var/cache/apt \ |
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.
Could you explain what is happening 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.
It's a feature introduces (relatively) recently by Docker buildkit: https://docs.docker.com/build/cache/#use-the-dedicated-run-cache.
It instructs the image build process to mount that directory as a volume inside the container, only for the duration of the build. This way subsequent invocation of docker build
will find the cached file locally, without leaving them inside the final image, thus reducing its final size.
@@ -57,7 +57,7 @@ jobs: | |||
-p 8001:8080 \ | |||
--name nominatim \ | |||
nominatim & | |||
sleep 120 | |||
|
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've tried a few times to get rid of these sleeps but always failed. I'm going to run the tests a few times to see if there is any difference now.
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.
According to the python script, it should automatically retry failed connection with an exponential backoff.
Hard-coding a forced sleep may prolong the test more than necessary, while the container may be already ready before the timeout. IMHO a polling HTTP call done periodically by the script sounds more snappy than the forced sleep
.
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.
It still wasn't enough though. I will run it a few times and see.
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 ran the tests 5 times and they always worked without the sleep so therefore I approve.
Fixes #553
start.sh: avoid killing
replication
process if it is not active.GitHub CI:
tail | grep
to check for streaming replication logs