Skip to content

quadlet: do not set RemainAfterExit=yes for volume units by default - #29375

Open
Mahajan-Sachin wants to merge 1 commit into
podman-container-tools:mainfrom
Mahajan-Sachin:quadlet-volume-remainafterexit
Open

quadlet: do not set RemainAfterExit=yes for volume units by default#29375
Mahajan-Sachin wants to merge 1 commit into
podman-container-tools:mainfrom
Mahajan-Sachin:quadlet-volume-remainafterexit

Conversation

@Mahajan-Sachin

@Mahajan-Sachin Mahajan-Sachin commented Aug 2, 2026

Copy link
Copy Markdown

Ref #27862

Summary

Quadlet previously set RemainAfterExit=yes by default when converting .volume unit files into systemd oneshot services.

Because RemainAfterExit=yes keeps the service unit in the active (exited) state, if a volume is deleted (e.g. to update volume options) and a dependent container service is restarted, systemd skips re-executing the volume service since it is already marked active.

Changes

  • Updated ConvertVolume() in pkg/systemd/quadlet/quadlet.go to pass false for remainAfterExit.
  • Updated Quadlet test fixture assertion in test/e2e/quadlet/basic.volume.

Checklist

  • Code is signed off (git commit -s)
  • Tests pass / modified test updated

Ref podman-container-tools#27866
Do not set RemainAfterExit=yes by default when converting Quadlet .volume files to systemd oneshot services.
Setting RemainAfterExit=yes causes systemd to consider the volume service active even after the volume is deleted manually, preventing systemd from re-executing volume creation when dependent container services restart.

Signed-off-by: Sachin Mahajan <sachinmahajan903@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant