pacemaker icon indicating copy to clipboard operation
pacemaker copied to clipboard

Convert attrd server-side IPC to new model

Open clumens opened this issue 3 years ago • 1 comments

clumens avatar Aug 18 '22 14:08 clumens

Let's just go ahead and call this a draft for the moment.

clumens avatar Aug 18 '22 14:08 clumens

What might be some good ways to test this set? I've run it through cts-lab and that's all good so far, but I'm not sure if that is really comprehensive for this case.

clumens avatar Aug 19 '22 19:08 clumens

What might be some good ways to test this set? I've run it through cts-lab and that's all good so far, but I'm not sure if that is really comprehensive for this case.

The lab is the most important, and you should be able to test everything else using attrd_updater.

kgaillot avatar Aug 22 '22 14:08 kgaillot

We don't currently have a regression test for pacemaker-attrd the way we do for pacemaker-execd and pacemaker-fenced. It would be nice to add one someday, but the main complication is that it interacts with the CIB, and we wouldn't want a regression test to change the real CIB. We'd have to add a daemon start-up option for using an alternative CIB location. The corosync integration would be another complication, we'd have to temporarily set it up as a single-node cluster, or disable corosync use altogether. I'll create a task ...

kgaillot avatar Aug 22 '22 14:08 kgaillot

Updated with a couple patches at the end, changed terminology in commit messages to refer to "new message handling", and moved some functions around. I've run everything through cts-lab and various attrd_updater tests but I still feel like I'm not doing enough. I'm not quite sure where to go on the function consolidation side of things.

This is probably good enough to no longer mark as a draft, though.

clumens avatar Aug 24 '22 20:08 clumens

We need to repeat the attrd_updater testing with newer cluster + older remote and vice versa. Testing a mixed-version cluster (older and newer cluster nodes) might also be nice but I don't think anything here could affect that.

I tested the following commands on the remote with mismatched versions and log files on both sides look good:

  • attrd_updater -R
  • attrd_updater -Q --name doesnexist
  • attrd_updater -U 123 --name XYZ
  • attrd_updater -Q --name XYZ
  • attrd_updater -Y --name XYZ -d 1000
  • attrd_updater -B 456 -d 999 --name XYZ
  • attrd_updater -D --name XYZ

I'm currently running another round of cts-lab tests. It would be possible for me to test that as mixed-version, too.

clumens avatar Sep 01 '22 14:09 clumens

I'm currently running another round of cts-lab tests. It would be possible for me to test that as mixed-version, too.

The lab checks for specific log messages, so it requires all nodes to have the same version. If none of the wording it looks for changed between two versions, mixing them is fine but usually not worth the trouble of figuring that out.

kgaillot avatar Sep 01 '22 15:09 kgaillot

Woohoo!

kgaillot avatar Sep 01 '22 22:09 kgaillot