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

Fix containerd-related path cleanup on failed bootstrap/join and associated test. #910

Merged
merged 3 commits into from
Dec 20, 2024

Conversation

aznashwan
Copy link
Contributor

@aznashwan aznashwan commented Dec 17, 2024

  • cleanup: fix cleanup of non-symlink containerd paths on failed bootstrap/join-cluster.
  • integration: rename open_local_port() testing utility for clarity.
  • integration: fix test_containerd_path_cleanup_on_failed_init.

@aznashwan aznashwan requested a review from a team as a code owner December 17, 2024 15:51
@aznashwan aznashwan force-pushed the fix-lockfile-readlink branch from b551777 to 5d3f2a6 Compare December 17, 2024 15:53
Copy link
Member

@berkayoz berkayoz left a comment

Choose a reason for hiding this comment

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

Thanks for looking into this, left some comments

src/k8s/pkg/k8sd/app/hooks_remove.go Show resolved Hide resolved
tests/integration/tests/test_cleanup.py Outdated Show resolved Hide resolved
tests/integration/tests/test_util/util.py Outdated Show resolved Hide resolved
@aznashwan aznashwan force-pushed the fix-lockfile-readlink branch from 5d3f2a6 to e1f43d6 Compare December 18, 2024 09:54
Copy link
Member

@berkayoz berkayoz left a comment

Choose a reason for hiding this comment

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

LGTM, can we rebase and remove the skip added on #892 . This should also run the test

Nashwan Azhari added 2 commits December 18, 2024 12:28
Previously, the test was inducing the `bootstrap` failure by attempting
to pre-allocate the port of the kube-controller-manager.

This methodology wasn't applicable on any non-LocalHarness testing
setups, so the test was updated to induce the failure by pre-creating
the containerd socket directory (`/run/containerd`), which should lead
to the same cleanup logic being triggered.

Signed-off-by: Nashwan Azhari <[email protected]>
@aznashwan aznashwan force-pushed the fix-lockfile-readlink branch from e1f43d6 to 39531c1 Compare December 18, 2024 10:29
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

metrics-server:
enabled: true
extra-node-kube-apiserver-args:
--foo: bar
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great idea, it hadn't crossed my mind to induce the failure with incorrect args!

@bschimke95 bschimke95 merged commit a278270 into canonical:main Dec 20, 2024
18 checks passed
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.

3 participants