pcs
pcs copied to clipboard
"pcs resource delete <resource>" shall cleanup the respective failed operations, writing them to stdout
Current flow makes little sense:
touch /etc/init.d/nonexisting_test.sh
pcs resource create test lsb:nonexisting_test.sh
pcs status
[...] Full list of resources: test (lsb:nonexisting_test.sh): FAILED mymachine (blocked) Failed Resource Actions: * test_stop_0 on mymachine 'insufficient privileges' (4): call=42, status=complete, exitreason='', last-rc-change='Mon Feb 18 22:05:14 2019', queued=1ms, exec=3ms [...]
pcs resource delete test
Deleting Resource - test
pcs status
Full list of resources: test (lsb:nonexisting_test.sh): ORPHANED FAILED mymachine (blocked) Failed Resource Actions: * test_stop_0 on mymachine 'insufficient privileges' (4): call=42, status=complete, exitreason='', last-rc-change='Mon Feb 18 22:05:14 2019', queued=1ms, exec=3ms
I'd suggest that the output of resource delete test
is:
Deleting Resource - test Removing respective failed resource actions - test: * test_stop_0 on mymachine 'insufficient privileges' (4): call=42, status=complete, exitreason='', last-rc-change='Mon Feb 18 22:05:14 2019', queued=1ms, exec=3ms
and that
crm_resource -C -r <resource>
crm_resource -D -r <resource> -t <type>
sequence is called under the hood (possibly simplified later into a single
invocation only to prevent race conditions -- currently unsupported with
crm_resource
).
Part of the suggestion is that, e.g., --keep-floating
option is added
to preserve original semantics (which, I can imagine, is hardly desirable
as a default -- it's very confusing that something non-existent keeps any
traces around).
This is tracked at https://bugzilla.redhat.com/show_bug.cgi?id=1420298#c18