The watchdog.service appears inactive on startup even though it is enabled. It appears the [Install] directive is not correct for a yocto build. If I change: [Install] WantedBy=default.target to WantedBy=multi-user.target Then the watchdog service is properly activated. When running "systemctl stop watchdog" there are some error messages printed related to wd_keepalive. It seems some clean attempt is sitting here. https://patchwork.openembedded.org/patch/144580/ But, I think that still doesn't solve the wd_keepalive issues.
Also, wd_keepalive is not handled properly. After change above there are errors in the stop mechanism. try running "systemctl stop watchdog" and you will see errors as the wd_keepalive script has not been installed by the watchdog recipe.
Created attachment 4233 [details] fix Removed the inter-dependencies of watchdog and wd_keepalive services.
@Scott, can you please verify this fix and share your thoughts/comments ?
(In reply to comment #3) > @Scott, can you please verify this fix and share your thoughts/comments ? I will have to rollback my local changes and try it on my system in the next few days.
Hi Maxin, I looked at the changes. I don't think the claim that watchdog and watchdog-keepalive packages can't be installed together is what the original designers of these watchdog utilities intended. I "think" what is supposed to happen is both services are supposed to be installed in the rootfs. Then they are controlled by run_watchdog and wd_keepalive in the configuration file. Possibly, as well, on shutdown, wd_keepalive is supposed to be started if watchdog is stopped? That way watchdog is still kicked throughout shutdown. In practical situations this probably isn't needed. Also, why do you indicate the Upstream-status as: Inappropriate [oe specific]. I would think that the watchdog.service simply isn't being configured properly and such changes need to be upstreamed. At least that's my impression? If none of above is true and only one of run_watchdog or run_wd_keep_alive can be set then I guess what you've changed may be correct. But, I would think upstream owner's should be able to comment further?
Hi Scott, (In reply to comment #5) > Hi Maxin, > > I looked at the changes. > > I don't think the claim that watchdog and watchdog-keepalive packages can't > be installed together is what the original designers of these watchdog > utilities intended. That claim was introduced by this commit: " commit e051c702503614b45d68f4c4c10ed413b2ea5c66 Author: Fabio Berton <fabio.berton@ossystems.com.br> Date: Wed Jan 25 09:22:05 2017 -0200 watchdog: Add RCONFLICTS to watchdog-keepalive and split RDEPENDS " IMHO, this splitting makes the watchdog handling less complex (avoids two daemons that handle watchdog at the same time, probably by wrong configuration) > I "think" what is supposed to happen is both services are supposed to be > installed in the rootfs. Then they are controlled by run_watchdog and > wd_keepalive in the configuration file. It looks good. However, that could cause potential troubles with wrong configuration. > Possibly, as well, on shutdown, wd_keepalive is supposed to be started if > watchdog is stopped? That way watchdog is still kicked throughout shutdown. > In practical situations this probably isn't needed. I am not sure about the practical use of that either. > Also, why do you indicate the Upstream-status as: Inappropriate [oe > specific]. I would think that the watchdog.service simply isn't being > configured properly and such changes need to be upstreamed. At least that's > my impression? Since we separated it into watchdog, wd_keepalive packages along with configuration package, changes that we introduced here are specific to oe. > If none of above is true and only one of run_watchdog or run_wd_keep_alive > can be set then I guess what you've changed may be correct. Ok. > But, I would think upstream owner's should be able to comment further? Agree. If the upstream maintainer feels it is wrong to go ahead with splitting the packages, we can revert those changes and go ahead with a better/safer fix.
Adding Alex in CC
I know even less about watchdog than you do :) Is there some specific question you'd like me to look into?
Merged in oe-core: https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=c3c336f106d579450ad09eedae830162a817214c Sent a query to Fabio about the reason behind splitting the package. Scott, if you think that we need to revert those changes and fix it, please feel free to reopen this bug or open another bug.
current patch works my use cases. But, I don't think it was the original intent for the option of specifying the wd_keepalive is started when the normal watchdog service is stop. The wd_keepalive is a simpler implementation that can keep kicking the watchdog while everything is shutting down. In practical situations (watchdog timeout long enough) this isn't an issue during linux shutdown/power off, though.
Hi Scott, (In reply to comment #10) > current patch works my use cases. But, I don't think it was the original > intent for the option of specifying the wd_keepalive is started when the > normal watchdog service is stop. The wd_keepalive is a simpler > implementation that can keep kicking the watchdog while everything is > shutting down. > > In practical situations (watchdog timeout long enough) this isn't an issue > during linux shutdown/power off, though. Fabio mentioned that he agree with your views and also promised to work on a fix. Thanks !
Is there an open issue tracking the work to resolve the RCONFLICT between watchdog and watchdog-keepalive? The man page for wd_keepalive indicates it's intended to be used on system startup before the full watchdog service can start (the implication being both packages should be installed), and our system configuration uses it as such.