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

feat: check & uninstall container engine if needed #8439

Merged

Conversation

cyril-corbon
Copy link
Contributor

@cyril-corbon cyril-corbon commented Jan 15, 2022

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

/kind bug

What this PR does / why we need it:
we should verify that docker / docker-ce is not installed when we install containerd

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Check & uninstall container engine if needed (when changing container engine defined)

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 15, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @cyril-corbon. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 15, 2022
@k8s-ci-robot k8s-ci-robot requested review from bozzo and oomichi January 15, 2022 19:41
@cyril-corbon cyril-corbon changed the title fix: remove docker / docker-ce before removing containerd fix: remove docker / docker-ce before instaling containerd Jan 15, 2022
@cristicalin
Copy link
Contributor

I'm assuming you are pushing this to address the discussion on #8431 but I don't quite like the approach of removing another container manager in the role that is supposed to cover a different one.

What about the scenario when someone wants to move from docker to cri-o or from cri-o to containerd; in this case we should add a different logic to detect the currently deployed container manager and check it against the desired one then perform a full clean up if necessary. The approach of uninstalling an unrelated container manager would leave unrelated configuration files (think /etc/docker) and state (think /var/lib/docker) behind which could go unnoticed and cause issues later in the cluster lifecycle.

@cyril-corbon
Copy link
Contributor Author

I thought only docker has containerd as dependency that's why I did that.

Maybe we could add a role to check if a container manager is installed before an installation and removed it ?

This role should remove the package and all his configurations file as you said

@cristicalin
Copy link
Contributor

Personally I would like to see a reset.yml task file added to each container manger role that could be called by a role responsible to detect discrepancies and replace the correct container manager this would ease the maintenance so that roles are specific to each container manager and meta roles don't have technology specific implementations.

@cyril-corbon
Copy link
Contributor Author

ok I will rename the pr and do that thanks for the feedback 🙇

@cyril-corbon cyril-corbon force-pushed the fix/containerd-remove-docker branch from b732932 to e01cefc Compare January 31, 2022 22:58
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 31, 2022
@cyril-corbon cyril-corbon changed the title fix: remove docker / docker-ce before instaling containerd feat: check & uninstall container engine if needed Jan 31, 2022
Signed-off-by: Cyril Corbon <corboncyril@gmail.com>
@cyril-corbon cyril-corbon force-pushed the fix/containerd-remove-docker branch from c66b3f7 to 6d4f41a Compare February 16, 2022 23:29
@cristicalin
Copy link
Contributor

Looks good @cyril-corbon , thanks for doing this!

/ok-to-test
/approve

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 19, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cristicalin, cyril-corbon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 19, 2022
@cristicalin
Copy link
Contributor

/cc @oomichi @floryut

@k8s-ci-robot k8s-ci-robot requested a review from floryut February 19, 2022 07:56
@oomichi
Copy link
Contributor

oomichi commented Feb 28, 2022

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 28, 2022
@k8s-ci-robot k8s-ci-robot merged commit 672e47a into kubernetes-sigs:master Feb 28, 2022
@floryut floryut added kind/container-managers Containers section in the release note and removed kind/bug Categorizes issue or PR as related to a bug. labels Mar 1, 2022
@cyril-corbon cyril-corbon deleted the fix/containerd-remove-docker branch March 6, 2022 08:01
sakuraiyuta pushed a commit to sakuraiyuta/kubespray that referenced this pull request Apr 16, 2022
Signed-off-by: Cyril Corbon <corboncyril@gmail.com>
@oomichi oomichi mentioned this pull request May 28, 2022
LuckySB pushed a commit to southbridgeio/kubespray that referenced this pull request Jun 29, 2023
Signed-off-by: Cyril Corbon <corboncyril@gmail.com>
LuckySB pushed a commit to southbridgeio/kubespray that referenced this pull request Oct 22, 2023
Signed-off-by: Cyril Corbon <corboncyril@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/container-managers Containers section in the release note lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants