-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pd-mapper.service: don't start if /sys/class/remoteproc is empty #15
base: master
Are you sure you want to change the base?
Conversation
If there are no maps, pd-mapper always errors out with message "no pd maps available". This means the service fails and shows up as failed in systemctl --failed, which is ugly and annoying. For Fedora, it's also against the release criteria - there should be no failed services on startup of a default install, but on a default aarch64 install, this service usually fails. To avoid this, let's add a condition saying not to try and start the service if /sys/class/remoteproc is not empty. Note this condition was added in systemd 244, but zbyzsek tells me that older systemd would not error out, it would just print a warning and ignore it, so that should be fine. Signed-off-by: Adam Williamson <[email protected]>
@AdamWill what if the remoteproc drivers are built as modules and get loaded after the pd-mapper was attempted? |
Hmm...yeah, I guess that's an issue, since this has Not sure if there's a nice way to handle this. @keszybz is there an elegant service config that can be used in this case? |
still, that does make the problem worse, because on a system which really doesn't have any remoteproc support, the service will constantly try and startup, forever, unless the admin manually disables it. It won't just fail once on boot and give up. |
@AdamWill I think the proper way is to rewrite pd-mapper to support delaying daemon init. If it can not find remoteprocs, it should start, but use libudev to wait for remoteprocs to appear. |
@AdamWill hoefully this becomes less important now. Starting from 6.11 there is an in-kernel implementation of PD mapper, so userspace daemon can be disabled completely. |
Modules are normally loaded early. This service doesn't specify anything special, so it'd be started after |
I couldn't find it in the documentation, why would Condition keep on attempting to start it. Maybe a Condition + dropping the RestartAways is a way to go? |
It's |
I think |
If there are no maps, pd-mapper always errors out with message "no pd maps available". This means the service fails and shows up as failed in systemctl --failed, which is ugly and annoying. For Fedora, it's also against the release criteria - there should be no failed services on startup of a default install, but on a default aarch64 install, this service usually fails.
To avoid this, let's add a condition saying not to try and start the service if /sys/class/remoteproc is not empty. Note this condition was added in systemd 244, but zbyzsek tells me that older systemd would not error out, it would just print a warning and ignore it, so that should be fine.