Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Automation Composition Management manages a number of states of various types to manage the lifecycle of compositions. Those states are described here. Please also see the ACM System Level Dialogues page to see the system dialogues that change states and how states interrelate in detail. Please also see ITU Recommendation X.731, which is reflected in the states of AC Element Instances.

Participant State

ACParticipant states are NOT managed by ACM but the state of a participant is recorded and supervised by ACM.


PlantUML Macro
@startuml

[*] --> ONLINE: Register
ONLINE --> ONLINE: Heartbeat
ONLINE --> OFFLINE: Timeout
OFFLINE --> ONLINE: Heartbeat
ONLINE --> [*]: Deregister
OFFLINE --> [*]: Deregister

@enduml

Automation Composition Type State

The states that an Automation Composition Type can have are shown in the diagram below.


PlantUML Macro
@startuml

[*] --> COMMISSIONED: Commission
COMMISSIONED --> [*]: Decommission
COMMISSIONED --> PRIMING: Prime
PRIMED --> PRIMING: Prime
PRIMING --> PRIMED: AC Element Types\nall PRIMED
PRIMING --> DEPRIMING: Deprime
PRIMED --> DEPRIMING: Deprime
DEPRIMING --> COMMISSIONED: AC Element Types\nall DEPRIMED

@enduml


Automation Composition Element Type State

The states that an Automation Composition Element Type can have on ACM Runtime are shown in the diagram below.


PlantUML Macro
@startuml

[*] --> COMMISSIONED: Commission
COMMISSIONED --> [*]: Decommission
COMMISSIONED --> PRIMING: Prime
PRIMED --> PRIMING: Prime
PRIMING --> PRIMED: AC Element Type Primed\nresponse from Participant
PRIMING --> DEPRIMING: Deprime
PRIMED --> DEPRIMING: Deprime
DEPRIMING --> COMMISSIONED: AC Element Type Deprimed\nresponse from Participant

@enduml


The states that an Automation Composition Element Type can have on a Participant are shown in the diagram below.

PlantUML Macro
@startuml

[*] --> PRIMED: Prime from\nACM Runtime
PRIMED --> PRIMED: Prime from ACM Runtime
PRIMED --> [*]: Deprime from\nACM Runtime

@enduml

Automation Composition Instance State

The states that an Automation Composition Instance can have are shown in the diagram below.


PlantUML Macro
@startuml

The current ACM state machine works but it is incosistent in the way it handles error states or failed transitions. A composition and its elements can get "stuck" in transition states.

We need to

  • Specify what the current state machine is for both compositions and elements and describe what the state machine for both should be
  • Specify what the behaviour of the runtime and participants should be in each state
  • Specify what the behaviour should be for the runtime and participants should be in transitions

Specifically we need to clarify:

  • State of the composition elements
  • State of the overall composition is derived from the composition element states
  • Admin state/Running state
  • When all the elements are fully up and configured, the go to state Passive, when all elements are in Passive, the full composition goes to Passive
  • Error states: Are they parallel sates or part of the same state?
  • There should “it didn’t work” states like “Passive-Error” or “Run_Error” (names to be decided later)
  • Describe what the “Running” state means and what the participant should do in Passive->Running and Running->Passive transitions.
  • Say a K8S service crashes, how do we feed that back? Running_Error. The state of the POD is only checked during startup. It is not periodically checked. There should be supervision.

State Machine for Automation Compositions

Current State Machine

  • ACM in UNINITIALIZED state: all elements of a ACM are in UNINITIALIZED state, all applications are not deployed and policy types are not deployed and not present in Api.
  • User triggers to move ACM from UNINITIALIZED to PASSIVE: runtime-acm moves elements from UNINITIALIZED state to UNINITIALIZED_TO_PASSIVE.
  • Element in UNINITIALIZED_TO_PASSIVE:
    • participant-ks8: deploys applications
    • participant-policy: creates policy types in Api and deploys them with Pap.
    • participant-http: configures applications.
  • Element in PASSIVE state:
    • participant-ks8: applications are deployed.
    • participant-policy: policy types are create in Api and deployed with Pap.
    • participant-http: applications are configured.
  • ACM in PASSIVE state: all elements are moved to PASSIVE, all applications are deployed and configured.
  • User triggers to move ACM from PASSIVE to UNINITIALIZED: runtime-acm moves elements from PASSIVE state to PASSIVE_TO_UNINITIALIZED.
  • Element in UNINITIALIZED_TO_PASSIVE:
    • participant-ks8: undeploys applications
    • participant-policy: undeploys policy types with Pap and deletes them in Api.
  • Element in UNINITIALIZED state:
    • participant-ks8: applications are undeployed.
    • participant-policy: policy types are not deployed and not present in Api.
PlantUML Macro
@startuml
'https://plantuml.com/state-diagram

state UNINITIALIZED

state UNINITIALIZED_TO_PASSIVE

