Thanks to visit codestin.com
Credit goes to github.com

Skip to content

cri-o assumes criu binary is in /usr/sbin/criu #6337

@hesch

Description

@hesch

What happened?

I tried to restore a container from an checkpoint image following the not yet published article here: kubernetes/website#37412
The checkpointing process worked without any problems.

On restore the conmon process did not find my criu executable which is located in /usr/local/sbin/criu on my machine.

What did you expect to happen?

cri-o should find the CRIU executable on restore if it is in the PATH.

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

  1. Install CRIU in a non-standard location
  2. Create a checkpoint image
  3. Try to restore the checkpoint image

Anything else we need to know?

It seems this is implemented here:

if restore {
// The CRIU binary is usually in /usr/sbin/criu
if v, found := os.LookupEnv("PATH"); found {
cmd.Env = append(cmd.Env, fmt.Sprintf("PATH=/usr/sbin/%s", v))
}
}

CRI-O and Kubernetes version

Details
$ crio --version
crio version 1.25.0
Version:        1.25.0
GitCommit:      1e6fd9c520d03d47835d1d4c3209e0f77c38f542
GitCommitDate:  2022-10-20T13:28:54Z
GitTreeState:   clean
BuildDate:      2022-10-21T14:17:22Z
GoVersion:      go1.19.2
Compiler:       gc
Platform:       linux/arm
Linkmode:       dynamic
BuildTags:
  containers_image_ostree_stub
  containers_image_openpgp
  seccomp
  selinux
LDFlags:          unknown
SeccompEnabled:   true
AppArmorEnabled:  false
Dependencies:
$ kubectl --version
Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.0", GitCommit:"a866cbe2e5bbaa01cfd5e969aa3e033f3282a8a2", GitTreeState:"clean", BuildDate:"2022-08-23T17:44:59Z", GoVersion:"go1.19", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.2+k3s1", GitCommit:"53c268d8eb90ceea5e1c7865f89db5c7fb8763bc", GitTreeState:"clean", BuildDate:"2022-09-28T16:30:18Z", GoVersion:"go1.19.1", Compiler:"gc", Platform:"linux/arm"}

OS version

Details
# On Linux:
$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
$ uname -a
Linux node1 5.15.74-v7l-hs-cr-kernel+ #1 SMP Mon Oct 17 19:16:10 CEST 2022 armv7l GNU/Linux

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

Details

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions