]> git.proxmox.com Git - pve-ha-manager.git/blobdiff - src/PVE/HA/Resources.pm
implement recovery policy for services
[pve-ha-manager.git] / src / PVE / HA / Resources.pm
index 25435862e662cf11aa671f07bcc0b432a70362f7..c41fa91186a5dd20f2512e5f698ee53eea745baf 100644 (file)
@@ -25,6 +25,22 @@ my $defaultData = {
        group => get_standard_option('pve-ha-group-id',
                                    { optional => 1,
                                      completion => \&PVE::HA::Tools::complete_group }),
+       max_restart => {
+           description => "Maximal number of tries to restart the service on".
+                         " a node after its start failed.",
+           type => 'integer',
+           optional => 1,
+           default => 1,
+           minimum => 0,
+       },
+       max_relocate => {
+           description => "Maximal number of service relocate tries when a".
+                         " service failes to start.",
+           type => 'integer',
+           optional => 1,
+           default => 1,
+           minimum => 0,
+       },
        comment => {
            description => "Description.",
            type => 'string',
@@ -119,6 +135,8 @@ sub options {
        state => { optional => 1 },
        group => { optional => 1 },
        comment => { optional => 1 },
+       max_restart => { optional => 1 },
+       max_relocate => { optional => 1 },
     };
 }
 
@@ -183,6 +201,8 @@ sub options {
        state => { optional => 1 },
        group => { optional => 1 },
        comment => { optional => 1 },
+       max_restart => { optional => 1 },
+       max_relocate => { optional => 1 },
     };
 }