Bug 2096449

Summary: systemd managed container doesn't start serving web traffic despite of starting on system startup. [rhel-7.9.z]
Product: Red Hat Enterprise Linux 7 Reporter: Derrick Ornelas <dornelas>
Component: podmanAssignee: Jindrich Novy <jnovy>
Status: CLOSED ERRATA QA Contact: Joy Pu <ypu>
Severity: medium Docs Contact:
Priority: urgent    
Version: 7.9CC: atomic-bugs, bbaude, ddarrah, dornelas, dwalsh, janfishergg, jligon, jnovy, lsm5, mheon, pthomas, tsweeney, umohnani, vrothber, ypu
Target Milestone: rcKeywords: Extras
Target Release: 7.9   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: podman-1.6.4-33.el7_9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2091721 Environment:
Last Closed: 2022-08-22 09:17:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 9 Joy Pu 2022-07-15 16:13:43 UTC
Test with podman-1.6.4-35.el7_9.x86_64 and the service file created already included the lines:
# cat /etc/systemd/system/multi-user.target.wants/container-web1.service
# container-web1.service
# autogenerated by Podman 1.6.4
# Fri Jul 15 12:04:03 EDT 2022

[Unit]
Description=Podman container-web1.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target


And in the system after reboot the service are running as expected:
[root@amd-dinar-04 ~]#  curl localhost:7000
My test page
[root@amd-dinar-04 ~]#  systemctl status container-web1.service 
● container-web1.service - Podman container-web1.service
   Loaded: loaded (/etc/systemd/system/container-web1.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2022-07-15 12:08:51 EDT; 3min 48s ago
     Docs: man:podman-generate-systemd(1)
  Process: 1263 ExecStart=/usr/bin/podman start web1 (code=exited, status=0/SUCCESS)
 Main PID: 2086 (conmon)
   CGroup: /system.slice/container-web1.service
           ‣ 2086 /usr/bin/conmon --api-version 1 -s -c a46b74713f2f312dbacceb44179fdbcc8acca714a0a0f61099d105337a989e70 -u a46b74713f2f312dbac...

Jul 15 12:08:35 amd-dinar-04.khw1.lab.eng.bos.redhat.com systemd[1]: Starting Podman container-web1.service...
Jul 15 12:08:48 amd-dinar-04.khw1.lab.eng.bos.redhat.com podman[1263]: 2022-07-15 12:08:48.195318141 -0400 EDT m=+9.185788230 system refresh
Jul 15 12:08:51 amd-dinar-04.khw1.lab.eng.bos.redhat.com podman[1263]: 2022-07-15 12:08:51.160997719 -0400 EDT m=+12.151467611 container i...web1)
Jul 15 12:08:51 amd-dinar-04.khw1.lab.eng.bos.redhat.com podman[1263]: 2022-07-15 12:08:51.327818516 -0400 EDT m=+12.318288433 container s...web1)
Jul 15 12:08:51 amd-dinar-04.khw1.lab.eng.bos.redhat.com podman[1263]: web1
Jul 15 12:08:51 amd-dinar-04.khw1.lab.eng.bos.redhat.com systemd[1]: Started Podman container-web1.service.
Hint: Some lines were ellipsized, use -l to show in full.

So move it to Verified.

Comment 11 errata-xmlrpc 2022-08-22 09:17:50 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: podman security and bug fix 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-2022:6119

Comment 12 Red Hat Bugzilla 2023-09-15 01:55:51 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days