Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"pcs resource delete <resource>" shall cleanup the respective failed operations, writing them to stdout #194

Open
jnpkrn opened this issue Feb 18, 2019 · 1 comment

Comments

@jnpkrn
Copy link
Contributor

jnpkrn commented Feb 18, 2019

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).

@tomjelinek
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants