- **status**: review --> fixed
- **Milestone**: future --> 5.19.06
- **Comment**:

commit 8e0d4160a6b269463b72a8af088cfb1d4d93fb9b (HEAD -> develop, 
origin/develop)
Author: Alex Jones <ajo...@rbbn.com>
Date:   Wed Apr 17 10:01:30 2019 -0400




---

** [tickets:#70] AMF support for Container and contained components**

**Status:** fixed
**Milestone:** 5.19.06
**Created:** Mon May 13, 2013 04:14 AM UTC by Nagendra Kumar
**Last Updated:** Tue Jul 31, 2018 08:32 PM UTC
**Owner:** Alex Jones


Migrated from http://devel.opensaf.org/ticket/1436:

Current implementation of AMF doesn't support Container and Contained 
components.

Concept of container and contained component was introduced in B.03.01 spec. 
Because of this support,
there were series of changes and new additions in different sections of the 
spec. Also a new chapeter 6 is fully dedicated to conatiner and contained 
components. 

What follows is summary of conatiner and contained components concept collected 
from different sections of the B.04.01 spec with reference to particular 
sections and page no.

**A)Section  3.1.2.1.1 page 45 talks about use case related to containter**
 ** and contained component concept:**
"
The concept of container and contained components allows the Availability 
Management
Framework to integrate components that are not executed directly by the
operating system, but rather in a controlled environment running on top of the 
operating
system. Widespread environments are runtime environments, virtual machines,
or component frameworks.
"
AMF directly manages life cycle of container component but not of containted 
component.
A container component cooperates with AMF for managing life cycle of contained 
component.
If a container comp1 manages life cycle of a contained comp2 then comp1 is 
termed
as assciated container component of comp2 and comp2 is termed as associated 
contained
component of comp1. If there is one more component say comp3 for which 
associated
container component is same comp1 then comp3 and comp2 are referred as
collocated contained components. (3.1.2.1.1 Container and Contained Components 
page 45)

**B)Configuration:**
-Container and contained components are local SA-aware components.
 (6.1.2 Component Category page 221)
-User can configure attribute "saAmfCtCompCategory" of class "SaAmfCompType" 
with
 following values to declare component of this CompType is a container or
 contained component (Section7.4.8 SaAmfCompCategoryT page 258):

 \ #define SA_AMF_COMP_CONTAINER 0x0010
  \#define SA_AMF_COMP_CONTAINED 0x0020

-A single container component acts as container component for many contained
 conponents.(6.2.2 Assignment of the Container CSI page 224).
-Container and its contained components must be hosted on same AMF Node.
-A containter component can be part of SG of only N-Way Acitve model.
 (6.1.6 Redundancy Models Page 222)
-A contained component can be part of SG of any redundancy model.
 (6.1.6 Redundancy Models Page 223)
-A SU cannot contain any other types/categories of components if a container 
component is
 present in it. ( 3.1.4 Service Unit page 52).
-A SU cannot contain both container components and contained components.
 (6.1.5 Container and Contained Components in Service Units and Service Groups 
page 221)
-A SU that contains a contained component can only contain collocated contained
components.(6.1.5 Container and Contained Components in Service Units and 
Service Groups page 221)
-SUs containing contained components and SUs containing container components
 must belong to different SGs.
(6.1.5 Container and Contained Components in Service Units and Service Groups 
page 222)
-Since a container component can be associated with many contained components 
and also there
 can be many container components in a SU, a user has to specify a CSI name in
 saAmfCompContainerCsi in Comp class to declare indirectly its associated 
container component.
 The component which will receive this container CSI will act as container 
component
 for this contained component on same node.(3.1.3 Component Service Instance 
page 51)
-A SI containing a container CSI cannot have any other CSI.
(6.1.5 Container and Contained Components in Service Units and Service Groups 
page 222)
-A container component can recieve multiple CSI assignments based on 
configuration. Among
 these CSIs, one or more can be for handling contained components and others 
can be
 for providing other services. (3.1.3 Component Service Instance page 51)
-If a SU contains contained components then they should have a common 
associated container
 component. This can be ensured by configuring same container CSI.( 3.1.4 
Service Unit page 52)
-Rank of container SI should be higher than the rank of contained SI.
 (3.6.1.4 Considerations when Configuring Redundancy page 121) and
 (6.1.5 Container and Contained Components in Service Units and Service Groups 
Page 222)
-There should not be any conflict while hosting container SUs and contained SUs
 on nodes and node group as both container and its associated contained 
components
 should reside on the same node.
 (6.1.5 Container and Contained Components in Service Units and Service Groups 
pae 222)

**C)Life Cycle Callbacks related to container and contained component:**
 -Callback for instantiating a contained component
  (7.10.4 SaAmfContainedComponentInstantiateCallbackT page 312):

  typedef void (*SaAmfContainedComponentInstantiateCallbackT)(
               SaInvocationT invocation,
               const SaNameT *containedCompName
              );
        This callback is sent to a container component to instantiate
  a contained component which is pointed by containedCompName. Callback will be 
sent
  to the container component when it has become active for the container CSI.
  Conatiner component will respond to AMF using saAmfResponse_4() API after 
instantiating
  contained component. Contained component will have to register itself within
  saAmfCompInstantiateTimeout otherwise AMF will generate error report on it.

 -Callback for cleaning up a container component
  (7.10.5 SaAmfContainedComponentCleanupCallbackT page 314):

  typedef void (*SaAmfContainedComponentCleanupCallbackT)(
                 SaInvocationT invocation,
                 const SaNameT *containedCompName
              );
        This callback is sent to a container component to abruptly terminate
  its associated contained component pointed by containedCompName. Container
  component must respond to AMF by calling saAmfResponse_4() API.

