Why RestartLimit Attribute not comes by default for resource type Appliction?
Hello
When I look at resource (Appliction) I do not find RestartLimit available to make any modification, But when I look the that specific type (Application) of a resources, I can see a RestartLimit, I can understand I need to add these manually.
How can I make it by default whenever I add a new resource, it has to come up from the appropiate type?
The default value for the RestartLimit attribute for the Application-Type is '0'; that is, "do not attempt to restart a failed resource of Application-Type; instead, begin fault processing for this resource on the first occurrence of a failed Monitor entry point".
The RestartLimit is a Type attribute not a resource attribute.
However, you get the choice of either setting it at the Type-level:-$ hatype -modify RestartLimit 2
...in which case EVERY Application-Type resource in your cluster will inherit this attribute value (unless overridden).OR, you can set this at the resource-level by overriding the RestartLimit Type-level attribute:
-$ hares -override <yourResourceNmae> RestartLimit
...and then you can set up a RestartLimit limit for that resource:-$ hares -modify <yourResourceName> RestartLimit 2
...in which case this value is ONLY applicable to the specific resource defined above.So, if you know that for most of your Application-Type resources in your cluster you want to have a RestartLimit of 3, then set that at the Type-level:
-$ hatype -modify RestartLimit 3
And then for any exceptions to this "cluster-specific value", individually set the RestartLimit to suit individual resource requirements:-$ hares -override <yourResourceName> RestartLimit -$ hares -modify <yourResourceName> RestartLimit 10
The other possibility is that you can clone the Application agent and create your own agent, which is a copy, but has a different name and most importantly for this issue, a different Type which has a different RestartLimit value defined within it. This, in fact, is how we changed static-Type-level attributes prior to the "-override" feature was added to VCS. (I am not sure, but I think there is a very good chance that Symantec would not support problems with Agent-Types that have been cloned, so that is another consideration).
Now-a-days it is generally preferable to simply use the the "-override" feature (which is 100% supported by Symantec).