Bug 151108 - 'cman_tool leave' errors could be more descriptive for user
Summary: 'cman_tool leave' errors could be more descriptive for user
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Cluster Suite
Classification: Retired
Component: cman
Version: 4
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Christine Caulfield
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-03-14 22:50 UTC by Corey Marthaler
Modified: 2009-04-16 20:32 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-03-18 22:38:42 UTC
Embargoed:


Attachments (Terms of Use)

Description Corey Marthaler 2005-03-14 22:51:00 UTC
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.

Comment 1 Christine Caulfield 2005-03-15 10:37:15 UTC
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


Comment 2 Corey Marthaler 2005-03-18 22:38:42 UTC
fix verified.


Note You need to log in before you can comment on or make changes to this bug.