state PASSIVE_TO_UNINITIALIZED

state PASSIVE



[*] --> UNINITIALIZED

UNINITIALIZED --> UNINITIALIZED_TO_PASSIVE

PASSIVE_TO_UNINITIALIZED --> UNINITIALIZED

PASSIVE --> PASSIVE_TO_UNINITIALIZED

UNINITIALIZED_TO_PASSIVE --> PASSIVE

@enduml

Proposed State Machine

PlantUML Macro
@startuml
'https://plantuml.com/state-diagram

state UNINITIALIZED

state UNINITIALIZED_TO_PASSIVE

state PASSIVE_TO_UNINITIALIZED

state PASSIVE

state PASSIVE_TO_RUNNING

state RUNNING_TO_PASSIVE

state RUNNING

state RUNNING_TO_PASSIVE_ERROR

state PASSIVE_TO_RUNNING_ERROR

state RUNNING

state RUN_ERROR



[*] --> UNINITIALIZED

UNINITIALIZED --> UNINITIALIZED_TO_PASSIVE

PASSIVE_TO_UNINITIALIZED --> UNINITIALIZED

UNINITIALIZED_TO_PASSIVE --> PASSIVE

PASSIVE --> PASSIVE_TO_RUNNING

PASSIVE --> PASSIVE_TO_UNINITIALIZED

PASSIVE_TO_RUNNING --> RUNNING

PASSIVE_TO_RUNNING --> PASSIVE_TO_RUNNING_ERROR

PASSIVE_TO_RUNNING_ERROR --> PASSIVE_TO_RUNNING

RUNNING --> RUNNING_TO_PASSIVE

RUNNING_TO_PASSIVE --> PASSIVE

RUNNING_TO_PASSIVE --> RUNNING_TO_PASSIVE_ERROR

RUNNING --> RUN_ERROR

RUN_ERROR --> RUNNING

RUN_ERROR --> RUNNING_TO_PASSIVE

RUNNING_TO_PASSIVE_ERROR --> RUNNING_TO_PASSIVE

@enduml

State Machine for Automation Composition Elements

Current State Machine

TBC

Proposed State Machine

PlantUML Macro
@startuml
'https://plantuml.com/state-diagram

state UNINITIALIZED

state UNINITIALIZED_TO_PASSIVE

state PASSIVE_TO_UNINITIALIZED

state PASSIVE

state PASSIVE_TO_RUNNING

state RUNNING_TO_PASSIVE

state RUNNING

state RUNNING_TO_PASSIVE_ERROR

state PASSIVE_TO_RUNNING_ERROR

state RUNNING

state RUN_ERROR



[*] --> UNINITIALIZED

UNINITIALIZEDUNDEPLOYED: Create
UNDEPLOYED --> UNINITIALIZED_TO_PASSIVE

PASSIVE_TO_UNINITIALIZED[*]: Delete
UNDEPLOYED --> UNINITIALIZED

UNINITIALIZED_TO_PASSIVEDEPLOYING: Deploy
DEPLOYING --> PASSIVE

PASSIVEDEPLOYED: AC Element Instances\nall DEPLOYED
DEPLOYING --> PASSIVE_TO_RUNNING

PASSIVEUNDEPLOYING: Undeploy
DEPLOYED --> PASSIVE_TO_UNINITIALIZED

PASSIVE_TO_RUNNING UNDEPLOYING: Undeploy
UNDEPLOYING --> RUNNING

PASSIVE_TO_RUNNING --> PASSIVE_TO_RUNNING_ERROR

PASSIVE_TO_RUNNING_ERROR UNDEPLOYED: AC Element Instances\nall UNDEPLOYED


state DEPLOYED {
 [*] --> PASSIVE_TO_RUNNING

RUNNINGLOCKED: Deploy
 LOCKED --> RUNNING_TO_PASSIVE

RUNNING_TO_PASSIVE [*]: Undeploy
 LOCKED --> UNLOCKING: PASSIVE

RUNNING_TO_PASSIVEUnlock
 UNLOCKING --> RUNNING_TO_PASSIVE_ERROR

RUNNINGUNLOCKED: AC Element Instances\nall UNLOCKED
 UNLOCKED --> RUN_ERROR

RUN_ERRORLOCKING: Lock
 UNLOCKING --> RUNNING

RUN_ERRORLOCKING: Lock
 LOCKING --> RUNNING_TO_PASSIVE

RUNNING_TO_PASSIVE_ERROR --> RUNNING_TO_PASSIVE LOCKED: AC Element Instances\nall LOCKED
}

@enduml

...

Automation Composition Element Instance State

