HomeClusterLabs Projects

Fix: tools: get stonith_admin -T option working again

Description

Fix: tools: get stonith_admin -T option working again

Regression introduced in 2.0.3 by 3910b6fec

This reverts commit 247eb303df934944c0b72b162bb661cee6e0ed8b
("Refactor: tools: drop unnecessary string duplication in stonith_admin")
and fixes a regression introduced when stonith_admin was converted to use
GOption.

The -T option is intended to override the client name passed to the fencer API,
but the client name was set to the default (crm_system_name) after option
processing had already been done, so any value for -T was overwritten by the
default, and its memory was leaked.

This commit sets the default only if -T was not used.

Details

Provenance
kgaillotAuthored on Jan 17 2022, 11:18 AM
Parents
rP7b7af07796f0: Doc: libpacemaker: improve pcmk__request_fencing() doxygen block
Branches
Unknown
Tags
Unknown

Event Timeline