Blame SOURCES/013-pseudo-removal.patch

413fc7
From dcc8e65891537cfdffb1b18e1412b12868d20241 Mon Sep 17 00:00:00 2001
413fc7
From: Ken Gaillot <kgaillot@redhat.com>
413fc7
Date: Fri, 16 Nov 2018 21:02:13 -0600
413fc7
Subject: [PATCH 1/2] Low: scheduler: get rid of now-unused all_stopped
413fc7
 pseudo-action
413fc7
413fc7
---
413fc7
 lib/pengine/common.c | 2 --
413fc7
 pengine/allocate.c   | 3 ---
413fc7
 pengine/native.c     | 8 --------
413fc7
 pengine/notif.c      | 7 -------
413fc7
 pengine/utils.h      | 1 -
413fc7
 5 files changed, 21 deletions(-)
413fc7
413fc7
diff --git a/lib/pengine/common.c b/lib/pengine/common.c
413fc7
index c54bc44..d04e4ae 100644
413fc7
--- a/lib/pengine/common.c
413fc7
+++ b/lib/pengine/common.c
413fc7
@@ -280,8 +280,6 @@ text2task(const char *task)
413fc7
         return no_action;
413fc7
     } else if (safe_str_eq(task, "stonith_complete")) {
413fc7
         return no_action;
413fc7
-    } else if (safe_str_eq(task, "all_stopped")) {
413fc7
-        return no_action;
413fc7
     }
413fc7
     crm_trace("Unsupported action: %s", task);
413fc7
 #endif
413fc7
diff --git a/pengine/allocate.c b/pengine/allocate.c
413fc7
index adc07d8..81f3f51 100644
413fc7
--- a/pengine/allocate.c
413fc7
+++ b/pengine/allocate.c
413fc7
@@ -1556,7 +1556,6 @@ stage6(pe_working_set_t * data_set)
413fc7
     action_t *stonith_op = NULL;
413fc7
     action_t *last_stonith = NULL;
413fc7
     gboolean integrity_lost = FALSE;
413fc7
-    action_t *all_stopped = get_pseudo_op(ALL_STOPPED, data_set);
413fc7
     action_t *done = get_pseudo_op(STONITH_DONE, data_set);
413fc7
     gboolean need_stonith = TRUE;
413fc7
     GListPtr gIter;
413fc7
@@ -1706,8 +1705,6 @@ stage6(pe_working_set_t * data_set)
413fc7
         order_actions(last_stonith, done, pe_order_implies_then);
413fc7
     }
413fc7
 
413fc7
-    order_actions(done, all_stopped, pe_order_implies_then);
413fc7
-
413fc7
     g_list_free(stonith_ops);
413fc7
     return TRUE;
413fc7
 }
413fc7
diff --git a/pengine/native.c b/pengine/native.c
413fc7
index 9ee5990..bd0b7d0 100644
413fc7
--- a/pengine/native.c
413fc7
+++ b/pengine/native.c
413fc7
@@ -1430,14 +1430,6 @@ native_internal_constraints(resource_t * rsc, pe_working_set_t * data_set)
413fc7
         return;
413fc7
     }
413fc7
 
