Related Jira(s)
- CPS-1415Getting issue details... STATUS
Description
- Define scenarios which cause a CM Handle to go stale
- Implement changes to support tracking of CM Handle Freshness/Staleness
What might trigger a cmhandle to go to STALE?
- dmi plugin identifies that the device is no longer contactable
- dmi plugin identifies that an underlying device manager managing the device (node) is out of sync with the device itself.
Requirements
Functional
# | Interface | Requirement | Additional Information |
---|---|---|---|
1 | CPS-NCMP-I-01 | ||
Error Handling
# | Error Scenario | Expected behavior |
---|---|---|
1 |
Capabilities
- re-registration, once a day, same requirement as first time registration
- single node heart beat failures 30,000 / minutes per instances
Scope
- 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 Availability | Trust Level |
---|---|
Available | FULL |
Unavailable | NONE |
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 HB | Trust Level |
---|---|
Less than 10 minutes | COMPLETE |
Over 10 minutes | NONE |
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
Last Data Update
OUT OF SCOPE
Trust Level defined by Client's use of NCMP endpoints to change data related to a CMHandle (passthrough only).
10 minute limit should be configurable with 10 as default.
Stored in public properties
Open Question: External Notifications NCMP is subscribed to should effect this?
| ||
|
| |
Schema Model Mismatch
OUT OF SCOPE
Occurs when data change has been called for a CMHandle and the data change does not fit the defined schema for that CMHandle Anchor (passthrough only).
If this error occurs Trust Level is set to NONE.
Open Questions
Issue | Description | Answer |
---|---|---|
Storing Trust Level | Do we have to store the trust level or can it be calculated when asked? | Storing in a Hazelcast Map |
Interface | What is the interface for getting the trust level going to be | New endpoint |