|
|
a125f5 |
From 0dca216a84720e5652b1d87aac8c7e0aa8b4a31c Mon Sep 17 00:00:00 2001
|
|
|
a125f5 |
From: Ken Gaillot <kgaillot@redhat.com>
|
|
|
a125f5 |
Date: Wed, 27 Feb 2019 14:21:26 -0600
|
|
|
a125f5 |
Subject: [PATCH] High: libcrmcommon: complete interrupted live migrations
|
|
|
a125f5 |
correctly
|
|
|
a125f5 |
|
|
|
a125f5 |
8435966 (2.0.0) got the sense of compare_version() wrong when attempting to
|
|
|
a125f5 |
remove the old behavior for recording partial live migrations, instead
|
|
|
a125f5 |
re-introducing it.
|
|
|
a125f5 |
|
|
|
a125f5 |
This causes a regression in behavior when a transition containing a live
|
|
|
a125f5 |
migration is aborted after the migrate_to has been initiated but before the
|
|
|
a125f5 |
migrate_from has been initiated. In that case, it would schedule a full start
|
|
|
a125f5 |
on the destination node rather than a migrate_from.
|
|
|
a125f5 |
---
|
|
|
a125f5 |
lib/common/operations.c | 16 ++--------------
|
|
|
a125f5 |
1 file changed, 2 insertions(+), 14 deletions(-)
|
|
|
a125f5 |
|
|
|
a125f5 |
diff --git a/lib/common/operations.c b/lib/common/operations.c
|
|
|
a125f5 |
index 40d4c18..88c4fa5 100644
|
|
|
a125f5 |
--- a/lib/common/operations.c
|
|
|
a125f5 |
+++ b/lib/common/operations.c
|
|
|
a125f5 |
@@ -396,8 +396,8 @@ create_operation_update(xmlNode * parent, lrmd_event_data_t * op, const char * c
|
|
|
a125f5 |
|
|
|
a125f5 |
task = op->op_type;
|
|
|
a125f5 |
|
|
|
a125f5 |
- /* Remap the task name under various scenarios, to make life easier for the
|
|
|
a125f5 |
- * PE when determining the current state.
|
|
|
a125f5 |
+ /* Record a successful reload as a start, and a failed reload as a monitor,
|
|
|
a125f5 |
+ * to make life easier for the scheduler when determining the current state.
|
|
|
a125f5 |
*/
|
|
|
a125f5 |
if (crm_str_eq(task, "reload", TRUE)) {
|
|
|
a125f5 |
if (op->op_status == PCMK_LRM_OP_DONE) {
|
|
|
a125f5 |
@@ -405,18 +405,6 @@ create_operation_update(xmlNode * parent, lrmd_event_data_t * op, const char * c
|
|
|
a125f5 |
} else {
|
|
|
a125f5 |
task = CRMD_ACTION_STATUS;
|
|
|
a125f5 |
}
|
|
|
a125f5 |
-
|
|
|
a125f5 |
- } else if (crm_str_eq(task, CRMD_ACTION_MIGRATE, TRUE)) {
|
|
|
a125f5 |
- /* if the migrate_from fails it will have enough info to do the right thing */
|
|
|
a125f5 |
- if (op->op_status == PCMK_LRM_OP_DONE) {
|
|
|
a125f5 |
- task = CRMD_ACTION_STOP;
|
|
|
a125f5 |
- } else {
|
|
|
a125f5 |
- task = CRMD_ACTION_STATUS;
|
|
|
a125f5 |
- }
|
|
|
a125f5 |
-
|
|
|
a125f5 |
- } else if ((op->op_status == PCMK_LRM_OP_DONE)
|
|
|
a125f5 |
- && crm_str_eq(task, CRMD_ACTION_MIGRATED, TRUE)) {
|
|
|
a125f5 |
- task = CRMD_ACTION_START;
|
|
|
a125f5 |
}
|
|
|
a125f5 |
|
|
|
a125f5 |
key = generate_op_key(op->rsc_id, task, op->interval_ms);
|
|
|
a125f5 |
--
|
|
|
a125f5 |
1.8.3.1
|
|
|
a125f5 |
|