The following examples show how to configure domain dependencies.
The first command creates a master domain called twizzle. This command uses failure-policy=reset to specify that slave domains reset if the twizzle domain fails. The second command modifies a master domain called primary. This command uses failure-policy=panic to specify that slave domains panic if the primary domain fails. The third command creates a slave domain called chocktaw that depends on two master domains, twizzle and primary. The slave domain uses master=twizzle,primary to specify its master domains. In the event either the twizzle or primary domain fails, the chocktaw domain will reset or panic. The first master domain to fail is the one responsible for determining the behavior of the slave domains.
# ldm add-domain failure-policy=reset twizzle # ldm set-domain failure-policy=panic primary # ldm add-domain master=twizzle,primary chocktaw |
This example shows how to use the ldm set-domain command to modify the orange domain to assign primary as the master domain. The second command uses the ldm set-domain command to assign orange and primary as master domains for the tangerine domain. The third command lists information about all of these domains.
# ldm set-domain master=primary orange # ldm set-domain master=orange,primary tangerine # ldm list -o domain NAME STATE FLAGS UTIL primary active -n-cv- 0.2% SOFTSTATE Solaris running HOSTID 0x83d8b31c CONTROL failure-policy=ignore DEPENDENCY master= ------------------------------------------------------------------------------ NAME STATE FLAGS UTIL orange bound ------ HOSTID 0x84fb28ef CONTROL failure-policy=stop DEPENDENCY master=primary VARIABLES test_var=Aloha ------------------------------------------------------------------------------ NAME STATE FLAGS UTIL tangerine bound ------ HOSTID 0x84f948e9 CONTROL failure-policy=ignore DEPENDENCY master=orange,primary VARIABLES test_var=A hui hou |
The following shows an example listing with parseable output:
# ldm list -o domain -p VERSION 1.4 DOMAIN|name=primary|state=active|flags=normal,control,vio-service|util=0.3 softstate=Solaris running HOSTID|hostid=0x83d8b31c CONTROL|failure-policy=ignore DEPENDENCY|master= DOMAIN|name=orange|state=bound|flags=|util= HOSTID|hostid=0x84fb28ef CONTROL|failure-policy=stop DEPENDENCY|master=primary VARIABLES|test_var=Aloha DOMAIN|name=tangerine|state=bound|flags=|util= HOSTID|hostid=0x84f948e9 CONTROL|failure-policy=ignore DEPENDENCY|master=orange,primary VARIABLES|test_var=A hui hou |