**D)Instantiation and termination of a container component:**
  A container component is instantiated, terminated and assigned like a normal
  component of N-WAY Active model. However if AMF cleans up (abruptly 
teriminate)
  a failed container component then it is implied that its associated contained
  components are terminated. AMF will not terminate individual contained 
component
  of a failed container component.(6.3 Failure Handling for Container and 
Contained Components Page 226)

**E)Instantiation, termination and assignment of a contained component**:
  -Instantiation:
   A container CSI name is mentioned as a value of saAmfCompContainerCsi
   in component configuration. When this container CSI get assigned
   to a container component, AMF will send 
SaAmfContainedComponentInstantiateCallbackT
   callback to container component to instantiate contained component. Within 
the configured
   time limit saAmfCompInstantiateTimeout, contained component should be 
registered by
   container component. (7.10.4 SaAmfContainedComponentInstantiateCallbackT 
page 312)
  -Termination:
    For termination AMF invokes SaAmfComponentTerminateCallbackT callback 
function 
   directly on the associated contained component. 
  ( 6.2.3 Life Cycle Callbacks page 225).
  -Clean Up:
        AMF will send SaAmfContainedComponentCleanupCallbackT to a container 
component
   to clean up its associated contained component pointed by containedCompName 
in callback.
  -Assignment in a contained component: Since a contained component is also a 
SA-Aware
   component, callbacks for CSI assignment will be invoked in the context of 
its registered
   process. (7.10.5 SaAmfContainedComponentCleanupCallbackT Page 314)
   
**F)Failure handling and Recovery:**
  -If a container component fails, AMF will clean it up (abrupt terimination) 
and
   it is implied here that the termination of the container component also 
forces
   the termination of all associated contained components. AMF will not 
terminate
   individual contained component of a failed container component.
   (6.3 Failure Handling for Container and Contained Components Page 226)
  -If a contained component fails, its associated container component is
   responsible for reporting an error on it. (6.3 Failure Handling for 
Container and Contained Components Page 226)
  -Recovery of assignments for a container and contained component will be
   according to their redundancy model respectively. However there is some 
recommendation
   for order of recovery:
     Spec recommends that recovery of assignment of contained
    component should be attempted before the recovery of container components in
    fail-over, switch-over and any other such situations.
    (6.3 Failure Handling for Container and Contained Components Page 226)
  -SA_AMF_CONTAINER_RESTART :
   This recommended recovery action can only be requested for a contained
   component in order to restart the associated container. (3.11.2.1 
Recommended Recovery Action page 201)

   AMF will perform following actions if a contained component faults
   with SA_AMF_CONTAINER_RESTART recovery or a container component faults with
   SA_AMF_COMPONENT_RESTART recovery(3.11.1.3.1 Restart Recovery Action):
     -Clean up faulty contained component and its collocated contained
      components.
     -Terminate container component associated with faulty contained component.
     -Instantiate container component and reassign all CSIs including container 
CSI.
     -Instantiate all contained component associated with this container 
component.
     
**G)Admin operations(10 Basic Operational Scenarios Page 399):**
  Admin operation sequence is same when SU/Node/SG contains regular SA-AWARE 
component or
  a contained omponent. It is different when a SU/Node/SG contains an "active" 
container
  component and its associated contained components are up.
  Basic flows of some admin operation in suc a case:
  -Lock of container SU:
      -Since contained SU may belong to any Redundancy model, first assignments 
are removed
       from contained SU as if the lock operation is also issued on contained 
SU.
      -After removal of assignments from contained SU, all comps are terminated 
in contained
       SU.
      -Now assignments will be removed from container SU gracefully via 
quiesced HA state.
  -Lock of container SI:
      -First remove assignments from all those contained SUs where this 
container SI is active.
      -After removal of assignments from contained SUs, all comps are 
terminated in these
       contained SU.
      -Now assignments will be removed from container SU.
  -Shutdown of container SI:
      -First remove assignments from all those contained SUs via quiescing 
state where
       this container SI is active.
      -After removal of assignments from contained SUs, all comps are 
terminated in these
       contained SU.
      -Now assignments will be removed from container SU gracefully via 
quiescing HA state.
  -Restart of container component:
      Here it is assumed that saAmfCompDisableRestart is false.
      -First terminate associated contained component using terminate Callback.
      -Terminate container component using terminate callback.
      -Instantiate container component with INSTANTIATE CLC-CLI script.
      -Reassign container CSI active to container component.
      -Now instantiate contained component by sending 
saAmfContainedComponentInstantiateCallback
       to container component.
      -After successful instantiation of contained component, it will 
reassigned.

**H)Notifications (11 Alarms and Notifications Page 417):**
  AMF generatea notifications for container and contained
  components as it currently generates for any other component.
  
**I)Some important facts from different sections:**
  -A process belonging to a container component can also belong to its 
associated
   contained components.(3.1.2.1.1 Container and Contained Components page 45)
  -A process belonging to a contained component belongs also to its associated
   container component and may also belong to some of its collocated contained
   components.(3.1.2.1.1 Container and Contained Components page 45)
  -The container CSI can contain information to be passed by the associated 
container
   component to the corresponding contained component. How this information is
   passed is a private interface between container and contained components.
   (3.1.3 Component Service Instance page 51)
  -A container component can be configured to have multiple CSI assignments,
   one or more for handling contained components, and others for providing
   other services. In terms of functionality and syntax, there is no difference 
between a
   container CSI used to determine the associated container component and other 
CSIs
   corresponding to the workload of other services.
   (3.1.3 Component Service Instance page 51)




---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to