"pcs resource delete <resource>" shall cleanup the respective failed operations, writing them to stdout
- Dominant language
- Python
- Stars
- 265
- Forks
- 122
- Avg merge
- 13h 23m
- Merged PRs (30d)
- 14
Description
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
crm_resource -D -r -t
```
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).
Contributor guide
Assessment
This issue has not been assessed yet.