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

[20.10 backport] Restore active mount counts on live-restore #45826

Conversation

thaJeztah
Copy link
Member

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 19d651c)

- 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
Copy link
Member Author

I messed up this one; looks like some other changes must be included


[2023-06-27T12:18:06.194Z] Building test suite binary /go/src/github.com/docker/docker/integration/build/test.main
[2023-06-27T12:18:52.863Z] Building test suite binary /go/src/github.com/docker/docker/integration/config/test.main
[2023-06-27T12:18:52.863Z] Building test suite binary /go/src/github.com/docker/docker/integration/container/test.main
[2023-06-27T12:19:07.714Z] # github.com/docker/docker/volume/service
[2023-06-27T12:19:07.714Z] volume/service/service.go:271:70: undefined: volumetypes
[2023-06-27T12:19:07.714Z] # github.com/docker/docker/volume/service
[2023-06-27T12:19:07.714Z] volume/service/service.go:271:70: undefined: volumetypes
[2023-06-27T12:19:13.006Z] Building test suite binary /go/src/github.com/docker/docker/integration/daemon/test.main
[2023-06-27T12:19:13.006Z] # github.com/docker/docker/integration/daemon [github.com/docker/docker/integration/daemon.test]
[2023-06-27T12:19:13.006Z] integration/daemon/daemon_test.go:73:40: undefined: volume.CreateOptions

@thaJeztah thaJeztah marked this pull request as draft June 27, 2023 12:42
The /containers/{id}/wait can return a 400 (invalid argument) error if
httputils.ParseForm() fails.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0e5929f)
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit e444ac3)
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0119f79)
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
I had to check what the actual size was, so added it to the const's documentation.

While at it, also made use of it in a test, so that we're testing against the expected
value, and changed one alias to be consistent with other places where we alias this
import.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 821b4d4)
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
This should help with CI being unstable when generating the types (due
to Go randomizing order). Unfortunately, the (file) names are a bit ugly,
but addressing that in a follow-up.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit e4c6ca3)
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9060126)
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f19ef20)
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
@neersighted neersighted force-pushed the 20.10_backport_fix_live_restore_local_vol_mounts branch from 59e940c to 690db28 Compare June 27, 2023 19:08
@neersighted
Copy link
Member

neersighted commented Jun 27, 2023

I'm halfway through cherry-picking this (see what is pushed so far), but I'm not convinced it's worth taking to 20.10, as the changes are getting more invasive (e.g. I need to pull in #43632).

WDYT @cpuguy83 @thaJeztah @corhere

@neersighted neersighted force-pushed the 20.10_backport_fix_live_restore_local_vol_mounts branch 2 times, most recently from 7ac6922 to 7fd251e Compare June 27, 2023 19:17
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 176f66d)
Resolved conflicts:
	client/volume_inspect.go
	daemon/disk_usage.go
	integration/system/disk_usage_test.go
	volume/service/service.go
Co-authored-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
@neersighted neersighted force-pushed the 20.10_backport_fix_live_restore_local_vol_mounts branch from 7fd251e to 9ddd54f Compare June 27, 2023 19:19
@thaJeztah
Copy link
Member Author

I'd say don't bother for this branch as it's quite a corner case, and users would've had to deal with this for more than 3 years already, so 🤷

@thaJeztah
Copy link
Member Author

@thaJeztah thaJeztah deleted the 20.10_backport_fix_live_restore_local_vol_mounts branch June 28, 2023 21:14
@thaJeztah thaJeztah removed this from the 20.10.26 milestone Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants