The top-level `pmm-admin inventory` is a "hidden" command, which was done on purpose so that user favor as shorter and therefore the more memorable `pmm-admin add/remove service` commands. However, `pmm-admin inventory list/add/remove` were also hidden, which was contributing to the reported problem, since Kong was unable to execute the `pmm-admin inventory [--help]` command.
The solution was to implement the inventory's `RunCmd()` method and "unhide" `pmm-admin inventory list/add/remove` comands, while keeping `pmm-admin inventory` hidden.
How to test
1/ Deploy a docker-based PMM Server
2/ get inside the container with `docker exec -it pmm-server bash`
3/ run `pmm-admin inventory` - you should see a helpful output and not the error trace
Note: running `pmm-admin inventory --help` yields the same effect
Easy to reproduce
Before:
After:
Implementation:
The top-level `pmm-admin inventory` is a "hidden" command, which was done on purpose so that user favor as shorter and therefore the more memorable `pmm-admin add/remove service` commands. However, `pmm-admin inventory list/add/remove` were also hidden, which was contributing to the reported problem, since Kong was unable to execute the `pmm-admin inventory [--help]` command.
The solution was to implement the inventory's `RunCmd()` method and "unhide" `pmm-admin inventory list/add/remove` comands, while keeping `pmm-admin inventory` hidden.