[pve-devel] [PATCH ha-manager 2/3] Status: improve feedback for 'ignored' state transitions
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Nov 24 16:58:47 CET 2016
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
src/PVE/API2/HA/Status.pm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/PVE/API2/HA/Status.pm b/src/PVE/API2/HA/Status.pm
index dbf23d5..0e081bc 100644
--- a/src/PVE/API2/HA/Status.pm
+++ b/src/PVE/API2/HA/Status.pm
@@ -162,10 +162,14 @@ __PACKAGE__->register_method ({
$state = 'starting';
} elsif ($req eq 'disabled') {
$state = 'disabled';
+ } elsif ($req eq 'ignored') {
+ $state = 'setting ignored';
}
} elsif ($cur eq 'started') {
if ($req eq 'stopped' || $req eq 'disabled') {
$state = 'stopping';
+ } elsif ($req eq 'ignored') {
+ $state = 'setting ignored';
}
$state = 'starting' if !$ss->{running};
} elsif ($cur eq 'error') {
@@ -180,7 +184,7 @@ __PACKAGE__->register_method ({
$data->{crm_state} = $ss->{state};
} else {
$data->{node} = $sc->{node};
- $data->{state} = 'queued';
+ $data->{state} = ($sc->{state} eq 'ignored') ? 'ignored' : 'queued';
$data->{status} = "$sid ($sc->{node}, queued)"; # backward compatibility
}
--
2.1.4
More information about the pve-devel
mailing list