Skip to content

Conversation

irozzo-1A
Copy link
Contributor

What this PR does / why we need it:
Recently docker introduced docker-ce repository for CentOS 8 it only contains docker version 19.03.13-3. This caused a regression when using RHEL/CentOS 8, because previously we were using CentOS 7 repo indistinctly for CentOS/RHEL 7/8 but now the docker versions we were installing are no longer available in CentOS 8 repo.

As we do not have OS versioning yet the quick and dirty solution is to always use CentOS 7 repo for the docker versions that are not available on both repos.

https://download.docker.com/linux/centos/8/x86_64/stable/Packages/
https://download.docker.com/linux/centos/7/x86_64/stable/Packages/

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

Special notes for your reviewer:

Optional Release Note:

Fix docker installation for CentOS/RHEL 8 
@kubermatic-bot kubermatic-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 24, 2020
@kron4eg kron4eg self-assigned this Sep 24, 2020
@kron4eg
Copy link
Member

kron4eg commented Sep 24, 2020

It's impossible to deduct CentOS release from the kubelet version, this logic is flawed.

For now I propose to patch .repo unconditionally, once we have somehow figured out OS versioning we could return to this part.

@irozzo-1A
Copy link
Contributor Author

irozzo-1A commented Sep 24, 2020

It's impossible to deduct CentOS release from the kubelet version, this logic is flawed.

For now I propose to patch .repo unconditionally, once we have somehow figured out OS versioning we could return to this part.

@kron4eg I'm not deducing the CentOS release from the kubelet version, I'm unconditionally patching the repo for docker versions that are not present in both CentOS 7 and 8 repos, that is all but 19.03.13-3. The problem is that kubernetes versions previous to 1.17 do not work with this docker version.

@irozzo-1A irozzo-1A force-pushed the update-yum-docker-version branch 2 times, most recently from d1aff12 to 718c7e4 Compare September 24, 2020 19:18
@kron4eg
Copy link
Member

kron4eg commented Sep 24, 2020

versions that are not present in both CentOS 7 and 8 repos, that is all but 19.03.13-3.

[root@bc944ddd6770 ~]# yum install docker-ce-${DOCKER_VERSION} docker-ce-cli-${DOCKER_VERSION} Failed to set locale, defaulting to C.UTF-8 Last metadata expiration check: 0:01:02 ago on Thu Sep 24 20:00:30 2020. Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: docker-ce x86_64 3:19.03.13-3.el7 docker-ce-stable 24 M docker-ce-cli x86_64 1:19.03.13-3.el7 docker-ce-stable 38 M

This is with patched .repo file. Latest an greatest 19.03.13 in $releasever=7 repo.

@irozzo-1A
Copy link
Contributor Author

This is with patched .repo file. Latest an greatest 19.03.13 in $releasever=7 repo.

I'm not sure to understand your point, let me try to explain my logic again.

