User Details
- User Since
- Jan 12 2022, 10:04 AM (166 w, 3 d)
Wed, Mar 19
Tue, Mar 18
@waltdisgrace Adding a mainloop timer here is definitely the way to go. If you haven't looked at the mainloop stuff before (especially glib's implementation and what we've built on top of it), this could be a little bit confusing. The basic idea is that we fake being multithreaded by looping over a queue of events that can come from various sources like file or network IO, UNIX signals, periodic or one-off timers, and so forth. Using the main loop allows us to avoid blocking other work from happening.
@waltdisgrace Start by adding a unit test to verify that the pacemaker library still just segfaults on that input. I think lib/common/tests/xml_idref/pcmk__xe_dereference_children_test.c would be as good a place as any for this, but @nrwahl2 might have a better suggestion. I can then help you make sense of the segfault and we can figure out where to throw an error.
Additionally, it would be nice to have a unit test or two for this function. Most of what it does is call another function, several of which are already unit tested, but checking that the inputs/outputs are as expected would be good.
Thu, Mar 13
Tue, Mar 11
Wed, Mar 5
Feb 19 2025
Feb 18 2025
This is going to be very, very difficult to do which is why we've removed it from the RHEL board and lowered the priority. Basically, lrmd_send_command implements almost all of the API commands for a lrmd_t. All of those would need to be converted over to an async style, and then all of their callers would be. This includes major portions of the control daemon, which isn't very well set up to call the async versions of these functions. It would require rewriting much of liblrmd and the control daemon, and there's simply not enough time to get around to a project of that size.
cppcheck appears to be fine with pcmk__realloc for me, but I would still be all for investigating removing it in favor of someone else's code.