All of my computers at home are AMD based and a while ago I noticed that the mcelog service always fails. It has been reported on BZ [1]
The easy solution was to just disable it but I wasn't sure how important it was at the time. Turns out it's just flat out incompatible with modern AMD processors[2,3].
So what do we do? I don't think it should be disabled since you never know when you'll swap a hard drive or motherboard but it should have a way to exit cleanly and just do nothing.
Basically, don't go away mad (erroring out), just go away.
I've searched the systemd help files but haven't found anything that does this directly.
First I wondered if there was a way to use (abuse?) ExecStartPre to check for compatibility before starting mcelog (via --is-cpu-supported) but if it fails then the whole service fails so the result is the same.
I thought about using the error code, but grepping through the source, 1 is used all over the place, not just for this particular problem. So making the exit code "OK" is not an option.
Then I thought perhaps there was a way to have a separate service file to check compatibility (mcelog-check.service?) and have it "Wants" the actual service file. That may still be possible but I haven't figured out the magic incantation to get that to work.
Ideas?
Thanks,
Richard
-- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct