Bug 384461 - service: prefix tag surplus clustat clurgmgrd display double
Summary: service: prefix tag surplus clustat clurgmgrd display double
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rgmanager
Version: 5.0
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
: ---
Assignee: Lon Hohberger
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-15 12:05 UTC by Ervin Horvath
Modified: 2009-04-16 22:56 UTC (History)
1 user (show)

Fixed In Version: RHBA-2008-0353
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-21 14:30:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Alters clustat output. (876 bytes, patch)
2007-11-15 17:44 UTC, Lon Hohberger
no flags Details | Diff
Corrected patch (984 bytes, patch)
2007-11-15 18:11 UTC, Lon Hohberger
no flags Details | Diff
Format service status according to terminal width (5.38 KB, patch)
2007-11-15 22:42 UTC, Lon Hohberger
no flags Details | Diff
More updates. Don't exceed MAXHOSTNAMELEN (9.10 KB, patch)
2007-11-27 18:48 UTC, Lon Hohberger
no flags Details | Diff
Patch with memsets on all string buffers prior to calling snprintf (10.08 KB, patch)
2007-11-27 19:03 UTC, Lon Hohberger
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0353 0 normal SHIPPED_LIVE rgmanager bug fix and enhancement update 2008-05-20 12:46:24 UTC

Description Ervin Horvath 2007-11-15 12:05:18 UTC
From Bugzilla Helper:
User-Agent: Opera/9.24 (Windows NT 5.1; U; en)

Description of problem:
The extra "service:" prefix in clustat prints and clurgmgrd syslogs are 
unneccessary, and I think it confusing.

Imagine one creates an Oracle_service, then wants to check it from command line 
(creating grep on that etc.):

this is how clustat command in RH5.1 behaves:
...
Service Name         Owner (Last)                   State
------- ----         ----- ------                   -----
service:Oracle_servi machine4.co.uk                 recovering

It not only an unwanted prefix, but it actually cuts user service name to an 
unreadable lenght.
Following this bug's logic why not printing everything in this lame format:
"service: Oracle_servi" (-ce)
"ownder: machin" (-e4.co.uk)
"status: recove"  (-ring)

ok. you may state that I should grep for clustat -l or -x where these prints 
are not corrupted, but then: why is the default most common view is such 
unreadable?


Next: looking at /var/log/messages:
...
Nov 15 14:32:26 machete3 clurgmgrd[4682]:
<notice> Service service:Oralce_service is stopped
..

Does this log makes sense? "Service service:<actualname>..."

Please remove this prefix, like it was never printed in RHCS4.x

Version-Release number of selected component (if applicable):
rgmanager-2.0.31-1.el5

How reproducible:
Always


Steps to Reproduce:
1. clustat
2. grep service: /var/log/messages 


Actual Results:
1. service:<Myservi

2. Service service:<Myservicename> is stopped.

Expected Results:
1. <Myservicename>

2. Service <Myservicename> is stopped.

Additional info:
Needs only a minor workaround in print and log calls

Comment 1 Lon Hohberger 2007-11-15 17:44:42 UTC
Created attachment 260141 [details]
Alters clustat output.

In RHEL5 (and cvs-head), any resource can be managed at the top level by
rgmanager.  Though almost all benefit from being children of the "service"
container resource, none are required to be.

Primary attribute namespaces are unique between resource classes.  That is, you
can have a virtual machine named Myservicename, a service named Myservicename,
and a script named Myservicename all at the top level if you wanted.  Clustat
would thus produce the following output if there was no differentiation:

Service Name	     Owner (Last)		    State
------- ----	     ----- ------		    -----
Myservicename	     machine1			    started
Myservicename	     machine2			    started
Myservicename	     machine1			    started

This is clearly a rather confusing prospect.  One might argue that 'service'
should be treated specially and have it removed from the "normal" output of
clustat, and possibly the logs:

Service Name	     Owner (Last)		    State
------- ----	     ----- ------		    -----
Myservicename	     machine1			    started
vm:Myservicename     machine2			    started
script:Myservicenam  machine1			    started

This might be even more the case since most people are not going to place a
script at the top level.  Additionally, this would also make it more consistent
with 'clusvcadm', since it expands to match 'service:' automatically if you
don't specify it on the command line.

So, the patch changes default clustat output as noted above, but not log
messages.

Comment 2 Lon Hohberger 2007-11-15 18:11:18 UTC
Created attachment 260171 [details]
Corrected patch

Comment 3 Lon Hohberger 2007-11-15 22:42:27 UTC
Created attachment 260541 [details]
Format service status according to terminal width

Makes clustat adapt to screen width and also give 10 extra spaces for service
names on standard-width (80 column) terminals.

Tested on 136x37.   In scripts, it defaults to 80x24.

Comment 4 Kiersten (Kerri) Anderson 2007-11-19 19:57:33 UTC
All cluster version 5 defects should be reported under red hat enterprise linux
5 product name - not cluster suite.

Comment 5 Lon Hohberger 2007-11-27 18:48:35 UTC
Created attachment 270041 [details]
More updates.  Don't exceed MAXHOSTNAMELEN

Comment 6 Lon Hohberger 2007-11-27 19:03:04 UTC
Created attachment 270071 [details]
Patch with memsets on all string buffers prior to calling snprintf

Comment 7 Lon Hohberger 2007-11-30 20:10:18 UTC
The patch has been applied to CVS for clustat.

Comment 8 RHEL Program Management 2007-12-17 19:34:50 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 11 errata-xmlrpc 2008-05-21 14:30:44 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0353.html


Comment 12 Ervin Horvath 2008-05-22 07:41:43 UTC
Unfortunately the link is wrong, there's no such ERRATA published. Pls. correct


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