[pve-devel] [PATCH] do not pass ETRY_AGAIN back to the CRM

Dietmar Maurer dietmar at proxmox.com
Wed Feb 24 08:04:32 CET 2016


This is simply not necessary. Everything can be done inside the LRM.
---
 src/PVE/HA/LRM.pm     | 2 ++
 src/PVE/HA/Manager.pm | 4 ----
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/PVE/HA/LRM.pm b/src/PVE/HA/LRM.pm
index f53f26d..7bbfe46 100644
--- a/src/PVE/HA/LRM.pm
+++ b/src/PVE/HA/LRM.pm
@@ -538,6 +538,8 @@ sub resource_command_finished {
 
     $exit_code = $self->handle_service_exitcode($sid, $w->{state}, $exit_code);
 
+    return if $exit_code == ETRY_AGAIN; # tell nobody, simply retry
+
     $self->{results}->{$uid} = {
 	sid => $w->{sid},
 	state => $w->{state},
diff --git a/src/PVE/HA/Manager.pm b/src/PVE/HA/Manager.pm
index d0031e7..32b0ad7 100644
--- a/src/PVE/HA/Manager.pm
+++ b/src/PVE/HA/Manager.pm
@@ -580,10 +580,6 @@ sub next_state_started {
 
 		    $master_status->{relocate_trial}->{$sid} = 0;
 
-		} elsif ($ec == ETRY_AGAIN) {
-
-		    # do nothing, the LRM wants to try again
-
 		} elsif ($ec == ERROR) {
 		    # apply our relocate policy if we got ERROR from the LRM
 
-- 
2.1.4




More information about the pve-devel mailing list