Test: cts-cli, cts-scheduler: Add on_node to lrm_rsc_op entries
The on_node attribute was added to last_failure as of 1.1.13 (via
8b3ca1c) and to the other lrm_rsc_op entries as of 1.1.12 (via 0b07b5c).
Until now, for backward compatibility, we've had a workaround in
pe__is_newer_op() to determine whether two operations occurred on the
same node. Now, we no longer support rolling upgrades from < 2.0.0. So
after updating the regression test inputs to include on_node in all
lrm_rsc_op entries, we can drop the workaround.
This is too much to review manually, so I'm including my Python script
below.
import sys from lxml import etree tree = etree.parse(sys.argv[1]) for node_state in tree.findall('./status/node_state'): uname = node_state.get('uname') path = './lrm/lrm_resources/lrm_resource/lrm_rsc_op' for lrm_rsc_op in node_state.findall(path): if not lrm_rsc_op.get('on_node'): lrm_rsc_op.set('on_node', uname) tree.write(sys.argv[1], pretty_print=True)
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>