Bug 151108

Summary: 'cman_tool leave' errors could be more descriptive for user
Product: [Retired] Red Hat Cluster Suite Reporter: Corey Marthaler <cmarthal>
Component: cmanAssignee: Christine Caulfield <ccaulfie>
Status: CLOSED NEXTRELEASE QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: low    
Version: 4CC: cluster-maint
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-03-18 22:38:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.