Skip to content

[24.0 backport] daemon/c8d: Use non cancellable context in defers#46686

Merged
thaJeztah merged 5 commits intomoby:24.0from
thaJeztah:24.0_backport_c8d_push_defer_noncancellable_context
Oct 23, 2023
Merged

[24.0 backport] daemon/c8d: Use non cancellable context in defers#46686
thaJeztah merged 5 commits intomoby:24.0from
thaJeztah:24.0_backport_c8d_push_defer_noncancellable_context

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

backports:

some small changes in this patch, because logrus is still used in this branch.

- Description for the changelog

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

vvoland and others added 5 commits October 20, 2023 16:43
Copy the implementation of `context.WithoutCancel` introduced in Go 1.21
to be able to use it when building with older versions.
This will use the stdlib directly when building with Go 1.21+.

Signed-off-by: Paweł Gronowski <[email protected]>
(cherry picked from commit f6e44bc)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Log a warning if we encounter an error when releasing leases. While it
may not have direct consequences, failing to release the lease should be
unexpected, so let's make them visible.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 28d201f)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Also rename variables that collided with imports.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit aefbd49)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit e10eca3)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Fixes leases not being released when operation was cancelled.

Signed-off-by: Paweł Gronowski <[email protected]>
(cherry picked from commit 6f27bef)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah added status/2-code-review containerd-integration Issues and PRs related to containerd integration labels Oct 20, 2023
@thaJeztah thaJeztah added this to the 24.0.7 milestone Oct 20, 2023
@thaJeztah thaJeztah marked this pull request as ready for review October 20, 2023 16:40
@thaJeztah thaJeztah merged commit c2e7c32 into moby:24.0 Oct 23, 2023
@thaJeztah thaJeztah deleted the 24.0_backport_c8d_push_defer_noncancellable_context branch October 23, 2023 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

containerd-integration Issues and PRs related to containerd integration status/2-code-review

Projects

Development

Successfully merging this pull request may close these issues.

2 participants