At the moment 19.03.13 is the only version that is present on both centos 7 and 8 repos (it's also the only version present in centos 8 docker stable repo). It is preferable and safer to to use the appropriate repo instead of enforcing centos 7 when we can use such version, that is for k8s versions >= 1.17.

Unfortunately k8s versions < 1.17 do not support docker versions more recent than 18.06, in those cases we are obliged to use centos 7 repo.

@kron4eg
Copy link
Member

kron4eg commented Sep 25, 2020

My point is that we have everything what we need in centos/7 repo, we don't need any guessing and please always patch the .repo file. We will do the proper fix once we decided on OS versioning.

@xrstf
Copy link
Contributor

xrstf commented Sep 25, 2020

When there are no downsides to always using the repo for 7, I would prefer the simpler solution. It doesn't introduce a preliminary OS versioning hack that we would have to revert later on.

@irozzo-1A
Copy link
Contributor Author

@xrstf Well using the repository for another version and doing a hack for installing docker is something I consider a downside.

It's true that it is slightly more complex, but has the benefit of using the appropriate repository for all k8s versions >= 1.17 and it's already implemented.

What kind of risks you foresee with this approach?

@xmudrii
Copy link
Member

xmudrii commented Sep 25, 2020

I agree with @xrstf and @kron4eg. I'd prefer that we keep it simple and just use the CoreOS7 repo for both versions until we don't get the OS versioning.

@irozzo-1A
Copy link
Contributor Author

irozzo-1A commented Sep 25, 2020

@xrstf @kron4eg As the consensus is to always use the centos7 repo I will conform to it. I don't fully understand the logic behind this position, but this has to be fixed soon.

@irozzo-1A irozzo-1A force-pushed the update-yum-docker-version branch from 718c7e4 to a5185c3 Compare September 25, 2020 10:09
@kubermatic-bot kubermatic-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 25, 2020
Copy link
Contributor

@xrstf xrstf left a comment

Choose a reason for hiding this comment

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

/approve

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 25, 2020
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: e22dbed172348a3149c8f41af1373013cffae0e6

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: irozzo-1A, xrstf

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

@kubermatic-bot kubermatic-bot merged commit b57f7e5 into kubermatic:master Sep 25, 2020
@irozzo-1A
Copy link
Contributor Author

/cherry-pick release/v1.14

@kubermatic-bot
Copy link
Contributor

@irozzo-1A: #826 failed to apply on top of branch "release/v1.14":

Applying: Fix releasever to 7 for RHEL and CentOS in yum docker repository Using index info to reconstruct a base tree... M	pkg/userdata/centos/provider.go M	pkg/userdata/centos/testdata/kubelet-v1.15-aws.yaml M	pkg/userdata/centos/testdata/kubelet-v1.16-aws.yaml M	pkg/userdata/centos/testdata/kubelet-v1.17-aws-external.yaml M	pkg/userdata/centos/testdata/kubelet-v1.17-aws.yaml M	pkg/userdata/centos/testdata/kubelet-v1.17-vsphere-mirrors.yaml M	pkg/userdata/centos/testdata/kubelet-v1.17-vsphere-proxy.yaml M	pkg/userdata/centos/testdata/kubelet-v1.17-vsphere.yaml M	pkg/userdata/rhel/provider.go M	pkg/userdata/rhel/testdata/kubelet-v1.15-aws.yaml M	pkg/userdata/rhel/testdata/kubelet-v1.16-aws.yaml M	pkg/userdata/rhel/testdata/kubelet-v1.17-aws-external.yaml M	pkg/userdata/rhel/testdata/kubelet-v1.17-aws.yaml M	pkg/userdata/rhel/testdata/kubelet-v1.17-vsphere-mirrors.yaml M	pkg/userdata/rhel/testdata/kubelet-v1.17-vsphere-proxy.yaml M	pkg/userdata/rhel/testdata/kubelet-v1.17-vsphere.yaml Falling back to patching base and 3-way merge... Auto-merging pkg/userdata/rhel/testdata/kubelet-v1.17-vsphere.yaml CONFLICT (content): Merge conflict in pkg/userdata/rhel/testdata/kubelet-v1.17-vsphere.yaml Auto-merging pkg/userdata/rhel/testdata/kubelet-v1.17-vsphere-proxy.yaml CONFLICT (content): Merge conflict in pkg/userdata/rhel/testdata/kubelet-v1.17-vsphere-proxy.yaml Auto-merging pkg/userdata/rhel/testdata/kubelet-v1.17-vsphere-mirrors.yaml CONFLICT (content): Merge conflict in pkg/userdata/rhel/testdata/kubelet-v1.17-vsphere-mirrors.yaml Auto-merging pkg/userdata/rhel/testdata/kubelet-v1.17-aws.yaml CONFLICT (content): Merge conflict in pkg/userdata/rhel/testdata/kubelet-v1.17-aws.yaml Auto-merging pkg/userdata/rhel/testdata/kubelet-v1.17-aws-external.yaml CONFLICT (content): Merge conflict in pkg/userdata/rhel/testdata/kubelet-v1.17-aws-external.yaml Auto-merging pkg/userdata/rhel/testdata/kubelet-v1.16-aws.yaml CONFLICT (content): Merge conflict in pkg/userdata/rhel/testdata/kubelet-v1.16-aws.yaml Auto-merging pkg/userdata/rhel/testdata/kubelet-v1.15-aws.yaml CONFLICT (content): Merge conflict in pkg/userdata/rhel/testdata/kubelet-v1.15-aws.yaml Auto-merging pkg/userdata/rhel/provider.go CONFLICT (content): Merge conflict in pkg/userdata/rhel/provider.go Auto-merging pkg/userdata/centos/testdata/kubelet-v1.17-vsphere.yaml CONFLICT (content): Merge conflict in pkg/userdata/centos/testdata/kubelet-v1.17-vsphere.yaml Auto-merging pkg/userdata/centos/testdata/kubelet-v1.17-vsphere-proxy.yaml CONFLICT (content): Merge conflict in pkg/userdata/centos/testdata/kubelet-v1.17-vsphere-proxy.yaml Auto-merging pkg/userdata/centos/testdata/kubelet-v1.17-vsphere-mirrors.yaml CONFLICT (content): Merge conflict in pkg/userdata/centos/testdata/kubelet-v1.17-vsphere-mirrors.yaml Auto-merging pkg/userdata/centos/testdata/kubelet-v1.17-aws.yaml CONFLICT (content): Merge conflict in pkg/userdata/centos/testdata/kubelet-v1.17-aws.yaml Auto-merging pkg/userdata/centos/testdata/kubelet-v1.17-aws-external.yaml CONFLICT (content): Merge conflict in pkg/userdata/centos/testdata/kubelet-v1.17-aws-external.yaml Auto-merging pkg/userdata/centos/testdata/kubelet-v1.16-aws.yaml CONFLICT (content): Merge conflict in pkg/userdata/centos/testdata/kubelet-v1.16-aws.yaml Auto-merging pkg/userdata/centos/testdata/kubelet-v1.15-aws.yaml CONFLICT (content): Merge conflict in pkg/userdata/centos/testdata/kubelet-v1.15-aws.yaml Auto-merging pkg/userdata/centos/provider.go CONFLICT (content): Merge conflict in pkg/userdata/centos/provider.go error: Failed to merge in the changes. hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 Fix releasever to 7 for RHEL and CentOS in yum docker repository When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". 

In response to this:

/cherry-pick release/v1.14

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.

irozzo-1A added a commit to irozzo-1A/machine-controller that referenced this pull request Sep 25, 2020
…ermatic#826) * Fix releasever to 7 for RHEL and CentOS in yum docker repository * Fix e2e tests
kubermatic-bot pushed a commit that referenced this pull request Sep 25, 2020
…ory (#826) (#828) * Fix releasever to 7 for RHEL and CentOS in yum docker repository (#826) * Fix releasever to 7 for RHEL and CentOS in yum docker repository * Fix e2e tests * Disable CoreOS E2E tests on GCE and DigitalOcean (#822) * Disable CoreOS E2E tests on DigitalOcean * Disable CoreOS E2E tests on GCE * adjust the source url for the registry server (#794) Signed-off-by: Moath Qasim <moad.qassem@gmail.com> Signed-off-by: Moath Qasim <moad.qassem@gmail.com> Co-authored-by: Marko Mudrinić <mudrinic.mare@gmail.com> Co-authored-by: Moath Qasim <moad.qassem@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. 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. sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

5 participants