[pve-devel] [PATCH ha-manager 3/4] tools: add IGNORED return code

Fiona Ebner f.ebner at proxmox.com
Fri Apr 14 14:38:29 CEST 2023


Will be used to ignore rebalance-on-start when an already running
service is newly added to HA.

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 src/PVE/HA/Tools.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/PVE/HA/Tools.pm b/src/PVE/HA/Tools.pm
index 1a88351..edd5642 100644
--- a/src/PVE/HA/Tools.pm
+++ b/src/PVE/HA/Tools.pm
@@ -19,12 +19,13 @@ use constant {
     EUNKNOWN_COMMAND => 5,
     EINVALID_PARAMETER => 6,
     EUNKNOWN_SERVICE => 7, # service not found
+    IGNORED => 8, # action was ignored for some good reason
 };
 
 # get constants out of package in a somewhat easy way
 use base 'Exporter';
 our @EXPORT_OK = qw(SUCCESS ERROR EWRONG_NODE EUNKNOWN_SERVICE_TYPE
- EUNKNOWN_COMMAND EINVALID_PARAMETER ETRY_AGAIN EUNKNOWN_SERVICE);
+ EUNKNOWN_COMMAND EINVALID_PARAMETER ETRY_AGAIN EUNKNOWN_SERVICE IGNORED);
 our %EXPORT_TAGS = ( 'exit_codes' => [@EXPORT_OK] );
 
 PVE::JSONSchema::register_format('pve-ha-resource-id', \&pve_verify_ha_resource_id);
-- 
2.30.2






More information about the pve-devel mailing list