intel / xpumanager

MIT License
87 stars 18 forks source link

xpumd / xpumcli do not error out & show help on incorrect arguments #48

Open eero-t opened 1 year ago

eero-t commented 1 year ago

Version: V1.2.9

Issues

xpumd runs although it's given arguments it does not recognized / support, instead of exiting with help output:

# xpumd policy
[2023-05-23 16:34:58.288] [I] [247-247] XPUM: Init xpum library
[2023-05-23 16:34:58.288] [I] [247-247] XPU Manager:    1.2.9.20230517
...
^C

After accidentally running second instance of XPUM like above and terminating that with ^C, the correct XPUM instance dies also for some reason.

After that, xpumcli does not show help output anymore when required options are missing, or it's given argument it does not recognize at all:

# xpumcli agentset
Error: XPUM Service Status Error.
# xpumcli foobar
Error: XPUM Service Status Error.
donzh commented 1 year ago

It seems that “If correct XPUM instance dies the xpumcli give the Error: XPUM Service Status Error.” is reasonable. The xpumcli detect that the XPUM service is unavailable giving other help info can't help the user. At this case the end user should check the XPUM service.

eero-t commented 1 year ago

This bug is about erroring out and showing help (only) on incorrect arguments (and mainly about xpumd).

Why CLI tool would need to connect to daemon to notice that options user gave were wrong, and to show its help?

And if it indeed uses daemon for that, why daemon then does not itself error out and show help on incorrect arguments?