Bug 924694

Summary: vm.sh resource agent does not handle shutdown parameter correctly
Product: Red Hat Enterprise Linux 5 Reporter: Raphaël Enrici <raphael>
Component: rgmanagerAssignee: Ryan McCabe <rmccabe>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: low Docs Contact:
Priority: low    
Version: 5.9CC: cluster-maint, dvossel, fdinitto, jharriga, mjuricek
Target Milestone: rcKeywords: EasyFix, Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rgmanager-2.0.52-51.el5 Doc Type: Bug Fix
Doc Text:
This update adds the possibility to specify the "timeout" parameter for the Xen virtual machines when using the "xm" command.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-16 00:28:46 UTC Type: Bug
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: 1049888    
Attachments:
Description Flags
add timeout to stop xm in do_xm_stop() none

Description Raphaël Enrici 2013-03-22 10:52:06 UTC
Created attachment 714480 [details]
add timeout to stop xm in do_xm_stop()

Description of problem:
While shutting down VM with Luci and/or clusvcadm -s, if the system takes more than 60s to halt it is forced to poweroff by an xm destroy. While looking at the way to configure some timeout for that we just found that things have been parameterized in /usr/share/cluster/vm.sh when configured to use virsh but not xm commands.
I guess it is also related to this old issue: 
455326 Feature Request: timeout on start/stop actions 

Would it be possible for you to add the same parameters to xm commands please?

Version-Release number of selected component (if applicable):
rgmanager-2.0.52-37.el5

How reproducible:
always

Steps to Reproduce:
1. create a VM with a script that sleeps for more than 60s in the rc scripts
2. ask luci to shutdown the system
3. after 60s the system is destroyed although it was not shutdown correctly
  
Actual results:
N/A

Expected results:
We would like to be able to position some values in the cluster.conf like these:
<vm name="mytestvm" ... ...>
   <action name="stop" timeout="300"/>
</vm>

Additional info:
attached is a patch that copies what has been done for virsh configured cluster.

Please, don't hesitate to point me to the right documentation if I missed something here.

Thanks and bests,
Raphaël

Comment 2 Ryan McCabe 2014-03-13 17:41:31 UTC
commit e6d4bcebbb938d17a5a6b31b465922ac1787229e
Author: Ryan McCabe <rmccabe>
Date:   Thu Mar 13 13:38:05 2014 -0400

    rgmanager: vm.sh: Allow "timeout" to be specified for Xen VMs
    
    Allow "timeout" to be specified when using the xm command to
    match the behavior when using the virsh command.
    
    Patch from Raphaël Enrici <raphael>
    
    Resolves: rhbz#924694
    
    Signed-off-by: Ryan McCabe <rmccabe>

Comment 7 errata-xmlrpc 2014-09-16 00:28:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1207.html