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

Do not conflict kubernetes-cni package for RPMs #1367

Closed
wants to merge 1 commit into from
Closed

Do not conflict kubernetes-cni package for RPMs #1367

wants to merge 1 commit into from

Conversation

saschagrunert
Copy link
Member

What type of PR is this?

/kind regression

What this PR does / why we need it:

This should unbreak previous releases for debs and rpms which still rely
on the kubernetes-cni package.

Which issue(s) this PR fixes:

Fixes kubernetes/kubernetes#92242

Special notes for your reviewer:

Hold on, I might be completely wrong with that change. I'm not exactly sure about the implications so please review with care.

Does this PR introduce a user-facing change?

- Fixed `kubernetes-cni` obsoletion/replacement to unbreak previous deb/rpm packages

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/regression Categorizes issue or PR as related to a regression from a prior release. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 18, 2020
@k8s-ci-robot k8s-ci-robot requested review from jimangel and xmudrii June 18, 2020 12:53
@k8s-ci-robot k8s-ci-robot added the sig/release Categorizes an issue or PR as relevant to SIG Release. label Jun 18, 2020
@saschagrunert saschagrunert changed the title WIP: Do not replace/obsolete kubernetes-cni package Do not replace/obsolete kubernetes-cni package Jun 18, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 18, 2020
@saschagrunert
Copy link
Member Author

/hold

I'm not sure about this solution.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 18, 2020
packages/deb/bionic/kubelet/debian/control Outdated Show resolved Hide resolved
packages/rpm/kubelet.spec Outdated Show resolved Hide resolved
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: saschagrunert
To complete the pull request process, please assign idealhack
You can assign the PR to them by writing /assign @idealhack in a comment when ready.

The full list of commands accepted by this bot can be found 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

@saschagrunert saschagrunert changed the title Do not replace/obsolete kubernetes-cni package Do not conflict kubernetes-cni package for RPMs Jun 18, 2020
This should unbreak previous releases for debs and rpms which still rely
on the kubernetes-cni package.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
@saschagrunert
Copy link
Member Author

Added the review suggestions, please take a look.

@dkoshkin
Copy link

dkoshkin commented Jun 18, 2020

@saschagrunert I just tried this on a personal repo having just Conflicts.
With this change it installs older versions correctly.
But the newer versions would require users to uninstall kubernetes-cni on upgrades.

[root@92b03c1accbf bin]# yum install kubelet-1.17.7-0
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: mirror.keystealth.org
 * extras: mirror.sfo12.us.leaseweb.net
 * updates: mirror.web-ster.com
Resolving Dependencies
--> Running transaction check
---> Package kubelet.x86_64 0:1.16.3-0 will be updated
---> Package kubelet.x86_64 0:1.17.7-0 will be an update
--> Processing Conflict: kubelet-1.17.7-0.x86_64 conflicts kubernetes-cni
--> Finished Dependency Resolution
Error: kubelet conflicts with kubernetes-cni-0.7.5-0.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

@dkoshkin
Copy link

dkoshkin commented Jun 18, 2020

Removing Confclits leads to below on upgrades, yum refuses to override the existing files:

$ yum install kubelet-1.17.7-0
...
Transaction check error:
  file /opt/cni/bin/bridge from install of kubelet-1.17.7-0.x86_64 conflicts with file from package kubernetes-cni-0.7.5-0.x86_64
  file /opt/cni/bin/dhcp from install of kubelet-1.17.7-0.x86_64 conflicts with file from package kubernetes-cni-0.7.5-0.x86_64
  file /opt/cni/bin/flannel from install of kubelet-1.17.7-0.x86_64 conflicts with file from package kubernetes-cni-0.7.5-0.x86_64
  file /opt/cni/bin/host-device from install of kubelet-1.17.7-0.x86_64 conflicts with file from package kubernetes-cni-0.7.5-0.x86_64
  file /opt/cni/bin/host-local from install of kubelet-1.17.7-0.x86_64 conflicts with file from package kubernetes-cni-0.7.5-0.x86_64
  file /opt/cni/bin/ipvlan from install of kubelet-1.17.7-0.x86_64 conflicts with file from package kubernetes-cni-0.7.5-0.x86_64
  file /opt/cni/bin/loopback from install of kubelet-1.17.7-0.x86_64 conflicts with file from package kubernetes-cni-0.7.5-0.x86_64
  file /opt/cni/bin/macvlan from install of kubelet-1.17.7-0.x86_64 conflicts with file from package kubernetes-cni-0.7.5-0.x86_64
  file /opt/cni/bin/portmap from install of kubelet-1.17.7-0.x86_64 conflicts with file from package kubernetes-cni-0.7.5-0.x86_64
  file /opt/cni/bin/ptp from install of kubelet-1.17.7-0.x86_64 conflicts with file from package kubernetes-cni-0.7.5-0.x86_64
  file /opt/cni/bin/tuning from install of kubelet-1.17.7-0.x86_64 conflicts with file from package kubernetes-cni-0.7.5-0.x86_64
  file /opt/cni/bin/vlan from install of kubelet-1.17.7-0.x86_64 conflicts with file from package kubernetes-cni-0.7.5-0.x86_64

Error Summary
-------------

@dkoshkin
Copy link

I think the simplest path forward would be to remove the cni binaries out of the Kubelet spec and just create the kubernetes-cni-0.8.6 package like there is with the older versions.
And bring back