413fc7
-    {
413fc7
-        action_t *all_stopped = get_pseudo_op(ALL_STOPPED, data_set);
413fc7
-
413fc7
-        custom_action_order(rsc, stop_key(rsc), NULL,
413fc7
-                            NULL, strdup(all_stopped->task), all_stopped,
413fc7
-                            pe_order_implies_then | pe_order_runnable_left, data_set);
413fc7
-    }
413fc7
-
413fc7
     if (g_hash_table_size(rsc->utilization) > 0
413fc7
         && safe_str_neq(data_set->placement_strategy, "default")) {
413fc7
         GHashTableIter iter;
413fc7
diff --git a/pengine/notif.c b/pengine/notif.c
413fc7
index cdc382d..b333e5c 100644
413fc7
--- a/pengine/notif.c
413fc7
+++ b/pengine/notif.c
413fc7
@@ -411,13 +411,6 @@ create_notification_boundaries(resource_t * rsc, const char *action, action_t *
413fc7
     if (start && end) {
413fc7
         order_actions(n_data->pre_done, n_data->post, pe_order_optional);
413fc7
     }
413fc7
-
413fc7
-    if (safe_str_eq(action, RSC_STOP)) {
413fc7
-        action_t *all_stopped = get_pseudo_op(ALL_STOPPED, data_set);
413fc7
-
413fc7
-        order_actions(n_data->post_done, all_stopped, pe_order_optional);
413fc7
-    }
413fc7
-
413fc7
     return n_data;
413fc7
 }
413fc7
 
413fc7
diff --git a/pengine/utils.h b/pengine/utils.h
413fc7
index 04ee36b..aee7708 100644
413fc7
--- a/pengine/utils.h
413fc7
+++ b/pengine/utils.h
413fc7
@@ -66,7 +66,6 @@ pe_action_t *create_pseudo_resource_op(resource_t * rsc, const char *task, bool
413fc7
 
413fc7
 #  define STONITH_UP "stonith_up"
413fc7
 #  define STONITH_DONE "stonith_complete"
413fc7
-#  define ALL_STOPPED "all_stopped"
413fc7
 #  define LOAD_STOPPED "load_stopped"
413fc7
 
413fc7
 #endif
413fc7
-- 
413fc7
1.8.3.1
413fc7
413fc7
413fc7
From 811e6291f18b11471d8b4a98b0079de8f6b00091 Mon Sep 17 00:00:00 2001
413fc7
From: Ken Gaillot <kgaillot@redhat.com>
413fc7
Date: Fri, 16 Nov 2018 21:08:31 -0600
413fc7
Subject: [PATCH 2/2] Low: scheduler: get rid of now-unused stonith_complete
413fc7
 pseudo-action
413fc7
413fc7
also last reference to long-gone stonith_up pseudo-action
413fc7
---
413fc7
 lib/pengine/common.c |  4 ----
413fc7
 pengine/allocate.c   | 21 ++-------------------
413fc7
 pengine/utils.h      |  2 --
413fc7
 3 files changed, 2 insertions(+), 25 deletions(-)
413fc7
413fc7
diff --git a/lib/pengine/common.c b/lib/pengine/common.c
413fc7
index d04e4ae..d03a6aa 100644
413fc7
--- a/lib/pengine/common.c
413fc7
+++ b/lib/pengine/common.c
413fc7
@@ -276,10 +276,6 @@ text2task(const char *task)
413fc7
         return no_action;
413fc7
     } else if (safe_str_eq(task, "fail")) {
413fc7
         return no_action;
413fc7
-    } else if (safe_str_eq(task, "stonith_up")) {
413fc7
-        return no_action;
413fc7
-    } else if (safe_str_eq(task, "stonith_complete")) {
413fc7
-        return no_action;
413fc7
     }
413fc7
     crm_trace("Unsupported action: %s", task);
413fc7
 #endif
413fc7
diff --git a/pengine/allocate.c b/pengine/allocate.c
413fc7
index 81f3f51..0ee8bb0 100644
413fc7
--- a/pengine/allocate.c
413fc7
+++ b/pengine/allocate.c
413fc7
@@ -1459,11 +1459,10 @@ any_managed_resources(pe_working_set_t * data_set)
413fc7
  * \brief Create pseudo-op for guest node fence, and order relative to it
413fc7
  *
413fc7
  * \param[in] node      Guest node to fence
413fc7
- * \param[in] done      STONITH_DONE operation
413fc7
  * \param[in] data_set  Working set of CIB state
413fc7
  */
413fc7
 static void
413fc7
-fence_guest(pe_node_t *node, pe_action_t *done, pe_working_set_t *data_set)
413fc7
+fence_guest(pe_node_t *node, pe_working_set_t *data_set)
413fc7
 {
413fc7
     resource_t *container = node->details->remote_rsc->container;
413fc7
     pe_action_t *stop = NULL;
413fc7
@@ -1540,9 +1539,6 @@ fence_guest(pe_node_t *node, pe_action_t *done, pe_working_set_t *data_set)
413fc7
 
413fc7
     /* Order/imply other actions relative to pseudo-fence as with real fence */
413fc7
     stonith_constraints(node, stonith_op, data_set);
413fc7
-    if(done) {
413fc7
-        order_actions(stonith_op, done, pe_order_implies_then);
413fc7
-    }
413fc7
 }
413fc7
 
413fc7
 /*
413fc7
@@ -1552,11 +1548,9 @@ gboolean
413fc7
 stage6(pe_working_set_t * data_set)
413fc7
 {
413fc7
     action_t *dc_down = NULL;
413fc7
-    action_t *dc_fence = NULL;
413fc7
     action_t *stonith_op = NULL;
413fc7
     action_t *last_stonith = NULL;
413fc7
     gboolean integrity_lost = FALSE;
413fc7
-    action_t *done = get_pseudo_op(STONITH_DONE, data_set);
413fc7
     gboolean need_stonith = TRUE;
413fc7
     GListPtr gIter;
413fc7
     GListPtr stonith_ops = NULL;
413fc7
@@ -1587,7 +1581,7 @@ stage6(pe_working_set_t * data_set)
413fc7
          */
413fc7
         if (is_container_remote_node(node)) {
413fc7
             if (node->details->remote_requires_reset && need_stonith) {
413fc7
-                fence_guest(node, done, data_set);
413fc7
+                fence_guest(node, data_set);
413fc7
             }
413fc7
             continue;
413fc7
         }
413fc7
@@ -1604,7 +1598,6 @@ stage6(pe_working_set_t * data_set)
413fc7
 
413fc7
             if (node->details->is_dc) {
413fc7
                 dc_down = stonith_op;
413fc7
-                dc_fence = stonith_op;
413fc7
 
413fc7
             } else if (is_set(data_set->flags, pe_flag_concurrent_fencing) == FALSE) {
413fc7
                 if (last_stonith) {
413fc7
@@ -1613,7 +1606,6 @@ stage6(pe_working_set_t * data_set)
413fc7
                 last_stonith = stonith_op;
413fc7
 
413fc7
             } else {
413fc7
-                order_actions(stonith_op, done, pe_order_implies_then);
413fc7
                 stonith_ops = g_list_append(stonith_ops, stonith_op);
413fc7
             }
413fc7
 
413fc7
@@ -1696,15 +1688,6 @@ stage6(pe_working_set_t * data_set)
413fc7
             }
413fc7
         }
