Description of problem: It would be nicer if 'cman_tool leave' gave a better errors when the leave fails. [root@morph-01 ~]# cman_tool join [root@morph-01 ~]# cman_tool join cman_tool: Node is already active # That's a nice error [root@morph-01 ~]# cman_tool leave cman_tool: Error leaving cluster: No such file or directory # This is where cman is waiting for everyone else to also join. # A better error would be something like: "cman_tool: Error leaving cluster: Still waiting to join" [root@morph-01 ~]# cat /proc/cluster/nodes Node Votes Exp Sts Name 1 1 5 M morph-01.lab.msp.redhat.com 2 1 5 M morph-04.lab.msp.redhat.com 3 1 5 M morph-03.lab.msp.redhat.com 4 1 5 M morph-02.lab.msp.redhat.com 5 1 5 M morph-05.lab.msp.redhat.com [root@morph-01 ~]# cman_tool leave [root@morph-01 ~]# cman_tool leave cman_tool: Error leaving cluster: Transport endpoint is not connected # Here a better error here might be: "cman_tool: Error leaving cluster: Was not apart of cluster" Version-Release number of selected component (if applicable): cman_tool 1.0-0.pre29 (built Mar 8 2005 14:26:19) Copyright (C) Red Hat, Inc. 2004 All rights reserved.
Actually, I think bad error messages are quite serious - increased support burden/user experience and all that. So, I've made cman-kernel more consistent in it's return codes and also made cman_tool have a central routine for interpreting them. Checking in cman_tool.h; /cvs/cluster/cluster/cman/cman_tool/cman_tool.h,v <-- cman_tool.h new revision: 1.3.2.4; previous revision: 1.3.2.3 done Checking in join.c; /cvs/cluster/cluster/cman/cman_tool/join.c,v <-- join.c new revision: 1.12.2.5; previous revision: 1.12.2.4 done Checking in main.c; /cvs/cluster/cluster/cman/cman_tool/main.c,v <-- main.c new revision: 1.12.2.6; previous revision: 1.12.2.5 done
fix verified.