Logical Domains 1.2 Administration Guide

Configuring Domain Dependencies

You can use the Logical Domains Manager to establish dependency relationships between domains. A domain that has one or more domains that depend on it is called a master domain. A domain that depends on another domain is called a slave domain.

Each slave domain can specify up to four master domains by setting the master property. For example, the pine slave domain specifies its four master domains in the following comma-separated list:


# ldm add-domain master=apple,lemon,orange,peach pine

Each master domain can specify what happens to its slave domains in the event that the master domain fails. For instance, if a master domain fails, it might require its slave domains to panic. If a slave domain has more than one master domain, the first master domain to fail triggers its defined failure policy on all of its slave domains.


Note –

If more than one master domain fails simultaneously, only one of the specified failure policies will be enforced on all the affected slave domains. For example, if the failed master domains have failure policies of stop and panic, all slave domains will be either stopped or panicked.


The master domain's failure policy is controlled by setting one of the following values to the failure-policy property:

In this example, the master domains specify their failure policy as follows:


# ldm set-domain failure-policy=ignore apple
# ldm set-domain failure-policy=panic lemon
# ldm set-domain failure-policy=reset orange
# ldm set-domain failure-policy=stop peach

You can use this mechanism to create explicit dependencies between domains. For example, a guest domain implicitly depends on the service domain to provide its virtual devices. A guest domain's I/O is blocked when the service domain on which it depends is not up and running. By defining a guest domain as a slave of its service domain, you can specify the behavior of the guest domain when its service domain goes down. When no such dependency is established, a guest domain just waits for its service domain to return to service.


Note –

The Logical Domains Manager does not permit you to create domain relationships that create a dependency cycle. For more information, see Dependency Cycles.


For domain dependency XML examples, see Example 10–6.

Domain Dependency Examples

The following examples show how to configure domain dependencies.

Dependency Cycles

The Logical Domains Manager does not permit you to create domain relationships that create a dependency cycle. A dependency cycle is a relationship between two or more domains that lead to a situation where a slave domain depends on itself, or a master domain depends on one of its slave domains.

The Logical Domains Manager determines whether a dependency cycle exists before adding a dependency. The Logical Domains Manager starts at the slave domain and searches along all paths that are specified by the master array until the end of the path is reached. Any dependency cycles found along the way are reported as errors.

The following example shows how a dependency cycle might be created. The first command creates a slave domain called mohawk that specifies its master domain as primary. So, mohawk depends on primary in the following dependency chain:

Figure 4–1 Single Domain Dependency

Diagram shows a domain dependency chain where the mohawk domain depends on the primary domain as its master.

The second command creates a slave domain called primary that specifies its master domain as counter. So, mohawk depends on primary, which depends on counter in the following dependency chain:

Figure 4–2 Multiple Domain Dependency

Diagram shows a domain dependency chain where mohawk depends on primary, and primary depends on counter.

The third command attempts to create a dependency between the counter and mohawk domains, which would produce the following dependency cycle:

Figure 4–3 Domain Dependency Cycle

Diagram shows a domain dependency cycle where mohawk depends on primary, primary depends on counter, and counter depends on mohawk.

The ldm set-domain command will fail with the following error message:


# ldm add-domain master=primary mohawk
# ldm set-domain master=counter primary
# ldm set-domain master=mohawk counter
Dependency cycle detected: LDom "counter" indicates "primary" as its master