~ubuntu-branches/ubuntu/natty/pacemaker/natty

« back to all changes in this revision

Viewing changes to pengine/clone.c

  • Committer: Bazaar Package Importer
  • Author(s): Andres Rodriguez
  • Date: 2011-01-12 10:12:46 UTC
  • mfrom: (1.1.6 upstream) (2.1.10 sid)
  • Revision ID: james.westby@ubuntu.com-20110112101246-d7cvgr509qjqd73q
Tags: 1.0.10-4ubuntu1
* Merge from debian unstable (LP: #701233).  Remaining changes:
  - debian/patches:
    + lib_license_headers_update.patch: Update the License Headers to
      correctly reflect the use of LGPL-2.1+.
    + other_license_headers_update.patch: Update the License Headers of
      files that show GPL version 2.1, to correctly show version 2+.
    + raexecupstart.patch: Utilize new upstart LRM plugin.
    + fix_ftbfs_linker_as_needed.patch: Prevent FTBFS due to linker changes.
    + fix_return_o2cb_ra.patch: Fix a return variale error in the o2cb RA.
  - debian/pacemaker.postinst: Fix permissions on /var/lib/pengine.
* debian/control:
  - Bump cluster-glue dependencies to Ubuntu specific.
  - pacemaker-dev binary: Update dependencies to correct ones:
    (libpe-status2-dev,libpe-rules2-dev)
  - libcrmcommon2-dev: Drop Depends on cluster-glue-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
982
982
            return;
983
983
            
984
984
        } else if(constraint->score >= INFINITY) {
985
 
                GListPtr lhs = NULL, rhs = NULL;
986
 
                lhs = rsc_lh->allowed_nodes;
 
985
                GListPtr rhs = NULL;
987
986
                
988
987
                slist_iter(
989
988
                        child_rsc, resource_t, rsc_rh->children, lpc,
993
992
                        }
994
993
                        );
995
994
 
996
 
                rsc_lh->allowed_nodes = node_list_exclude(lhs, rhs, FALSE);
997
 
 
998
 
                pe_free_shallow_adv(rhs, FALSE);
999
 
                pe_free_shallow(lhs);
 
995
                rsc_lh->allowed_nodes = node_list_exclude(rsc_lh->allowed_nodes, rhs, FALSE);
 
996
                g_list_free(rhs);
1000
997
                return;
1001
998
        }
1002
999
 
1424
1421
static void clone_rsc_order_rh_non_clone(
1425
1422
    resource_t *lh_p, action_t *lh_action, resource_t *rsc, order_constraint_t *order)
1426
1423
{
1427
 
    GListPtr hosts = NULL;
1428
1424
    GListPtr lh_hosts = NULL;
1429
1425
    GListPtr intersection = NULL;
1430
1426
    const char *reason = "unknown";
1511
1507
            break;
1512
1508
        }
1513
1509
 
1514
 
        hosts = NULL;
1515
 
        child_rsc->fns->location(child_rsc, &hosts, down_stack);
1516
 
        intersection = node_list_and(hosts, lh_hosts, FALSE);
1517
 
        if(intersection == NULL) {
1518
 
            crm_debug_3("Ignoring %s->%s for %s: no relevant %s",
1519
 
                        lh_action->task, order->lh_action_task, child_rsc->id, reason);
 
1510
        intersection = NULL;
 
1511
        if(task == stop_rsc) {
 
1512
            /* Only relevant for stopping stacks */
 
1513
 
 
1514
            GListPtr hosts = NULL;
 
1515
            child_rsc->fns->location(child_rsc, &hosts, down_stack);
 
1516
            intersection = node_list_and(hosts, lh_hosts, FALSE);
1520
1517
            g_list_free(hosts);
1521
 
            continue;  
 
1518
            if(intersection == NULL) {
 
1519
                crm_debug_3("Ignoring %s->%s for %s: no relevant %s",
 
1520
                            lh_action->task, order->lh_action_task, child_rsc->id, reason);
 
1521
                continue;
 
1522
            }
1522
1523
        }
1523
 
                        
 
1524
        
1524
1525
        /* slist_iter(h, node_t, hosts, llpc, crm_info("H: %s %s", child_rsc->id, h->details->uname)); */
1525
1526
        if(restart) {
1526
1527
            reason = "restart";
1543
1544
            native_rsc_order_rh(lh_action, rsc, order);
1544
1545
            order->type = type;
1545
1546
        }
1546
 
                
1547
 
        crm_debug_3("Processed %s->%s for %s on %s: found %s%s",
1548
 
                    lh_action->task, order->lh_action_task, child_rsc->id,
1549
 
                    ((node_t*)intersection->data)->details->uname, reason, create?" - enforced":"");
1550
 
                
 
1547
        
 
1548
        crm_debug_3("Processed %s->%s for %s: found %s%s",
 
1549
                    lh_action->task, order->lh_action_task, child_rsc->id, reason, create?" - enforced":"");
 
1550
        
1551
1551
        /* slist_iter(h, node_t, hosts, llpc, */
1552
1552
        /*         crm_info("H: %s %s", child_rsc->id, h->details->uname)); */
1553
1553
                
1554
1554
        slist_destroy(node_t, node, intersection, crm_free(node));
1555
 
        g_list_free(hosts);
1556
1555
        );
1557
1556
  cleanup:          
1558
1557
    g_list_free(lh_hosts);