413fc7
     }
413fc7
-
413fc7
-
413fc7
-    if (dc_fence) {
413fc7
-        order_actions(dc_down, done, pe_order_implies_then);
413fc7
-
413fc7
-    } else if (last_stonith) {
413fc7
-        order_actions(last_stonith, done, pe_order_implies_then);
413fc7
-    }
413fc7
-
413fc7
     g_list_free(stonith_ops);
413fc7
     return TRUE;
413fc7
 }
413fc7
diff --git a/pengine/utils.h b/pengine/utils.h
413fc7
index aee7708..0e81cb3 100644
413fc7
--- a/pengine/utils.h
413fc7
+++ b/pengine/utils.h
413fc7
@@ -64,8 +64,6 @@ extern void calculate_utilization(GHashTable * current_utilization,
413fc7
 extern void process_utilization(resource_t * rsc, node_t ** prefer, pe_working_set_t * data_set);
413fc7
 pe_action_t *create_pseudo_resource_op(resource_t * rsc, const char *task, bool optional, bool runnable, pe_working_set_t *data_set);
413fc7
 
413fc7
-#  define STONITH_UP "stonith_up"
413fc7
-#  define STONITH_DONE "stonith_complete"
413fc7
 #  define LOAD_STOPPED "load_stopped"
413fc7
 
413fc7
 #endif
413fc7
-- 
413fc7
1.8.3.1
413fc7