Merged
Conversation
Member
|
Thanks, could you sign off the commit? ( |
AkihiroSuda
reviewed
Nov 4, 2020
AkihiroSuda
reviewed
Nov 4, 2020
Signed-off-by: Tobias Schug <happytobi@tscoding.de>
Signed-off-by: Tobias Schug <happytobi@tscoding.de>
a460ff5 to
1cbb30d
Compare
This was referenced Nov 4, 2020
AkihiroSuda
added a commit
to AkihiroSuda/docker
that referenced
this pull request
Nov 5, 2020
Important fix: Lock state dir for preventing automatic clean-up by systemd-tmpfiles (rootless-containers/rootlesskit#188) Full changes:rootless-containers/rootlesskit@v0.10.0...v0.11.0 Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
AkihiroSuda
added a commit
to AkihiroSuda/docker
that referenced
this pull request
Nov 5, 2020
Important fix: Lock state dir for preventing automatic clean-up by systemd-tmpfiles (rootless-containers/rootlesskit#188) Full changes:rootless-containers/rootlesskit@v0.10.0...v0.11.0 Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp> (cherry picked from commit c6accc6) Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
docker-jenkins
pushed a commit
to docker-archive/docker-ce
that referenced
this pull request
Nov 5, 2020
Important fix: Lock state dir for preventing automatic clean-up by systemd-tmpfiles (rootless-containers/rootlesskit#188) Full changes:rootless-containers/rootlesskit@v0.10.0...v0.11.0 Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp> Upstream-commit: c6accc67f2e754a6f5a7e43eaddad9580a31cab3 Component: engine
docker-jenkins
pushed a commit
to docker-archive/docker-ce
that referenced
this pull request
Nov 9, 2020
Important fix: Lock state dir for preventing automatic clean-up by systemd-tmpfiles (rootless-containers/rootlesskit#188) Full changes:rootless-containers/rootlesskit@v0.10.0...v0.11.0 Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp> (cherry picked from commit c6accc67f2e754a6f5a7e43eaddad9580a31cab3) Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp> Upstream-commit: 4b181db52b8322dde5e6175bac917a21a49ff160 Component: engine
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.
Hi all,
here is the FIX for the created issue #185
Description
If the user don't pass the
--state-dirargument the internalStateDirTempflag will be set.On running the
Parentfunction a Shared BSD Lock LOCK_SH will be set on the stateDir.All locks will be removed with the
RootlesskitStateFileLock(/tmp/rootlesskitXXX/lock).I also added a test to check if the lock was created, but to test that on a real system you have to read the verify part.
Verify Systemd-tmpfiles cleanup resilience
OS: Ubuntu 18.04 LTS
Check tmp settings
cat /usr/lib/tmpfiles.d/tmp.confChange them if no cleanup for "old files" was configured.
sudo nano /usr/lib/tmpfiles.d/tmp.confSee possible configuration settings: tmpfiles.d(5)
Example: (for testing):
D /tmp 1777 root root 10s -Now all files will be deleted that are older than 10sec.
Run systemd-tmpfiles cleanup manually
To see whats happen we run the job with debug logs
sudo env SYSTEMD_LOG_LEVEL=debug systemd-tmpfiles --cleanCheck stateDir
The
rootlessXXXstateDir in/tmp/still exists.Show Lock
lsof /tmp/rotlesskitXXXXBg
Tobi