Skip to content
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

[23.0 backport] Restore active mount counts on live-restore #45825

Merged

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Jun 27, 2023

When live-restoring a container the volume driver needs be notified that there is an active mount for the volume.
Before this change the count is zero until the container stops and the uint64 overflows pretty much making it so the volume can never be removed until another daemon restart.

(cherry picked from commit 647c2a6)

- What I did

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@thaJeztah thaJeztah added this to the 23.0.7 milestone Jun 27, 2023
@neersighted neersighted force-pushed the 23.0_backport_fix_live_restore_local_vol_mounts branch from f1c35af to b50ff59 Compare June 27, 2023 17:39
@neersighted
Copy link
Member

neersighted commented Jun 27, 2023

Re-picked from 647c2a6 (as the original PR moved).

When live-restoring a container the volume driver needs be notified that
there is an active mount for the volume.
Before this change the count is zero until the container stops and the
uint64 overflows pretty much making it so the volume can never be
removed until another daemon restart.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 647c2a6)
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the 23.0_backport_fix_live_restore_local_vol_mounts branch from b50ff59 to b83b8b2 Compare June 28, 2023 07:52
@thaJeztah
Copy link
Member Author

thaJeztah commented Jun 28, 2023

Fixed the missing imports after the updated version;
https://github.com/moby/moby/compare/b50ff598f93e27e5c77fd0da8001f85c7ec8d03b..b83b8b2e4097b82508430a55c679771e5bb06b37

diff --git a/volume/local/local.go b/volume/local/local.go
index 50f3c21c2d..f156ea2339 100644
--- a/volume/local/local.go
+++ b/volume/local/local.go
@@ -6,2 +6,3 @@ package local // import "github.com/docker/docker/volume/local"
 import (
+       "context"
        "encoding/json"
@@ -13,2 +14,3 @@ import (

+       "github.com/containerd/containerd/log"
        "github.com/docker/docker/daemon/names"
diff --git a/volume/service/service.go b/volume/service/service.go
index a5615fe731..adc7fdb239 100644
--- a/volume/service/service.go
+++ b/volume/service/service.go
@@ -7,2 +7,3 @@ import (

+       "github.com/containerd/containerd/log"
        "github.com/docker/docker/api/types"

@thaJeztah thaJeztah merged commit 5272bca into moby:23.0 Jun 28, 2023
87 checks passed
@thaJeztah thaJeztah deleted the 23.0_backport_fix_live_restore_local_vol_mounts branch June 28, 2023 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants