Blob Blame History Raw
From dcc8e65891537cfdffb1b18e1412b12868d20241 Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Fri, 16 Nov 2018 21:02:13 -0600
Subject: [PATCH 1/2] Low: scheduler: get rid of now-unused all_stopped
 pseudo-action

---
 lib/pengine/common.c | 2 --
 pengine/allocate.c   | 3 ---
 pengine/native.c     | 8 --------
 pengine/notif.c      | 7 -------
 pengine/utils.h      | 1 -
 5 files changed, 21 deletions(-)

diff --git a/lib/pengine/common.c b/lib/pengine/common.c
index c54bc44..d04e4ae 100644
--- a/lib/pengine/common.c
+++ b/lib/pengine/common.c
@@ -280,8 +280,6 @@ text2task(const char *task)
         return no_action;
     } else if (safe_str_eq(task, "stonith_complete")) {
         return no_action;
-    } else if (safe_str_eq(task, "all_stopped")) {
-        return no_action;
     }
     crm_trace("Unsupported action: %s", task);
 #endif
diff --git a/pengine/allocate.c b/pengine/allocate.c
index adc07d8..81f3f51 100644
--- a/pengine/allocate.c
+++ b/pengine/allocate.c
@@ -1556,7 +1556,6 @@ stage6(pe_working_set_t * data_set)
     action_t *stonith_op = NULL;
     action_t *last_stonith = NULL;
     gboolean integrity_lost = FALSE;
-    action_t *all_stopped = get_pseudo_op(ALL_STOPPED, data_set);
     action_t *done = get_pseudo_op(STONITH_DONE, data_set);
     gboolean need_stonith = TRUE;
     GListPtr gIter;
@@ -1706,8 +1705,6 @@ stage6(pe_working_set_t * data_set)
         order_actions(last_stonith, done, pe_order_implies_then);
     }
 
-    order_actions(done, all_stopped, pe_order_implies_then);
-
     g_list_free(stonith_ops);
     return TRUE;
 }
diff --git a/pengine/native.c b/pengine/native.c
index 9ee5990..bd0b7d0 100644
--- a/pengine/native.c
+++ b/pengine/native.c
@@ -1430,14 +1430,6 @@ native_internal_constraints(resource_t * rsc, pe_working_set_t * data_set)
         return;
     }
 
-    {
-        action_t *all_stopped = get_pseudo_op(ALL_STOPPED, data_set);
-
-        custom_action_order(rsc, stop_key(rsc), NULL,
-                            NULL, strdup(all_stopped->task), all_stopped,
-                            pe_order_implies_then | pe_order_runnable_left, data_set);
-    }
-
     if (g_hash_table_size(rsc->utilization) > 0
         && safe_str_neq(data_set->placement_strategy, "default")) {
         GHashTableIter iter;
diff --git a/pengine/notif.c b/pengine/notif.c
index cdc382d..b333e5c 100644
--- a/pengine/notif.c
+++ b/pengine/notif.c
@@ -411,13 +411,6 @@ create_notification_boundaries(resource_t * rsc, const char *action, action_t *
     if (start && end) {
         order_actions(n_data->pre_done, n_data->post, pe_order_optional);
     }
-
-    if (safe_str_eq(action, RSC_STOP)) {
-        action_t *all_stopped = get_pseudo_op(ALL_STOPPED, data_set);
-
-        order_actions(n_data->post_done, all_stopped, pe_order_optional);
-    }
-
     return n_data;
 }
 
diff --git a/pengine/utils.h b/pengine/utils.h
index 04ee36b..aee7708 100644
--- a/pengine/utils.h
+++ b/pengine/utils.h
@@ -66,7 +66,6 @@ pe_action_t *create_pseudo_resource_op(resource_t * rsc, const char *task, bool
 
 #  define STONITH_UP "stonith_up"
 #  define STONITH_DONE "stonith_complete"
-#  define ALL_STOPPED "all_stopped"
 #  define LOAD_STOPPED "load_stopped"
 
 #endif
-- 
1.8.3.1


From 811e6291f18b11471d8b4a98b0079de8f6b00091 Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Fri, 16 Nov 2018 21:08:31 -0600
Subject: [PATCH 2/2] Low: scheduler: get rid of now-unused stonith_complete
 pseudo-action

also last reference to long-gone stonith_up pseudo-action
---
 lib/pengine/common.c |  4 ----
 pengine/allocate.c   | 21 ++-------------------
 pengine/utils.h      |  2 --
 3 files changed, 2 insertions(+), 25 deletions(-)

diff --git a/lib/pengine/common.c b/lib/pengine/common.c
index d04e4ae..d03a6aa 100644
--- a/lib/pengine/common.c
+++ b/lib/pengine/common.c
@@ -276,10 +276,6 @@ text2task(const char *task)
         return no_action;
     } else if (safe_str_eq(task, "fail")) {
         return no_action;
-    } else if (safe_str_eq(task, "stonith_up")) {
-        return no_action;
-    } else if (safe_str_eq(task, "stonith_complete")) {
-        return no_action;
     }
     crm_trace("Unsupported action: %s", task);
 #endif
diff --git a/pengine/allocate.c b/pengine/allocate.c
index 81f3f51..0ee8bb0 100644
--- a/pengine/allocate.c
+++ b/pengine/allocate.c
@@ -1459,11 +1459,10 @@ any_managed_resources(pe_working_set_t * data_set)
  * \brief Create pseudo-op for guest node fence, and order relative to it
  *
  * \param[in] node      Guest node to fence
- * \param[in] done      STONITH_DONE operation
  * \param[in] data_set  Working set of CIB state
  */
 static void
-fence_guest(pe_node_t *node, pe_action_t *done, pe_working_set_t *data_set)
+fence_guest(pe_node_t *node, pe_working_set_t *data_set)
 {
     resource_t *container = node->details->remote_rsc->container;
     pe_action_t *stop = NULL;
@@ -1540,9 +1539,6 @@ fence_guest(pe_node_t *node, pe_action_t *done, pe_working_set_t *data_set)
 
     /* Order/imply other actions relative to pseudo-fence as with real fence */
     stonith_constraints(node, stonith_op, data_set);
-    if(done) {
-        order_actions(stonith_op, done, pe_order_implies_then);
-    }
 }
 
 /*
@@ -1552,11 +1548,9 @@ gboolean
 stage6(pe_working_set_t * data_set)
 {
     action_t *dc_down = NULL;
-    action_t *dc_fence = NULL;
     action_t *stonith_op = NULL;
     action_t *last_stonith = NULL;
     gboolean integrity_lost = FALSE;
-    action_t *done = get_pseudo_op(STONITH_DONE, data_set);
     gboolean need_stonith = TRUE;
     GListPtr gIter;
     GListPtr stonith_ops = NULL;
@@ -1587,7 +1581,7 @@ stage6(pe_working_set_t * data_set)
          */
         if (is_container_remote_node(node)) {
             if (node->details->remote_requires_reset && need_stonith) {
-                fence_guest(node, done, data_set);
+                fence_guest(node, data_set);
             }
             continue;
         }
@@ -1604,7 +1598,6 @@ stage6(pe_working_set_t * data_set)
 
             if (node->details->is_dc) {
                 dc_down = stonith_op;
-                dc_fence = stonith_op;
 
             } else if (is_set(data_set->flags, pe_flag_concurrent_fencing) == FALSE) {
                 if (last_stonith) {
@@ -1613,7 +1606,6 @@ stage6(pe_working_set_t * data_set)
                 last_stonith = stonith_op;
 
             } else {
-                order_actions(stonith_op, done, pe_order_implies_then);
                 stonith_ops = g_list_append(stonith_ops, stonith_op);
             }
 
@@ -1696,15 +1688,6 @@ stage6(pe_working_set_t * data_set)
             }
         }
     }
-
-
-    if (dc_fence) {
-        order_actions(dc_down, done, pe_order_implies_then);
-
-    } else if (last_stonith) {
-        order_actions(last_stonith, done, pe_order_implies_then);
-    }
-
     g_list_free(stonith_ops);
     return TRUE;
 }
diff --git a/pengine/utils.h b/pengine/utils.h
index aee7708..0e81cb3 100644
--- a/pengine/utils.h
+++ b/pengine/utils.h
@@ -64,8 +64,6 @@ extern void calculate_utilization(GHashTable * current_utilization,
 extern void process_utilization(resource_t * rsc, node_t ** prefer, pe_working_set_t * data_set);
 pe_action_t *create_pseudo_resource_op(resource_t * rsc, const char *task, bool optional, bool runnable, pe_working_set_t *data_set);
 
-#  define STONITH_UP "stonith_up"
-#  define STONITH_DONE "stonith_complete"
 #  define LOAD_STOPPED "load_stopped"
 
 #endif
-- 
1.8.3.1