Skip to content

OPM fails to create index with Podman 3.0.1 #689

@dubee

Description

@dubee

There was a change introduced in Podman after version 2.2.1 to display a warning message when the owner of the current cgroup could not be detected. When using OPM v1.14.3-34 with Podman 3.0.1-7 to add a bundle to an index, OPM fails because it does not expect this warning message. I have traced this problem to runner.go where OPM tries to run podman create. When trying to extract the ID from the create output, OPM fails as it does not expect the warning message to be in the output (id := strings.TrimSuffix(string(out), "\n").

I am running rootless in a container with this base image: registry.redhat.io/rhel8/podman:8.4. Runnnig yum update -y in the Dockerfile gives me Podman 3.0.1-7.

Here is the line of code where the problem is:
https://github.com/operator-framework/operator-registry/blob/master/pkg/containertools/runner.go#L139. Though the warning may cause problems with other Podman commands that OPM runs.

OPM failure log:

...
INFO[0003] running podman cp"
ERRO[0003] time="2021-06-23T09:27:21-04:00" level=warning msg="Failed to detect the owner for the current cgroup: stat /sys/fs/cgroup/systemd/docker/350ea3d90cc8a53bae50e9d52e0a2ba7fb1320b02b5649d9299e032481b38a1d: no such file or directory"
Error: container "time=\"2021-06-23T09" does not exist"
ERRO[0003] permissive mode disabled                      error="error copying container directory time=\"2021-06-23T09:27:21-04:00\" level=warning msg=\"Failed to detect the owner for the current cgroup: stat /sys/fs/cgroup/systemd/docker/350ea3d90cc8a53bae50e9d52e0a2ba7fb1320b02b5649d9299e032481b38a1d: no such file or directory\"\nError: container \"time=\\\"2021-06-23T09\" does not exist\n: exit status 125"
Error: error copying container directory time="2021-06-23T09:27:21-04:00" level=warning msg="Failed to detect the owner for the current cgroup: stat /sys/fs/cgroup/systemd/docker/350ea3d90cc8a53bae50e9d52e0a2ba7fb1320b02b5649d9299e032481b38a1d: no such file or directory"
Error: container "time=\"2021-06-23T09" does not exist

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.triagedIssue has been considered by a member of the OLM community

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions