Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2:ARM
pacemaker
pacemaker-ticket-standby.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pacemaker-ticket-standby.diff of Package pacemaker
commit de850c422b50d82d09ce820d98d057fae3ea18c9 Author: Gao,Yan <ygao@suse.com> Date: Fri Mar 23 12:01:13 2012 +0800 High: PE: Support to make tickets standby for relinquishing tickets gracefully Index: pacemaker/pengine/clone.c =================================================================== --- pacemaker.orig/pengine/clone.c +++ pacemaker/pengine/clone.c @@ -522,7 +522,7 @@ clone_color(resource_t * rsc, node_t * p for (; gIter != NULL; gIter = gIter->next) { rsc_ticket_t *rsc_ticket = (rsc_ticket_t *) gIter->data; - if (rsc_ticket->ticket->granted == FALSE) { + if (rsc_ticket->ticket->granted == FALSE || rsc_ticket->ticket->standby) { rsc_ticket_constraint(rsc, rsc_ticket, data_set); } } Index: pacemaker/pengine/group.c =================================================================== --- pacemaker.orig/pengine/group.c +++ pacemaker/pengine/group.c @@ -68,7 +68,7 @@ group_color(resource_t * rsc, node_t * p for (; gIter != NULL; gIter = gIter->next) { rsc_ticket_t *rsc_ticket = (rsc_ticket_t *) gIter->data; - if (rsc_ticket->ticket->granted == FALSE) { + if (rsc_ticket->ticket->granted == FALSE || rsc_ticket->ticket->standby) { rsc_ticket_constraint(rsc, rsc_ticket, data_set); } } Index: pacemaker/pengine/master.c =================================================================== --- pacemaker.orig/pengine/master.c +++ pacemaker/pengine/master.c @@ -353,7 +353,8 @@ master_promotion_order(resource_t * rsc, for (; gIter != NULL; gIter = gIter->next) { rsc_ticket_t *rsc_ticket = (rsc_ticket_t *) gIter->data; - if (rsc_ticket->role_lh == RSC_ROLE_MASTER && rsc_ticket->ticket->granted == FALSE) { + if (rsc_ticket->role_lh == RSC_ROLE_MASTER + && (rsc_ticket->ticket->granted == FALSE || rsc_ticket->ticket->standby)) { resource_location(rsc, NULL, -INFINITY, "__stateful_without_ticket__", data_set); } } Index: pacemaker/pengine/native.c =================================================================== --- pacemaker.orig/pengine/native.c +++ pacemaker/pengine/native.c @@ -494,7 +494,7 @@ native_color(resource_t * rsc, node_t * for (gIter = rsc->rsc_tickets; gIter != NULL; gIter = gIter->next) { rsc_ticket_t *rsc_ticket = (rsc_ticket_t *) gIter->data; - if (rsc_ticket->ticket->granted == FALSE) { + if (rsc_ticket->ticket->granted == FALSE || rsc_ticket->ticket->standby) { rsc_ticket_constraint(rsc, rsc_ticket, data_set); } } @@ -1401,7 +1401,7 @@ rsc_ticket_constraint(resource_t * rsc_l return; } - if (rsc_ticket->ticket->granted == TRUE) { + if (rsc_ticket->ticket->granted && rsc_ticket->ticket->standby == FALSE) { return; } @@ -1421,7 +1421,7 @@ rsc_ticket_constraint(resource_t * rsc_l crm_debug_2("%s: Processing ticket dependency on %s (%s, %s)", rsc_lh->id, rsc_ticket->ticket->id, rsc_ticket->id, role2text(rsc_ticket->role_lh)); - if (g_list_length(rsc_lh->running_on) > 0) { + if (rsc_ticket->ticket->granted == FALSE && g_list_length(rsc_lh->running_on) > 0) { GListPtr gIter = NULL; switch (rsc_ticket->loss_policy) { @@ -1461,11 +1461,17 @@ rsc_ticket_constraint(resource_t * rsc_l break; } - } else { + } else if (rsc_ticket->ticket->granted == FALSE){ if (rsc_ticket->role_lh != RSC_ROLE_MASTER || rsc_ticket->loss_policy == loss_ticket_stop) { resource_location(rsc_lh, NULL, -INFINITY, "__no_ticket__", data_set); } + + } else if (rsc_ticket->ticket->standby) { + + if (rsc_ticket->role_lh != RSC_ROLE_MASTER || rsc_ticket->loss_policy == loss_ticket_stop) { + resource_location(rsc_lh, NULL, -INFINITY, "__ticket_standby__", data_set); + } } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor