Previous Table of Contents Next


23.4.6 Fault Notifier


   The Fault Notifier takes the fault reports generated by the Fault Detectors or the Fault Analyzers, filters them, and propagates them to entities that have registered for fault notifications, such as the Replication Manager, the Fault Analyzer, or other application objects.

   The Fault Notifier provides a small subset of the functionality of the CosNotification Service. The CosNotification Service is complex, and an implementation of the full specification might be difficult to render fault tolerant. The Fault Notifier assumes that the notification channel used for propagating fault reports has the following properties:

   A notification channel that provides the above properties and that can be made fault-tolerant is a good candidate for implementing the Fault Notifier.

   The Fault Notifier uses the existing CosNotification StructuredEvent and EventBatch formats, forwarding filter framework, and consumer end interfaces. The default constraint grammar is the same as that supported by the CosNotification Service (see telecom/98-11-01).


   Notifier


   Figure 23-10 Fault Report Propagation through the Fault Notifier

    Figure 23-10 shows the interaction between the Fault Notifier and the fault event suppliers and consumers during fault propagation.

   Any fault event supplier (Fault Detector) may obtain the reference to the Fault Notifier and send fault reports to it. It does not need to register explicitly with the Fault Notifier. The FaultNotifier interface provides two operations, push_structured_fault() and push_sequence_fault(), for fault event suppliers to push fault events of the form CosNotification::StructuredEvent and CosNotification::EventBatch to the Fault Notifier.

   A fault event consumer, such as the Replication Manager or a consumer object created by the Replication Manager, must register with the Fault Notifier to receive fault event notifications, as shown in Figure 23-11. The FaultNotifier interface provides two operations for registering consumers: connect_structured_fault_consumer() for consumers that accepts only structured events and connect_sequence_fault_consumer() for consumers that accept a sequence of structured events. A consumer that wishes to receive structured events must support the CosNotifyComm::StructuredPushConsumer interface and a consumer that wishes to receive a sequence of structured must support the CosNotifyComm::SequencePushConsumer interface.

   1. create_subscription_filter()

   



CosNotifyComm

   2. connect_structured_fault_consumer()

   StructuredPushConsumer

   Fault

   Notifier


   3. push_structured_event()

   Consumer

   Figure 23-11 Connection Setup between the Consumer and the Fault Notifier

   The Fault Notifier propagates all events of a given format to all consumers that accept that format. While a consumer is connected to the Fault Notifier, it may use the operation replace_constraint() to replace a constraint for a given sequence of event types.

   module FT {

   interface FaultNotifier { typedef unsigned long long ConsumerId; void push_structured_fault(

   in CosNotification::StructuredEvent event);

   void push_sequence_fault( in CosNotification::EventBatch events);

   ConsumerId connect_structured_fault_consumer( in CosNotifyComm:StructurePushConsumer push_consumer);

   ConsumerId connect_sequence_fault_consumer( in CosNotifyComm:StructurePushConsumer push_consumer);

   void disconnect_consumer (in ConsumerId connection) raises(CosEventComm::Disconnected);

   void replace_constraint (in ConsumerID connection, in CosNotification::EventTypeSeq event_types, in string constr_expr);

   };};

   23.4.6.1 Identifiers

   typedef unsigned long long ConsumerId;

   The identifier used to identify the consumer of notifications uniquely within the Fault Notifier.

   23.4.6.2 Operations

   push_structured_fault

   The supplier of a fault report creates a structured event containing the fault report and invokes this operation with the structured event as an in parameter. The Fault Notifier then pushes a fault notification to the consumers that have registered for such notifications.

   void push_structured_fault(in CosNotification::StructuredEvent event);

   Parameters


   push_sequence_fault

   The supplier of a fault report creates a sequence of structured event containing the fault reports and invokes this operation with the sequence of structured event as an in parameter. The Fault Notifier then pushes a fault notification to the consumers that have registered for such notifications.

   void push_sequence_fault(in CosNotification::EventBatch events);

   Parameters


   connect_structured_fault_consumer

   This operation accepts as an in parameter the reference to a consumer that wishes to receive structured events from the Fault Notifier and returns an identifier that uniquely identifies the consumer within the context of the Fault Notifier. The consumer must use this identifier in all of its subsequent interactions with the Fault Notifier. The operation establishes a logical connection between the Fault Notifier and the consumer, and allows the Fault Notifier to push fault events to the consumer, using the push_structured_event() operation of the CosNotifyComm::StructuredPushConsumer interface.

   ConsumerId connect_structured_fault_consumer( in CosNotifyComm::StructuredPushConsumer push_consumer);

   Parameters


   Return Value

   An identifier that uniquely identifies the consumer within the context of the Fault Notifier and is used by the consumer in subsequent interactions with the Fault Notifier.

   connect_sequence_fault_consumer

   This operation accepts as an in parameter the reference to a consumer that wishes to accept a sequence of structured events from the Fault Notifier and returns an identifier that uniquely identifies the consumer within the context of the Fault Notifier. The consumer must use this identifier in all of its subsequent interactions with the Fault Notifier. The operation establishes a logical connection between the Fault Notifier and the consumer, and allows the Fault Notifier to push fault events to the consumer using the push_sequence_event() operation of the CosNotifyComm::SequencePushConsumer interface.

   ConsumerId connect_sequence_fault_consumer( in CosNotifyComm::SequencePushConsumer push_consumer);

   Parameters


   Return Value

   An identifier that uniquely identifies the consumer within the context of the Fault Notifier and that is used by the consumer in subsequent interactions with the Fault Notifier.

   disconnect_consumer

   This operation is invoked by the consumer to disconnect itself from the Fault Notifier. The operation takes as an in parameter the ConsumerId identifying the disconnecting consumer.

   void disconnect_consumer(in ConsumerId connection)raises(CosEventComm::Disconnected);

   Parameters


   Raises

   CosEventComm::Disconnected if the Fault Notifier is not currently connected to any consumer identifier by the given ConsumerId.

   23.4.6.3 Filtering

   Filtering is done by the Fault Notifier based on the constraints provided by the consumer.

   Because Location is of type CosNaming::Name, a location can be described using a hierarchical location scheme. For example, an object “objA? located in process “procB? on host “hostC? can be described as follows:

   Location object_location;object_location.length(3);object_location[0].id = "hostC";object_location[0].kind = "hostname";

   object_location[1].id = "procB";object_location[1].kind = "processname";object_location[2].id = "objA";object_location[2].kind = "objectname";

   To facilitate hierarchical fault detection and reporting, the Fault Detector may omit some trailing Location entries. For example, if all objects on a host fail, then a Fault Detector may send a fault report with only the leading Location entry, which identifies the failed host.

   The Fault Notifier may also filter events based on a subset of the Location entries. For example, if a consumer of fault events wishes to subscribe to notifications of faults of type ObjectCrashFault on a particular host, the filtering selects faults based on the leading entry of Location, which identifies the host.

   The Extended Trader Constraint Language is used to filter fault events, as illustrated below.

   For example, to register for all fault events in ftdom0 on hostC, use the filter string "$event_type.domain_name == ‘FT_CORBA’ and $event_type.type_name == ‘ObjectCrashFault’ and $FTDomainId == ‘ftdom0’ and $Location[0].id == ‘hostC’".

   To register for fault events for a member of an object group, identified by (ftdom0, group1, type2, hostC, procB), where the object itself crashed or the process containing the object crashed or the host supporting the process crashed, use the filter string "$event_type.domain_name == ‘FT_CORBA’ and $event_type.type_name == ‘ObjectCrashFault’ and $FTDomainId == ‘ftdom0’ and (not exists $ObjectGroupId or $ObjectGroupId == ‘group1’) and (not exists $TypeId or $TypeId == ‘type2’) and $Location[0].id == ‘hostC’ and (not exists $Location[1] or $Location[1].id == ‘procB’)".

   23.4.6.4 Mapping of the Fault Notifier to the CosNotification Service

   This section is intended as an informational, rather than a mandatory, part of the specification. It is intended for vendors that want to use the CosNotification service, in place of the FaultNotifier interface that has been defined in this specification. Such a vendor must use an implementation of the CosNotification service that can be rendered fault-tolerant and that is compatible with the rest of the Fault Tolerance Infrastructure. The six operations of the FaultNotifier interface map directly or indirectly to one or more of the operations of the CosNotification service.

   Initialization

   The Fault Notifier first creates a notification channel and registers itself both as a structured event supplier and a sequence of structured event supplier with the notification channel. To register itself as a supplier of structured events, the Fault Notifier goes through the following steps:

   3. It invokes connect_structured_push_supplier() on the StructuredProxyPushConsumer to connect itself as a supplier of structured events.

   The Fault Notifier follows similar steps to register itself as a supplier of a sequence of structured events.

   Supplier End Operations

   The supplier end methods push_structured_fault() and push_sequence_fault() map to CosNotifyComm::StructuredProxyPushConsumer::push_structured_event() and CosNotifyComm::SequenceProxyPushConsumer::push_sequence_event().

   Consumer End Operations

   A consumer, such as the Replication Manager or a consumer object created by the Replication Manager, connect to the Fault Notifier through the connect_structured_fault_consumer() and connect_sequence_fault_consumer() operations. The consumer sets the constraints for a given sequence of event types using the replace_constraint() operation.

   In response to the connect_structured_fault_consumer() invocation, the Fault Notifier goes through the following sequence of steps to set up the connection between the consumer and the notification channel.

   3. It invokes connect_structured_push_consumer() on the StructuredProxyPushSupplier and passes it the reference to the connecting consumer. This sets up a connection capable of propagating structured fault events between the notification channel and the push consumer.