Sun Cluster 2.2 API Developer's Guide

3.2 Deciding Which Methods to Use

This section provides some tips about when to use the start_net, stop_net, and abort_net methods versus using the start, stop, and abort methods.

Generally, it is easier to start, stop, or abort the data service using start_net, stop_net, or abort_net, because the logical network addresses are configured to be up at the point where these methods are called.

To start, stop, or abort a data service, you often will have to invoke the data service's administrative utilities or libraries. Sometimes, the data service has administrative utilities or libraries that use a client-server networking interface to perform the administration. That is, an administrative utility makes a call to the server daemon, so the logical network address might need to be up to use the administrative utility or library.

Consider whether your client software will respond differently depending on whether the network interface or the data service comes online first after a reboot, takeover, or switchover. Use the methods that will ensure adequate retries occur before giving up. For example, if your client implementation does minimal retries when it determines that the data service port is not available, ensure that the data service starts before the network interface is configured. In this case, use the start method rather than the start_net method.

If you use the stop or abort method, the data service is still up at the point where the logical network address is configured to be down; it is only after the logical network address is configured down that the stop and abort methods are invoked.

This creates the invariant that the data service's TCP or UDP service port, or its RPC program number, always appears to be available to clients on the network--except when the logical host network address also is not responding. This invariant is important only if the client code behaves in a significantly different way when it finds that the TCP or UDP service port, or RPC program number, is not responding, but that the logical host's network address is responding. For example, a client might decide to abandon its retry path early in this scenario. This means that the client code is going down a different code path when it receives an explicit error packet back from the server host saying "ICMP port unreachable" or "Program not registered."

You need in-depth knowledge of the client and the data service's client-server networking protocol to know whether a client implementation depends on this invariant.