[ClusterLabs Developers] crmadmin

Gerry R Sommerville gerry at ca.ibm.com
Wed Feb 23 16:26:05 EST 2022


Hey devs,

I noticed there was a change in exit code from crmadmin --version​ from version 2.0.4 to 2.0.5, I run this command in a script which checks if [[ 0 -ne $? ]]; then ....​ which is how I noticed the change.

In 2.0.4, crmadmin would exit with 0, while in 2.0.5 it will exit with 64. Ran this through gdb quick as well and here are the respective traces.

Pacemaker 2.0.4
Thread 1 (Thread 0x7ffff7fc9b80 (LWP 3423363)):
#0  0x00007ffff5190c20 in exit () from /lib64/libc.so.6
#1  0x00007ffff70c00b4 in crm_exit (rc=rc at entry=CRM_EX_OK) at results.c:773
#2  0x00007ffff70b63f6 in pcmk__cli_help (cmd=<optimized out>, exit_code=CRM_EX_OK) at options.c:263
#3  0x0000555555556084 in main (argc=2, argv=0x7fffffffd738) at crmadmin.c:183


Pacemaker 2.0.5
Thread 1 (Thread 0x7ffff7fd6b80 (LWP 2880544)):
#0  0x00007ffff5184c20 in exit () from /lib64/libc.so.6
#1  0x00007ffff70be6e4 in crm_exit (rc=rc at entry=CRM_EX_USAGE) at results.c:781
#2  0x00007ffff70aed96 in pcmk__cli_help (cmd=<optimized out>, exit_code=CRM_EX_USAGE) at options.c:264
#3  0x00005555555563d5 in main (argc=2, argv=0x7fffffffe058) at crmadmin.c:426

I am wondering if this change was intentional, or a bug introduced by some other change. I believe its a bug since crmadmin -h still exits with 0.

Gerry Sommerville
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/developers/attachments/20220223/6e42a6ec/attachment.htm>


More information about the Developers mailing list