cri-o: Dpkg error CRI-O conflict with Conmon

What happened?

Hi,

I’m facing a problem with cri-o update. Context : I manage a K8S cluster all the system is Debian 12. When I created the cluster I had used this repo (http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/1.28/Debian_12). But the latest of cri-o version was cri-o | 1.28.4~0. So I changed it to the new one (https://prod-cdn.packages.k8s.io/repositories/isv:/kubernetes:/addons:/cri-o:/stable:/v1.28/deb) and a newer version was available (1.28.9-1.1). During the apt upgrade process I just got an : Unpacking cri-o (1.28.9-1.1) over (1.28.4~0) ... dpkg: error processing archive /var/cache/apt/archives/cri-o_1.28.9-1.1_amd64.deb (--unpack): trying to overwrite '/usr/libexec/crio/conmon', which is also in package conmon 100:2.1.2~0 Errors were encountered while processing: /var/cache/apt/archives/cri-o_1.28.9-1.1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

Kind regards,

What did you expect to happen?

I just expect an upgrade without any issue.

How can we reproduce it (as minimally and precisely as possible)?

Upgrade a cri-o version from 1.28.4 to higher.

Anything else we need to know?

No response

CRI-O and Kubernetes version

$ crio --version
crio version 1.28.4
Version:        1.28.4
GitCommit:      unknown
GitCommitDate:  unknown
GitTreeState:   clean
BuildDate:      2024-04-10T20:59:38Z
GoVersion:      go1.19.8
Compiler:       gc
Platform:       linux/amd64
Linkmode:       dynamic
BuildTags:
  apparmor
  seccomp
  containers_image_ostree_stub
  exclude_graphdriver_btrfs
  exclude_graphdriver_devicemapper
  containers_image_openpgp
LDFlags:          -s -w -X github.com/cri-o/cri-o/internal/version.buildDate=2024-04-10T20:59:38Z
SeccompEnabled:   true
AppArmorEnabled:  true
$ kubectl version --output=json
{
  "clientVersion": {
    "major": "1",
    "minor": "29",
    "gitVersion": "v1.29.8",
    "gitCommit": "234bc63696ad15dcf62584b6ba48671bf0f25fb6",
    "gitTreeState": "clean",
    "buildDate": "2024-08-14T19:49:27Z",
    "goVersion": "go1.22.5",
    "compiler": "gc",
    "platform": "linux/amd64"
  },
  "kustomizeVersion": "v5.0.4-0.20230601165947-6ce0bf390ce3"
}

OS version

# On Linux:
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
$ uname -a
Linux vm-cld-pra-ren-k8s-worker02 6.1.0-23-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.99-1 (2024-07-15) x86_64 GNU/Linux

Additional environment details (AWS, VirtualBox, physical, etc.)

Virtual machine on Vmware 6.7.0

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 5
  • Comments: 16 (2 by maintainers)

Most upvoted comments

I’m seeing the same thing on ubuntu 24.04 using either 1.29 or 1.30. The 1.31 repo is apparently unsigned ciurrently

I think we’re saying that the issue here is that distro packages are adding a file that they shouldn’t. e.g. This will hopefully be addressed in Fedora by removing the offending files from the base distro conmon package: https://github.com/containers/conmon/pull/524. You might want to raise the issue with the debian package maintainers.

Hi, I just found a better way to upgrade smoothly and get through the conflict properly. On the concerned node (just classic drain), I had cri-o 1.28.4. I upgraded the package with apt upgrade and it will fails bc of conflict with conmon. After that fail, the system will keep the .deb in apt cache archive (/var/cache/apt/archives/). Then just navigate to it and apply _dpkg --force-overwrite -i cri-o_1.29.XX-X.X_XXX.deb_ and apt remove conmon. Normally after that cri-o is always running but with the runc and not crun, so now just reboot the node and clean up with apt autoremove. Hope this helps

Is this file necessary when combining older versions of cri-o with distro conmon? Yes? Then this is a regression introduced by the new version of cri-o, not by the distro conmon package. Removing the file in question would be an additional regression.

There’s no unilaterally reliable way to solve this from the distro’s point of view, because removing the file from the distro package will break things for anyone whose setup currently relies on the file being there. The only way to fix it is to do the transition the way it should always be done when moving files between packages; using the Replaces/Breaks/Conflicts/Depends, etc. mechanisms.