Bug 1820551

Summary: Automatically starting a container on boot is not possible through cockpit WebUI
Product: Red Hat Enterprise Linux 8 Reporter: Apurbita Mukherjee <apmukher>
Component: cockpit-podmanAssignee: Matej Marušák <mmarusak>
Status: CLOSED ERRATA QA Contact: Jan Ščotka <jscotka>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.1CC: dornelas, jnovy, klaas, sbarcomb
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-08 09:14:53 UTC Type: Enhancement
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Apurbita Mukherjee 2020-04-03 10:42:27 UTC
User-Agent:       Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36
Build Identifier: 

Automatically starting a container on boot is not possible through cockpit WebUI.
Currently only it is possible to start a container, not have it automatically started on boot.

Reproducible: Always

Steps to Reproduce:
1. Have cockpit-podman installed and running
2. Download an image
3. Create a running container from that image

Actual Results:  
No option "start on boot"

Expected Results:  
Option "start on boot"



None.

Comment 1 Martin Pitt 2020-04-03 12:48:55 UTC
I suppose we could integrate `podman generate systemd` to enable auto-start. I'm not a big fan of its start/stop approach instead of just killing/starting the container (that falls over too much), but at least from cockpit-podman's POV that's the official API. It has a convention for predictable unit names, so that we can also map a container to a unit name to see if autostart is enabled.

Comment 2 Derrick Ornelas 2020-04-06 16:14:04 UTC
If it helps, we now document deleting/running (what I assume you mean by killing/starting) the container instead of start/stop.  

  https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/building_running_and_managing_containers/using-systemd-with-containers_building-running-and-managing-containers#starting_containers_with_systemd
  https://www.redhat.com/sysadmin/podman-shareable-systemd-services


I don't know the status of support for this in 'podman generate systemd', though.

Comment 3 Martin Pitt 2020-04-09 13:12:58 UTC
Matej, want to have a look at that one?

Comment 5 Matej Marušák 2022-05-24 12:43:59 UTC
This has been introduced in version cockpit-podman-39. It is only supported for superuser for now. Enabling it for normal user might come in future.
See release note: https://cockpit-project.org/blog/cockpit-260.html

Comment 8 Matej Marušák 2022-08-19 08:09:50 UTC
This now also has support for normal users, see https://github.com/cockpit-project/cockpit-podman/pull/1039

Comment 14 errata-xmlrpc 2022-11-08 09:14:53 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-2022:7457