Bug 1837755

Summary: --init feature useless out of the box
Product: Red Hat Enterprise Linux 8 Reporter: Bill Nottingham <notting>
Component: podmanAssignee: Jindrich Novy <jnovy>
Status: CLOSED ERRATA QA Contact: atomic-bugs <atomic-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: ---CC: ajia, bbaude, ddarrah, dornelas, dwalsh, jhocutt, jligon, jnovy, lsm5, marjones, mheon, smccarty, tsweeney, vrothber, walters, ypu
Target Milestone: rcKeywords: FutureFeature
Target Release: 8.3Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: podman 2.0.2-2 and newer Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 03:05:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1186913, 1804543    

Description Bill Nottingham 2020-05-19 22:08:13 UTC
Description of problem:

[cloud-user@rhel8-base ~]$ podman run --init memcached:alpine sh
Trying to pull registry.access.redhat.com/memcached:alpine...
  name unknown: Repo not found
...
Trying to pull docker.io/library/memcached:alpine...
Getting image source signatures
...
Storing signatures
Error: container-init binary not found on the host: stat /usr/libexec/podman/catatonit: no such file or directory
[cloud-user@rhel8-base ~]$ sudo dnf list \*catatonit\*
Updating Subscription Management repositories.
Last metadata expiration check: 0:01:23 ago on Tue 19 May 2020 06:04:38 PM EDT.
Error: No matching Packages to list
[cloud-user@rhel8-base ~]$ sudo dnf install /usr/libexec/podman/catatonit
Updating Subscription Management repositories.
Last metadata expiration check: 0:01:35 ago on Tue 19 May 2020 06:04:38 PM EDT.
No match for argument: /usr/libexec/podman/catatonit
Error: Unable to find a match: /usr/libexec/podman/catatonit

Version-Release number of selected component (if applicable):

podman-1.6.4-11.module+el8.2.0+6368+cf16aa14.x86_64

How reproducible:

100%

Steps to Reproduce:
1. see docker --init
2. google for podman replacement
3. find https://github.com/containers/libpod/pull/2045
4. try to use it

Actual results:

<sad trombone>

Additional info:

Guess we'll keep bundling tini in our images.

Comment 3 Matthew Heon 2020-05-20 13:48:01 UTC
Two potential approaches here:
1. If there is another init-type binary available in the repos (`tini` for example) we can swap the config files to point to that. I'm not optimistic about this being the case
2. We try and get catatoinit packaged for the next reasonable RHEL release (8.3, maybe) and ship it there, but ensuring the init we want to use is available (We could also package another init, but if we're already going through the trouble, might as well grab the one we wanted to use).

I know there were significant holdups getting katatoinit into Fedora, but AFAIK those have been resolved now.

Going to reassign to Jindrich as this one seems like a packaging issue.

Comment 4 Jindrich Novy 2020-05-20 14:29:32 UTC
catatonit has only been recently added to Fedora. Time to add it to container-tools Scott, Dan, Valentin?

Comment 5 Valentin Rothberg 2020-05-20 14:36:12 UTC
Sounds good to me, but let's wait for Scott and Dan

Comment 6 Bill Nottingham 2020-05-20 15:49:42 UTC
From an end-user perspective, I don't care as much about which mini init it is, just that whatever podman's default is is actually there. (ideally, Required:, not just Recommended:)

Comment 7 Scott McCarty 2020-05-20 16:01:13 UTC
I'll defer to Dan as I only have a vague notion of the purpose of this feature. Here's a dumb question - why wouldn't "podman run --init" not just use systemd? (for some reason, I feel like people might throw heavy things at me) :-)

Comment 8 Matthew Heon 2020-05-20 16:18:03 UTC
We need to be able to mount the init into the container (ideally in an image-agnostic way, to support scratch images). If we had a static-linked systemd that would be doable, but that doesn't appear to be a configuration we ship.

Comment 9 Daniel Walsh 2020-05-20 16:43:34 UTC
Yes this feature is not something we recommend, but it is needed to match Docker CLI.
We should just ship this small init program and make it Required

Comment 10 Jindrich Novy 2020-06-05 17:23:13 UTC
Assigning to Matt based on comment #8.

Matt, let me know if anything needs to be done on packaging side after it's done.

Thanks.

Comment 23 Alex Jia 2020-08-25 16:29:34 UTC
I can reproduce this bug on podman-1.6.4-10.module+el8.2.0+6063+e761893a.x86_64,
and it works on podman-2.0.2-2.module+el8.3.0+7374+9d949f97 and
podman-2.0.4-3.module+el8.3.0+7716+ce654703.x86_64


[root@hpe-dl380pgen8-02-vm-15 ~]# rpm -q podman podman-catatonit
podman-2.0.2-2.module+el8.3.0+7374+9d949f97.x86_64
podman-catatonit-2.0.2-2.module+el8.3.0+7374+9d949f97.x86_64

[root@hpe-dl380pgen8-02-vm-15 ~]# podman run --init memcached:alpine sh
...ignore...
Trying to pull docker.io/library/memcached:alpine...
Getting image source signatures
Copying blob a01e9fc6969f done
Copying blob 469ce346395c done
Copying blob a644683dc78e done
Copying blob 9da9e0d7f928 done
Copying blob df20fa9351a1 done
Copying blob ee44cd26437f done
Copying config 6c8afc725f done
Writing manifest to image destination
Storing signatures

[root@hpe-dl380pgen8-02-vm-15 ~]# podman ps -a
CONTAINER ID  IMAGE                               COMMAND  CREATED         STATUS                     PORTS   NAMES
0c6056d0bbbe  docker.io/library/memcached:alpine  sh       22 seconds ago  Exited (0) 22 seconds ago          confident_morse

[root@hpe-dl380pgen8-02-vm-15 ~]# rpm -q podman podman-catatonit
podman-2.0.4-3.module+el8.3.0+7716+ce654703.x86_64
podman-catatonit-2.0.4-3.module+el8.3.0+7716+ce654703.x86_64

[root@hpe-dl380pgen8-02-vm-15 ~]# podman run --init memcached:alpine sh
Trying to pull registry.access.redhat.com/memcached:alpine...
...ignore...
Trying to pull docker.io/library/memcached:alpine...
Getting image source signatures
Copying blob 469ce346395c done
Copying blob ee44cd26437f done
Copying blob df20fa9351a1 done
Copying blob 9da9e0d7f928 done
Copying blob a644683dc78e done
Copying blob a01e9fc6969f done
Copying config 6c8afc725f done
Writing manifest to image destination
Storing signatures

[root@hpe-dl380pgen8-02-vm-15 ~]# podman ps -a
CONTAINER ID  IMAGE                               COMMAND  CREATED         STATUS                     PORTS   NAMES
12111a13868e  docker.io/library/memcached:alpine  sh       12 seconds ago  Exited (0) 11 seconds ago          dazzling_chaplygin

Comment 26 errata-xmlrpc 2020-11-04 03:05:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: container-tools:rhel8 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4694