Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 636243 - qdisk should have a timer for heuristic "programs" instead of relying on "program" to provide timeout
Summary: qdisk should have a timer for heuristic "programs" instead of relying on "pro...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cluster
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Lon Hohberger
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-21 17:51 UTC by Lon Hohberger
Modified: 2011-05-19 12:54 UTC (History)
10 users (show)

Fixed In Version: cluster-3.0.12-27.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 589266
Environment:
Last Closed: 2011-05-19 12:54:10 UTC
Target Upstream Version:


Attachments (Terms of Use)
Fix (deleted)
2010-09-21 19:17 UTC, Lon Hohberger
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0537 normal SHIPPED_LIVE cluster and gfs2-utils bug fix update 2011-05-18 17:57:40 UTC

Description Lon Hohberger 2010-09-21 17:51:57 UTC
+++ This bug was initially created as a clone of Bug #589266 +++

Description of problem:

If a defined qdisk heuristic "program" does not have a defined timeout
the "program" will run till it completes. The drawback to this is that
the time to complete could be longer than (interval*tko) time.

An example of this would:
<heuristic interval="2" program="sleep 100" score="1"/>

What is needed is a timer around the calling function to terminate the
"program" as failed since it exceeded (interval*tko) time and declare
that node failed heuristic.

static int check_heuristic(struct h_data *h, int block) {
   ...
   ret = waitpid(h->childpid, &status, block?0:WNOHANG);
   ...
} 

Version-Release number of selected component (if applicable):
cman-2.0.115-34.el5

How reproducible:
Everytime

Steps to Reproduce:
1. Setup cluster with qdisk
2. Define a heuristic "program" that will exceed (interval*tko) time.
3. Start qiskd
  
Actual results:
The qdisk daemon does not noticed that heuristic "program" has ran for
too long and exceeded (interval*tko) time.

Expected results:
The qdisk daemon should noticed that heuristic "program" has ran for
too long and exceed (interval*tko) time.

Additional info:

Comment 1 Lon Hohberger 2010-09-21 19:17:36 UTC
Created attachment 448781 [details]
Fix

This has only been unit-tested.

Any heuristic which takes longer than (interval*(tko-1)) seconds to return is considered failed.

Comment 5 errata-xmlrpc 2011-05-19 12:54:10 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 therefore 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-2011-0537.html


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