Requires: kubernetes-cni >= 0.8.6

@xmudrii
Copy link
Member

xmudrii commented Jun 18, 2020

@dkoshkin We had a couple of problems with that approach before, breaking the workflow for many users. IIRC, that was the biggest reason why we didn’t create a new version of that package.

@jimangel
Copy link
Member

I just tried this on a personal repo having just Conflicts.
With this change it installs older versions correctly.
But the newer versions would require users to uninstall kubernetes-cni on upgrades.

I think this might be the best option. Release notes and upgrade documentation could include a note about the pre-req.

If someone doesn't read that, it appears the package manager tips them off.

@dkoshkin
Copy link

Verified with Conflicts, doing yum remove and yum install.

[root@2c8f4abb3bf3 /]# yum remove kubernetes-cni-0.7.5-0
Loaded plugins: fastestmirror, ovl
Resolving Dependencies
--> Running transaction check
---> Package kubernetes-cni.x86_64 0:0.7.5-0 will be erased
--> Processing Dependency: kubernetes-cni >= 0.7.5 for package: kubelet-1.16.3-0.x86_64
--> Running transaction check
---> Package kubelet.x86_64 0:1.16.3-0 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================
 Package                                                     Arch                                                Version                                                  Repository                                                     Size
==============================================================================================================================================================================================================================================
Removing:
 kubernetes-cni                                              x86_64                                              0.7.5-0                                                  @konvoy-packages                                               35 M
Removing for dependencies:
 kubelet                                                     x86_64                                              1.16.3-0                                                 @konvoy-packages                                              137 M

Transaction Summary
==============================================================================================================================================================================================================================================
Remove  1 Package (+1 Dependent package)

Installed size: 173 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : kubelet-1.16.3-0.x86_64                                                                                                                                                                                                    1/2
  Erasing    : kubernetes-cni-0.7.5-0.x86_64                                                                                                                                                                                              2/2
  Verifying  : kubernetes-cni-0.7.5-0.x86_64                                                                                                                                                                                              1/2
  Verifying  : kubelet-1.16.3-0.x86_64                                                                                                                                                                                                    2/2

Removed:
  kubernetes-cni.x86_64 0:0.7.5-0

Dependency Removed:
  kubelet.x86_64 0:1.16.3-0

Complete!
[root@2c8f4abb3bf3 /]# yum install kubelet-1.17.7-0
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: mirror.web-ster.com
 * extras: mirror.sfo12.us.leaseweb.net
 * updates: mirror.web-ster.com
Resolving Dependencies
--> Running transaction check
---> Package kubelet.x86_64 0:1.17.7-0 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================
 Package                                                Arch                                                  Version                                                    Repository                                                      Size
==============================================================================================================================================================================================================================================
Installing:
 kubelet                                                x86_64                                                1.17.7-0                                                   konvoy-packages                                                 40 M

Transaction Summary
==============================================================================================================================================================================================================================================
Install  1 Package

Total download size: 40 M
Installed size: 180 M
Is this ok [y/d/N]: y
Downloading packages:
kubelet-1.17.7-0.x86_64.rpm                                                                                                                                                                                            |  40 MB  00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : kubelet-1.17.7-0.x86_64                                                                                                                                                                                                    1/1
  Verifying  : kubelet-1.17.7-0.x86_64                                                                                                                                                                                                    1/1

Installed:
  kubelet.x86_64 0:1.17.7-0

Complete!

@saschagrunert
Copy link
Member Author

Okay cool, where can we document that? Is there any official documentation for those yum/deb repos? Otherwise I would point that out in the RPM spec.

@saschagrunert
Copy link
Member Author

/retest

@tpepper
Copy link
Member

tpepper commented Jun 18, 2020

Okay cool, where can we document that? Is there any official documentation for those yum/deb repos? Otherwise I would point that out in the RPM spec.

The k8s.io docs don't go into using the repos directly, eg: https://kubernetes.io/docs/setup/

There's getting started for local learning (kind, minikube) and for prod various deploy tools. But no recommendation of using the yum and apt repos directly (vs indirectly through kubeadm).

@neolit123
Copy link
Member

the existing yum/apt repositories are mentioned here:
https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#installing-kubeadm-kubelet-and-kubectl

a note can be added there before the installation steps, but it must be done for all k/website branches where this behavior changed.

@saschagrunert
Copy link
Member Author

Corresponding docs PR: kubernetes/website#21898

Copy link
Member Author

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

Ping @tpepper and @justaugustus for general consensus.

@saschagrunert
Copy link
Member Author

/hold cancel

Seeking for approval. If this one got merged we have to:

  • rebuild the RPM packages
  • merge the k/website docs PR

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 22, 2020
@justaugustus
Copy link
Member

/hold just until we have a final decision

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 22, 2020
@justaugustus
Copy link
Member

Superseded by #1375.
/close

@k8s-ci-robot
Copy link
Contributor

@justaugustus: Closed this PR.

In response to this:

Superseded by #1375.
/close

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.

@saschagrunert saschagrunert deleted the kubernetes-cni branch June 23, 2020 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/regression Categorizes issue or PR as related to a regression from a prior release. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/release Categorizes an issue or PR as relevant to SIG Release. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kubeadm and kubelet 1.15 fail to install on centos 7 after patches released today
8 participants