[pve-devel] [PATCH ha-manager v4 3/3] fix infinite started <=> migrate cycle
Thomas Lamprecht
t.lamprecht at proxmox.com
Tue Feb 23 16:15:27 CET 2016
If we get an 'EWRONG_NODE' error from the migration we have no sane
way out. If we place it then in the started state we also get the
'EWRONG_NODE' error again and it even will place the service in
the migration state again (when it's not restricted by a group) and
thus result in an infinite started <=> migrate cycle.
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
no changes since v3
src/PVE/HA/Manager.pm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/PVE/HA/Manager.pm b/src/PVE/HA/Manager.pm
index 2e5194f..deefe6e 100644
--- a/src/PVE/HA/Manager.pm
+++ b/src/PVE/HA/Manager.pm
@@ -473,6 +473,10 @@ sub next_state_migrate_relocate {
if ($exit_code == SUCCESS) {
&$change_service_state($self, $sid, $req_state, node => $sd->{target});
return;
+ } elsif ($exit_code == EWRONG_NODE) {
+ $haenv->log('err', "service '$sid' - migration failed: service" .
+ " registered on wrong node!");
+ &$change_service_state($self, $sid, 'error');
} else {
$haenv->log('err', "service '$sid' - migration failed (exit code $exit_code)");
&$change_service_state($self, $sid, $req_state, node => $sd->{node});
--
2.1.4
More information about the pve-devel
mailing list