mirror of
https://github.com/containers/podman.git
synced 2025-10-14 09:45:59 +08:00
generate systemd: error on init containers
Init containers are currently not properly supported in generate-systemd and there are no plans to do so since all focus lies on Quadlet going forward. Hence, generate systemd should through an error. Closes: #18585 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
@ -144,6 +144,10 @@ func generateContainerInfo(ctr *libpod.Container, options entities.GenerateSyste
|
||||
}
|
||||
|
||||
config := ctr.Config()
|
||||
if len(config.InitContainerType) > 0 {
|
||||
return nil, fmt.Errorf("unsupported container %s: cannot generate systemd units for init containers", ctr.ID())
|
||||
}
|
||||
|
||||
conmonPidFile := config.ConmonPidFile
|
||||
if conmonPidFile == "" {
|
||||
return nil, errors.New("conmon PID file path is empty, try to recreate the container with --conmon-pidfile flag")
|
||||
|
Reference in New Issue
Block a user