HomeClusterLabs Projects

Med: tools: Fix a regression in tool XML output.

Description

Med: tools: Fix a regression in tool XML output.

c63a898 introduced a patch that uses pcmk__xml2fd to output XML objects.
This function uses libxml's buffered output, meaning that we are now
mixing libxml and stdlib output functions which have different opinions
on buffering.

As a result, tools that output XML in addition to regular output may now
see the order of output changed, potentially in confusing ways.

For tools that are using formatted output, it's okay to continue to call
pcmk__xml2fd. The XML formatted output object will use this for all its
output (see xml_finish) so we're not mixing library calls. The other
formatted output objects only use stdlib output functions, so we're not
mixing library calls there either.

This patch therefore only reverts the portion in the tools/ directory,
as well as changes the affected test cases back to how they were.

See: clbz#5529
Fixes T723

Details

Provenance
clumensAuthored on Nov 30 2023, 9:51 AM
Parents
rP613e6ad2af88: Merge pull request #3264 from nrwahl2/nrwahl2-doc
Branches
Unknown
Tags
Unknown
Tasks
T723: Fix regression in crm_ticket/cibadmin/crm_diff XML output