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

Cleans up containers and shims on microk8s stop and snap removal #4755

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

claudiubelu
Copy link
Contributor

@claudiubelu claudiubelu commented Nov 25, 2024

Summary

The containerd shims and the containers are now removed in both classic and strict modes when stopping microk8s (microk8s stop) or when removing the snap.

Note that ctr container delete has no --force flag.

Adds additional assertion in the upgrade test, ensuring that the Pods / containers have been removed on snap removal.

Adds additional test, ensuring that the Pods / containers have been removed when running microk8s stop.

Changes

The Kubernetes-related containers / Pods are now stopped when running microk8s stop. The same containers / Pods are no longer leaked on snap removal.

Testing

Added extra assertions and integration test to ensure the new behaviour.

Possible Regressions

Checklist

  • Read the contributions page.
  • Submitted the CLA form, if you are a first time contributor.
  • The introduced changes are covered by unit and/or integration tests.

Notes

Inspired by: #4693
Closes: #3969

The containerd shims and the containers are now removed in both classic
and strict modes when stopping microk8s (microk8s stop) or when removing
the snap.

Note that ctr container delete has no ``--force`` flag.

Adds additional assertion in the upgrade test, ensuring that the Pods /
containers have been removed on snap removal.

Adds additional test, ensuring that the Pods / containers have been
removed when running microk8s stop.
Copy link
Contributor

@bschimke95 bschimke95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bschimke95 bschimke95 merged commit 941b781 into canonical:master Nov 29, 2024
10 of 11 checks passed
@abhilashshetty04
Copy link

Hi Folks, Is this part of any release yet?

@mathnitin
Copy link

Will this be available for microk8s 1.30 release? If so, can we please have a date

@ktsakalozos
Copy link
Member

@abhilashshetty04 @mathnitin this work will initially ship with the 1.32 release. Assuming we do not run into any issues with it we will consider backporting it to older releases.

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.

microk8s stop command does not shutdown previous deployed containers
5 participants