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

Docker to containerd automated migration #1362

Merged
merged 11 commits into from
Jun 9, 2021

Conversation

kron4eg
Copy link
Member

@kron4eg kron4eg commented Jun 1, 2021

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1350

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Docker to containerd automated migration

@kubermatic-bot kubermatic-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. labels Jun 1, 2021
@kubermatic-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubermatic-bot kubermatic-bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jun 1, 2021
@kron4eg kron4eg marked this pull request as ready for review June 5, 2021 13:52
@kubermatic-bot kubermatic-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 5, 2021
@kron4eg kron4eg requested a review from xmudrii June 5, 2021 13:52
@kron4eg
Copy link
Member Author

kron4eg commented Jun 5, 2021

/retest

Copy link
Member

@xmudrii xmudrii left a comment

Choose a reason for hiding this comment

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

Left some tiny nits, but otherwise, it looks great.

I just have two additional remarks:

  • We should document this feature before closing the epic. Please create a subtask for documentation.
  • Have you tested this on all supported operating systems? If not, we should do that before merging the PR.

),

"yum-docker-ce-amzn": heredoc.Docf(`
{{- if or .FORCE .UPGRADE }}
sudo yum versionlock delete docker cri-tools || true
sudo yum versionlock delete docker cri-tools containerd
Copy link
Member

Choose a reason for hiding this comment

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

I think that we should keep || true here because of:

  • older clusters that might not have versionlock installed
  • if some package isn't version-locked (I'm not sure is versionlock failing in that case -- IIRC, it doesn't, but we should double-check)

Copy link
Member Author

Choose a reason for hiding this comment

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

  • the yum-plugin-versionlock is already installed at this point so it's always present.
  • yum versionlock delete is very liberal and if you pass it even non-existing packages it wouldn’t complain (e.g. giving you non-zero exist status)

return err
}

s.Logger.Warn("roll-over your machineDeployments to get containerd")
Copy link
Member

Choose a reason for hiding this comment

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

Tiny nit: we usually start log messages with a capital letter. Also, what do you think about rephrasing this message to include some more details?

Suggested change
s.Logger.Warn("roll-over your machineDeployments to get containerd")
s.Logger.Warn("Roll-over your MachineDeployments to migrate the worker nodes to containerd")

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, changed that to a link to doc with how to launch a rolling restart of machineDeployment.

@@ -184,79 +215,32 @@ var (
sudo yum-config-manager --save --setopt=docker-ce-stable.module_hotfixes=true
{{ end }}

sudo yum install -y yum-plugin-versionlock
Copy link
Member

Choose a reason for hiding this comment

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

I don't think it's guaranteed that the versionlock plugin will be installed by default. We should still install it explicitly to be sure.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's removed here because it's the second time it's installed. So we still have versionlock plugin.

@kron4eg
Copy link
Member Author

kron4eg commented Jun 7, 2021

Have you tested this on all supported operating systems? If not, we should do that before merging the PR.

There might be a problem with flatcar.

@kron4eg
Copy link
Member Author

kron4eg commented Jun 7, 2021

/retest

1 similar comment
@kron4eg
Copy link
Member Author

kron4eg commented Jun 7, 2021

/retest

@kron4eg
Copy link
Member Author

kron4eg commented Jun 7, 2021

/retest

@kron4eg
Copy link
Member Author

kron4eg commented Jun 7, 2021

/hold

until docs are ready

@kubermatic-bot kubermatic-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 7, 2021
@kron4eg
Copy link
Member Author

kron4eg commented Jun 7, 2021

@xmudrii despite it's onhold (waiting for docs), it's ready for a review.

@kron4eg kron4eg force-pushed the docker-to-containerd branch 2 times, most recently from ef42b95 to 3ca29be Compare June 8, 2021 12:23
@kron4eg
Copy link
Member Author

kron4eg commented Jun 8, 2021

/retest

@kron4eg
Copy link
Member Author

kron4eg commented Jun 8, 2021

docs PR: kubermatic/docs#712

@kron4eg
Copy link
Member Author

kron4eg commented Jun 8, 2021

/unhold

@kubermatic-bot kubermatic-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 8, 2021
Signed-off-by: Artiom Diomin <kron82@gmail.com>
Signed-off-by: Artiom Diomin <kron82@gmail.com>
Signed-off-by: Artiom Diomin <kron82@gmail.com>
Signed-off-by: Artiom Diomin <kron82@gmail.com>
Signed-off-by: Artiom Diomin <kron82@gmail.com>
Signed-off-by: Artiom Diomin <kron82@gmail.com>
Signed-off-by: Artiom Diomin <kron82@gmail.com>
Signed-off-by: Artiom Diomin <kron82@gmail.com>
Signed-off-by: Artiom Diomin <kron82@gmail.com>
Signed-off-by: Artiom Diomin <kron82@gmail.com>
Signed-off-by: Artiom Diomin <kron82@gmail.com>
@mate4st mate4st self-assigned this Jun 9, 2021
@mate4st
Copy link
Contributor

mate4st commented Jun 9, 2021

/lgtm
/approve

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 9, 2021
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 6a2c4be8abe8d7c027bb0990928bec3cb0f1ae46

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kron4eg, WeirdMachine

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:
  • OWNERS [WeirdMachine,kron4eg]

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

@kubermatic-bot kubermatic-bot merged commit 193ff4a into kubermatic:master Jun 9, 2021
@kubermatic-bot kubermatic-bot added this to the KubeOne 1.3 milestone Jun 9, 2021
@kron4eg kron4eg deleted the docker-to-containerd branch June 9, 2021 14:47
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. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

automate Docker -> Containerd migration
4 participants