Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 158940 Details for
Bug 247772
RFE: One service following another
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
basic idea of service following another
cluster-1.03.00-follow-avoid.patch (text/plain), 3.62 KB, created by
Mark Hlawatschek
on 2007-07-11 12:05:05 UTC
(
hide
)
Description:
basic idea of service following another
Filename:
MIME Type:
Creator:
Mark Hlawatschek
Created:
2007-07-11 12:05:05 UTC
Size:
3.62 KB
patch
obsolete
>diff -Naur cluster-1.03.00.orig/rgmanager/src/daemons/groups.c cluster-1.03.00/rgmanager/src/daemons/groups.c >--- cluster-1.03.00.orig/rgmanager/src/daemons/groups.c 2006-06-16 22:07:46.000000000 +0200 >+++ cluster-1.03.00/rgmanager/src/daemons/groups.c 2006-10-18 13:21:09.000000000 +0200 >@@ -150,6 +150,7 @@ > char *val; > resource_t *res; > int exclusive; >+ rg_state_t rg_state; > > if (lock) > pthread_rwlock_rdlock(&resource_lock); >@@ -201,6 +202,45 @@ > continue; > } > >+ // skip node if service defined by "avoid" is running >+ // FIXME: move all checks out of loop >+ >+ val = res_attr_value(res, "avoid"); >+ >+ if (val) { >+ // check if this node runs the service to avoid >+ clulog(LOG_DEBUG, "service %s has to avoid %s\n", rg_name, val); >+ if (get_rg_state(val, &rg_state) != 0) { >+ clulog(LOG_WARNING, "can't get state of service %s\n", val); >+ } else { >+ if ((rg_state.rs_state == RG_STATE_STARTED) && (rg_state.rs_owner == nodeid)) { >+ clulog(LOG_DEBUG, "service %s started on nodeid %i -> avoid\n", val, nodeid); >+ continue; >+ } >+ } >+ } >+ >+ // add 3 to score if a follow tag is enabled and master is running >+ // on that node >+ // note: 3 will break failoverdomain borders >+ // FIXME: move all checks out of loop >+ >+ val = res_attr_value(res, "follow"); >+ >+ if (val) { >+ // check if this node runs the master service >+ clulog(LOG_DEBUG, "service %s needs to follow %s\n", rg_name, val); >+ if (get_rg_state(val, &rg_state) != 0) { >+ clulog(LOG_WARNING, "can't get state of service %s\n", val); >+ } else { >+ if ((rg_state.rs_state == RG_STATE_STARTED) && (rg_state.rs_owner == nodeid)) { >+ clulog(LOG_DEBUG, "service %s started on nodeid %i -> follow\n", val, nodeid); >+ score += 3; >+ } >+ } >+ } >+ >+ > if (score < highscore) > continue; > >diff -Naur cluster-1.03.00.orig/rgmanager/src/resources/service.sh cluster-1.03.00/rgmanager/src/resources/service.sh >--- cluster-1.03.00.orig/rgmanager/src/resources/service.sh 2006-06-16 22:07:46.000000000 +0200 >+++ cluster-1.03.00/rgmanager/src/resources/service.sh 2006-10-18 13:17:04.000000000 +0200 >@@ -94,6 +94,27 @@ > <content type="boolean"/> > </parameter> > >+ <parameter name="follow"> >+ <longdesc lang="en"> >+ Define a service to follow after service transition >+ </longdesc> >+ <shortdesc lang="en"> >+ Define a service to follow >+ </shortdesc> >+ <content type="string"/> >+ </parameter> >+ >+ <parameter name="avoid"> >+ <longdesc lang="en"> >+ Avoid running together with this service after service transition >+ </longdesc> >+ <shortdesc lang="en"> >+ Avoid running together with this service >+ </shortdesc> >+ <content type="string"/> >+ </parameter> >+ >+ > <parameter name="nfslock"> > <longdesc lang="en"> > Enable NFS lock workarounds. When used with a compatible
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 247772
: 158940 |
179501
|
231331
|
231411
|
231421
|
253261
|
253271