Skip to content

--abort-on-container-exit does not work #679

Description

@DusanJanik

Describe the bug
podman-compose up --abort-on-container-exit is not aborting other containers when one exits. This creates issues when running this command in a Jenkins job and it results in a failure of the job.

To Reproduce
Run this simple docker-compose.yml file with the --abort-on-container-exit option.

services:
    too_long:
      image: busybox
      command: ["/bin/busybox", "sh", "-c", "sleep 3600; exit 0"]
      tmpfs:
        - /run
        - /tmp
    sh1:
      image: busybox
      command: ["/bin/busybox", "sh", "-c", "sleep 5; exit 1"]
      tmpfs:
        - /run
        - /tmp
    sh2:
      image: busybox
      command: ["/bin/busybox", "sh", "-c", "sleep 10; exit 2"]
      tmpfs:
        - /run
        - /tmp

Expected behavior
The sh2 and too_long containers should be aborted when the sh1 returns exit code 1.

Actual behavior
The sh2 and too_long containers keep running in the background after the sh1 exits.

Environment:

  • OS: Linux
  • podman version: 4.2.0
  • podman compose version: 1.0.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions