podman icon indicating copy to clipboard operation
podman copied to clipboard

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

Open Mahajan-Sachin opened this issue 4 months ago • 0 comments

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

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

Mahajan-Sachin avatar Aug 02 '26 16:08 Mahajan-Sachin