try 2: use flock automatic lock for upgrade#1917
Closed
meonkeys wants to merge 5 commits intonextcloud:masterfrom
Closed
try 2: use flock automatic lock for upgrade#1917meonkeys wants to merge 5 commits intonextcloud:masterfrom
meonkeys wants to merge 5 commits intonextcloud:masterfrom
Conversation
d4b4222 to
9b4a2c6
Compare
fix nextcloud#1756 fix nextcloud#1903 Signed-off-by: Adam Monsen <[email protected]>
/var/lock is not likely shared across Nextcloud app server containers Borrowed this idea from @remram44's patch in nextcloud#1905. Signed-off-by: Adam Monsen <[email protected]>
Note there are no changes to `Dockerfile-alpine.template`. We thought we needed `util-linux` for `flock`, but we don't. Busybox includes `flock`, and this command is compatible with GNU `flock` for our use case (I tested it with `flock -n 9`, etc). Signed-off-by: Adam Monsen <[email protected]>
9b4a2c6 to
63f1baa
Compare
Contributor
Author
|
Sorry for all the force-pushes. I don't intend to do that again. |
Contributor
Author
|
We might want to rename Eh, I'm kind of split on this... the file can be used as-is. Note that |
Avoids update.sh unnecessarily updating **/entrypoint.sh Signed-off-by: Adam Monsen <[email protected]>
bc6c48c to
bf03632
Compare
Contributor
Author
|
Argh! I lied, one more force push (forgot to use |
Contributor
Author
|
Let's use #1905 instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is #1757, revisited.
Only this or #1905 should be merged (if either are merged). Both PRs intend a change from (a) treating
nextcloud-init-sync.lock's existence to indicate an upgrade in progress to (b) using theflockshell command (either GNU's or Busybox's). Switching to (b) provides an atomic and ephemeral (automatically cleaned-up) lock.