I hope I'm not missing something obvious, but could someone tell me why
ccs_tool exits with "EXIT_FAILURE" even when it's completed the
requested operation successfully?
else if(!strcmp(argv[optind], "addnode")){
add_node(argc-1, argv+1);
exit(EXIT_FAILURE);
}
else if(!strcmp(argv[optind], "delnode")){
del_node(argc-1, argv+1);
exit(EXIT_FAILURE);
}
else if(!strcmp(argv[optind], "addfence")){
add_fence(argc-1, argv+1);
exit(EXIT_FAILURE);
}
else if(!strcmp(argv[optind], "delfence")){
del_fence(argc-1, argv+1);
exit(EXIT_FAILURE);
}
else if(!strcmp(argv[optind], "lsnode")){
list_nodes(argc-1, argv+1);
exit(EXIT_FAILURE);
}
else if(!strcmp(argv[optind], "lsfence")){
list_fences(argc-1, argv+1);
exit(EXIT_FAILURE);
}
else if(!strcmp(argv[optind], "create")){
create_skeleton(argc-1, argv+1);
exit(EXIT_FAILURE);
}
else if(!strcmp(argv[optind], "addnodeids")){
add_nodeids(argc-1, argv+1);
exit(EXIT_FAILURE);
}
else {
fprintf(stderr, "Unknown command, %s.\n"
"Try 'ccs_tool help' for help.\n", argv[optind]);
exit(EXIT_FAILURE);
}
It's a bit of a bother that any automation working with these tools has
to always parse the output - I cannot put in any sort of future-proof
error-checking that just looks at the exit code.
Thanks,
Aravind.
--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster