AMF/OrderedNodeShutdown

Ordered System Shutdown

Problem

When a system is shutdown (using for example the shutdown command), AMF needs to stop all components under its control. Pre OpenSAF 4.2.1 this has been done by an unordered component cleanup script execution.

If components and the services they provide has dependencies to each other, it can cause problems to safely shutdown a system. Consider for example if one component provides the service of mounting a file system and other components uses this file system. If the shutdown is performed without ordering, the file system can not be cleanly unmounted.

The AMF specification does not provide guidance to the question in what order AMF should shutdown services/components?

Solution

In the AMF B.04 specification it is stated that "the rank of an SI is now global to the cluster" and "the rank of the SI on which other SIs depend must not be lower than the ranks of the dependent SIs".

Leveraging on that, AMF can decide which Service Instance to start removing. That is the SI with the lowest rank (highest number) is removed first. By removed it means that for sa-aware components, the CSI Remove Callback is executed. For non-sa-aware components, the terminate commands is executed.

Within each SI, CSIs are removed in reversed order of their dependencies.

After all CSIs has been removed, component cleanup scripts are executed.

Related Information

http://devel.opensaf.org/ticket/2414

Last modified by hafe, 03/19/12 15:00:50 (9 months ago)