07-09-2014 07:03 AM
Hi,
I have an application installed on HA Cluster. The agent for the App will change the dns entry based on the active host/application.
Can someone give me some pointers as to how to create this so that when the active system, it applies the correct ResRecord
So currently have something like this:
hagrp -add Application
hagrp -modify Application SystemList host1 0 host2 1
hares -add App_DNS DNS Application
hares -modify App_DNS StealthMasters " ... "
hares -modify App_DNS ResRecord -add "virtual-host" "10.10.10.10"
However when host2 is the active one, then the virtual-host should be 10.10.10.11 for example
Thanks,
Mark
Solved! Go to Solution.
07-09-2014 07:56 AM
You localise by attribute so you should leave RefreshInterval, CreatePTR, Enabled as global attributes.
If you look in link that Gaurav gave the example shows this:
MultiNICA mnic (
Device@sys1 = { le0 = "166.98.16.103", qfe3 = "166.98.16.103" }
Device@sys2 = { le0 = "166.98.16.104", qfe3 = "166.98.16.104" }
NetMask = "255.255.255.0"
ArpDelay = 5
Options = "trailers"
RouteOptions@sys1 = "default 166.98.16.1 1"
RouteOptions@sys2 = "default 166.98.16.1 1"
)
So here only Device and RouteOptions are localised, but there was no need to localise the RouteOptions as the value is set the same for both. If you do localise an attribute, you must specify a value for ALL systems, so if you have 4 systems and for a given attribute 3 systems have the same value and one system is different, then you would need to localise attribute and set for all 4 systems.
Mike
07-09-2014 07:16 AM
Hi Mark,
You can mark resource attribute as local instead of global. With local attribute, you would be able to give different value for a resource on each node.
https://sort.symantec.com/public/documents/sfha/6.1/solaris/productguides/html/vcs_admin/ch03s05s04.htm
G
07-09-2014 07:24 AM
From command line run:
hares -local App_DNS ResRecord
This localises ResRecord attribute for App_DNS resource so when modifying attribute you can use "-sys nodename" to set different values per system.
Mike
07-09-2014 07:28 AM
Thanks! Much appreciated ..
07-09-2014 07:42 AM
BTW, can other attributes that are common to both be done against the Resource (DNS) or do they need to be defined for each host?
i.e RefreshInterval, CreatePTR, Enabled etc
Thanks
07-09-2014 07:56 AM
You localise by attribute so you should leave RefreshInterval, CreatePTR, Enabled as global attributes.
If you look in link that Gaurav gave the example shows this:
MultiNICA mnic (
Device@sys1 = { le0 = "166.98.16.103", qfe3 = "166.98.16.103" }
Device@sys2 = { le0 = "166.98.16.104", qfe3 = "166.98.16.104" }
NetMask = "255.255.255.0"
ArpDelay = 5
Options = "trailers"
RouteOptions@sys1 = "default 166.98.16.1 1"
RouteOptions@sys2 = "default 166.98.16.1 1"
)
So here only Device and RouteOptions are localised, but there was no need to localise the RouteOptions as the value is set the same for both. If you do localise an attribute, you must specify a value for ALL systems, so if you have 4 systems and for a given attribute 3 systems have the same value and one system is different, then you would need to localise attribute and set for all 4 systems.
Mike
07-09-2014 08:24 AM
So that's working .. now a related I question (I think):
The application agent seems to be running on both servers and the monitor is obviously failing on the secondary host.
What attribute do I need to set so that it only runs one monitor instance?
Thanks
07-09-2014 08:37 AM
I started a new discussion and is not related to localising attributes.
Mike