You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Related Jira(s)

CPS-1415 - Getting issue details... STATUS

Description

  1. Define scenarios which cause a CM Handle to go stale
  2. Implement changes to support tracking of CM Handle Freshness/Staleness

What might trigger a cmhandle to go to STALE?

  1. dmi plugin identifies that the device is no longer contactable
  2. dmi plugin identifies that an underlying device manager managing the device (node) is out of sync with the device itself. 

Requirements

Functional

#InterfaceRequirementAdditional Information
1CPS-NCMP-I-01A Rest endpoint to allow DMI Plugin Reregistration, A kafka interface for DMI Plugin to provide trust level state changes for a CM HandleReregistration is to reregister all CMHandles managed by a CMHandle. Kafka interface schema allows for CMHandle as id and trust level as only value in data
2DMI-I-01A Rest endpoint to trigger DMI Plugin ReregistrationAsynchronous interaction to trigger DMI Plugin to hit endpoint in CPS-NCMP-I-01 with reregistration

Error Handling

#Error ScenarioExpected behavior
1DMI Plugin goes downCMHandles managed by that DMI have NONE trust level, when the DMI comes back up, a reregistration process occurs, CMHandles are individually assessed for trust level then.
2Node goes downDMI Plugin informs NCMP of the trust level state change. DMI will update on changes to a cmhandles trust level change.

Capabilities

  1. re-registration, once a day, same requirement as first time registration
  2. single node heart beat failures 30,000 / minutes per instances

Scope

  1. Currently only supporting NONE and COMPLETE. PARTIAL and POOR may be added later as below.

Changes to DMI Registry Model

We will not be making changes to the DMI Registry Model, Public Properties of the CMHandle will be used where needed.

Triggers of CMHandle trust level change

DMI Availability

Ping every 30 seconds configurable or (every communication with DMI OOS)

Health check endpoint already exists 

http://'$1'/manage/health/readiness

Hazelcast Map

When DMI comes back up, DMI does audit and provides list of Trustworthy CM Handles

Audit triggered by NCMP with list of CMHandles IDs and for DMI to reregister HTTP

Deltas: DMI handling, properties; Delete all under a DMI? Performance?

DMI AvailabilityTrust Level
AvailableFULL
UnavailableNONE

Device Heart Beat

Assumed functionality is that this will be defined by the DMI Plugin as NCMP does not communicate with device directly

Interface in NCMP for DMI Plugin to be able to tell when device HB has been lost?

10 minute limit should be configurable with 10 as default.

Probably event based

Elapsed time since last DMI Plugin lost Device HBTrust Level
Less than 10 minutesCOMPLETE
Over 10 minutesNONE

DMI-I-01

/health

/v1/ch/trustlevel

{

"Trust":

}

Reregistration

This process occurs when the DMI Plugin Availability is down and then comes back up.
NCMP makes a synchronous call to the DMI Plugin (New Audit Endpoint) to trigger a reregistration
DMI Plugin then reregisters its CMHandles with NCMP (new reregistaration Endpoint?)
NCMP then compares the CMHandles which are being reregistered with the CMHandles which already exist.
CMHandles which are in NCMP but not in DMI reregistration request are kept as trust level none
What happens if there is conflict between the old and new properties of a CMHandle, just take the new properties?
New CMHandles could be registered

Hazelcast for Trust Level

Map Trust level for DMI Plugins
Key: Dmi Name, Values: health check url, trust level

Set Trust level for untrustworthy CMHandles
Key: CmHandleId

When checking the trust level for a CMHandle first check the trust level of that CMHandle's DMI Plugin
If None return None
If Full check trust level for the CMHandle and return that

High Level Interactions

InterfaceNameTriggerDescriptionTypeEndpoint or Topic
1HealthCheck30 second interval (configurable)NCMP is to perform a health check against each of the DMI PluginsREST/health
2Reregistration requestDMI Plugin has gone down and comes back upNCMP makes a call to that DMI Plugin telling it to reregisterRESTTBD
3ReregistrationDMI Plugin received a reregistration requestDMI Plugin makes a call to NCMP to reregister its CM HandlesREST/v1/ch/reregistration
4CMHandle trust level changeA CMHandle managed by DMI Plugin's trust level has changed

data contains {trustLevel: ENUM} 

event id is cmhandle id

KafkaTBD
5TrustLevel RequestClient RequestTrustLevel is to be returned based on the values in above MapsRESTTBD

Managing TrustLevels



  • No labels