...

  • ACM in UNINITIALIZED state: all elements of a ACM are in UNINITIALIZED state, all applications are not deployed and policy types are not deployed and not present in Api.
  • User triggers to move ACM from UNINITIALIZED to RUNNING: all elements of a ACM are in UNINITIALIZED_TO_PASSIVE, all applications are getting deployed and policy types are getting created in Api and deployed with Pap.
  • ACM in UNINITIALIZED_TO_PASSIVE_ERROR state: got error during deploy.
  • Element in PASSIVE state: application is deployed or a policy type is create in Api and deployed with Pap.
  • ACM in PASSIVE state: applications are deployed, but not configured yet. In this state, runtime-ACM triggers elements in state PASSIVE_TO_RUNNING.
  • Element in PASSIVE_TO_RUNNING: applications are getting configured.
  • ACM in PASSIVE_TO_RUNNING_ERROR state:  error during configuration.
  • ACM in RUNNING state: all elements of a ACM are in RUNNING state, all applications are running.

The states that an Automation Composition Element Instance can have on ACM Runtime are shown in the diagram below.


PlantUML Macro
@startuml

[*] --> UNDEPLOYED: Create
UNDEPLOYED --> [*]: Delete
UNDEPLOYED --> DEPLOYING: Deploy
DEPLOYING --> DEPLOYED: AC Element\nInstance DEPLOYED
DEPLOYING --> UNDEPLOYING: Undeploy
DEPLOYED --> UNDEPLOYING: Undeploy
UNDEPLOYING --> UNDEPLOYED: AC Element\nInstance UNDEPLOYED


state DEPLOYED {
 
PlantUML Macro
@startuml
'https://plantuml.com/state-diagram

state UNINITIALIZED

state UNINITIALIZED_TO_PASSIVE

state PASSIVE_TO_UNINITIALIZED

state PASSIVE

state UNINITIALIZED_TO_PASSIVE_ERROR

state PASSIVE_TO_UNINITIALIZED_ERROR

state PASSIVE_TO_RUNNING

state RUNNING_TO_PASSIVE

state RUNNING

state RUNNING_TO_PASSIVE_ERROR

state PASSIVE_TO_RUNNING_ERROR

state RUNNING

state RUN_ERROR



[*] --> UNINITIALIZED

UNINITIALIZEDLOCKED: Deploy
 LOCKED --> UNINITIALIZED_TO_PASSIVE

PASSIVE_TO_UNINITIALIZED[*]: Undeploy
 LOCKED --> UNINITIALIZED

PASSIVE_TO_UNINITIALIZEDUNLOCKING: Unlock
 UNLOCKING --> PASSIVE_TO_UNINITIALIZED_ERROR

PASSIVE_TO_UNINITIALIZED_ERRORUNLOCKED: AC Element\nInstance UNLOCKED
 UNLOCKED --> PASSIVE_TO_UNINITIALIZED 

UNINITIALIZED_TO_PASSIVELOCKING: Lock
 UNLOCKING --> PASSIVE

UNINITIALIZED_TO_PASSIVELOCKING: Lock
 LOCKING --> UNINITIALIZED_TO_PASSIVE_ERROR

UNINITIALIZED_TO_PASSIVE_ERRORLOCKED: AC Element\nInstance LOCKED
}

@enduml


The states that an Automation Composition Element Instance can have on a Participant are shown in the diagram below.


PlantUML Macro
@startuml

[*] --> UNINITIALIZED_TO_PASSIVE

PASSIVEDEPLOYING: Deploy
DEPLOYING --> PASSIVE_TO_RUNNING

PASSIVE DEPLOYED: AC Element\nInstance DEPLOYED\nRespond with\nAC Element State Update
DEPLOYING --> PASSIVE_TO_UNINITIALIZED

PASSIVE_TO_RUNNING UNDEPLOYING: Undeploy
DEPLOYING --> RUNNING

PASSIVE_TO_RUNNING [*]: Deploy Failed\nRespond with\nAC Element State Update
DEPLOYED --> PASSIVE_TO_RUNNING_ERROR

PASSIVE_TO_RUNNING_ERRORUNDEPLOYING: Undeploy
UNDEPLOYING --> PASSIVE_TO_RUNNING

RUNNING [*]: Undeployed\nRespond with\nAC Element State Update

state DEPLOYED {
 [*] --> RUNNING_TO_PASSIVE

RUNNING_TO_PASSIVELOCKED
 LOCKED --> PASSIVE

RUNNING_TO_PASSIVE[*]
 LOCKED --> RUNNING_TO_PASSIVE_ERROR

RUNNING UNLOCKING: Unlock
 UNLOCKING --> RUN_ERROR

RUN_ERROR UNLOCKED: AC Element\nInstance UNLOCKED
 UNLOCKED --> RUNNING

RUN_ERRORLOCKING: Lock
 UNLOCKING --> RUNNING_TO_PASSIVE

RUNNING_TO_PASSIVE_ERRORLOCKING: Lock
 LOCKING --> RUNNING_TO_PASSIVELOCKED: AC Element\nInstance LOCKED
}

@enduml