-
Notifications
You must be signed in to change notification settings - Fork 57
Description
Hello all! First of all, thanks for the great work on Stratis. I just recently started using it, and it's amazing.
I have a Podman volume plugin backed by Stratis. It works well for containers created after the host has initialized, but for containers using Quadlet (which are essentially systemd units), I have a dependency ordering issue that prevents units with stratis volumes from initializing at boot.
I took some time to analyze the current unit file and test a potential fix for any service that depends on stratisd.service.
Context
For context, stratisd.service currently uses:
DefaultDependencies=no
After=multi-user.target
...
[Install]
WantedBy=multi-user.targetThis creates an ordering cycle for any service in multi-user.target that depends on stratisd. For example, my volume plugin service has:
After=stratisd.service
Wants=stratisd.service
[Install]
WantedBy=multi-user.targetProduces the cycle:
podman-volume-stratis.service -> (After) -> stratisd.service -> (After) -> multi-user.target -> podman-volume-stratis.service
The After=multi-user.target was introduced in #3826 (changing from After=local-fs.target) as part of reworking fstab/Clevis dependencies. Since early boot device assembly is now handled by stratisd-min-postinitrd, the full stratisd daemon doesn't need special boot ordering — it just needs D-Bus, which is available after basic.target.
Proposed fix
I would remove DefaultDependencies=no and After=multi-user.target from stratisd.service.in. The standard default dependencies already provide After=sysinit.target basic.target, which ensures D-Bus availability for the Type=dbus service. This allows downstream services to use After=stratisd.service without creating cycles. I've tested this locally, and it's working -- at least for my use cases.
I'm willing to submit a PR if you agree with the fix.