Bug 430220

Summary: clusvcadm is ignoring -F and -m options
Product: Red Hat Enterprise Linux 5 Reporter: Nick Strugnell <nstrug>
Component: rgmanagerAssignee: Lon Hohberger <lhh>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: urgent    
Version: 5.1CC: cluster-maint, jplans, pcfe, tao
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: GSSApproved
Fixed In Version: RHBA-2008-0353 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 14:30:56 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:
Bug Depends On:    
Bug Blocks: 431521    
Attachments:
Description Flags
cluster.conf that demonstrates the behaviour
none
RHEL 5.2 patch
none
RHEL 5.1 patch none

Description Nick Strugnell 2008-01-25 11:59:07 UTC
Description of problem:

Clusvcadm always starts services on the local node, irrespective of options.

We have a 3 node cluster:
node1
node2
node3

and 3 virtual services:
vm:service1
vm:service2
vm:service3

vm:service2 is preferred on node2 according to the failover domain however
running the following on node1:

clusvcadm -e vm:service2
clusvcadm -e vm:service2 -m node2
clusvcadm -e vm:service -F

will _all_ start the service on node1.

The only way to start the service on the correct node is to login to it and run
clusvcadm locally.

We have exactly the same problem using the luci interface.

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

How reproducible:
always

Steps to Reproduce:
1. Configure a 3 node cluster
2. Configure 3 VM services
3. Configure 3 failover domains so that each VM is preferred on a particular node
4. experiment with either clusvcadm or luci to start up VMs  

Actual results:
VMs will always start up on the local node that clusvcadm is running on, or on
the node that luci is running on

Expected results:
Luci should start up the service on the correct node when 'Start service on node
<blah>' is selected in the menus. clusvcadm should honour the -m and -F flags

Additional info:
Attaching cluster.conf

Comment 1 Nick Strugnell 2008-01-25 11:59:07 UTC
Created attachment 292937 [details]
cluster.conf that demonstrates the behaviour

Comment 2 Lon Hohberger 2008-01-25 15:07:30 UTC
clusvcadm -Fe X          works for me
clusvcadm -r X -[nm] Y   works for me
clusvcadm -e X -[nm] Y   doesn't...?

The -e worked in RHEL50, but regressed in RHEL51:

@@ -237,15 +263,24 @@
                        break;
 
                case RG_ENABLE:
+                       #if 0
                        if (req->rr_target != 0 &&
                            req->rr_target != my_id()) {
                                error = RG_EFORWARD;
                                ret = RG_NONE;
                                break;
                        }
+                       #endif
 

This bit broke enable-on-member.

Comment 4 Lon Hohberger 2008-01-25 15:14:54 UTC
[root@molly daemons]# clusvcadm -Fe test
Local machine trying to enable service:test...Success
service:test is now running on frederick

Service configuration:
                <failoverdomains>
                        <failoverdomain name="all" ordered="1" restricted="1">
                                <failoverdomainnode name="molly" priority="2"/>
                                <failoverdomainnode name="frederick" priority="1"/>
                        </failoverdomain>
                </failoverdomains>
                <service name="test" domain="all"/>

With patch applied, -e -m works too.

Comment 5 Lon Hohberger 2008-01-25 15:15:26 UTC
Created attachment 292945 [details]
RHEL 5.2 patch

Comment 6 Lon Hohberger 2008-01-25 15:16:38 UTC
Also tried -e X -F at Nick's suggestion.  I don't understand why that would fail
given the customer's configuration.

Comment 8 Lon Hohberger 2008-01-25 15:58:31 UTC
Created attachment 292954 [details]
RHEL 5.1 patch

Comment 9 Lon Hohberger 2008-01-25 15:59:04 UTC
First patch makes -e -m work on RHEL5.2
Second patch makes -Fe and -e -m work on RHEL5.1


Comment 10 RHEL Program Management 2008-01-25 16:06:54 UTC
This bugzilla has Keywords: Regression.  

Since no regressions are allowed between releases, 
it is also being proposed as a blocker for this release.  

Please resolve ASAP.

Comment 11 Lon Hohberger 2008-01-25 16:08:01 UTC
Note that in RHEL 5.2 with central processing enabled, '-F' is implied.  This is
a behavioral change; users wishing the old behavior (e.g. enable X starts X on
node that run clusvcadm) should not use the central processing option.

Comment 12 Lon Hohberger 2008-01-25 16:13:08 UTC
Patches in CVS / RHEL51 and RHEL5.

Comment 14 Lon Hohberger 2008-01-25 18:12:21 UTC
Patch in HEAD

Comment 23 Lon Hohberger 2008-03-06 16:35:41 UTC
(Packages also fix bug #430272)

Comment 24 Lon Hohberger 2008-03-06 16:36:20 UTC
Forgot one:

http://people.redhat.com/lhh/rgmanager-2.0.31-1.el5.bz430272.i386.rpm

Comment 27 errata-xmlrpc 2008-05-21 14:30:56 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