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

Compare with Current View Page History

« Previous Version 26 Next »

CPS-1733 - Getting issue details... STATUS

CPS-1734 - Getting issue details... STATUS

Study is required to clearly define the scope and impacts of updating YANG model schema sets for cm-handles. 

Requirements

Functional

#InterfaceRequirementAdditional InformationSign Off
1CPS-NCMP-I-01

Upgrade module set for CM-Handle(s) using a moduleSetTag

Module Set Tag is owned (defined) by DMI Plugin
Known module set tags should prevent 'trips' to DMI for Module information
All data stores are accepted

2CPS-NCMP-I-01Initial Inventory  shall support (Optional) moduleSetTag too

Exiting performance shall not degrade.


3CPS-NCMP-I-01Update module set for CM-Handle(s) using a Blank moduleSetTaguse 'old' algorithm from initial inventory
4CPS-E-05Read  moduleSetTag for given CM Handle(id)Probably no code changes required (just a model change)
5CPS-E-05Query Cm Handle(s) using CPS Path with moduleSetTagProbably no code changes required (just a model change)

Error Handling

#Error ScenarioExpected behavior
1Missing CM Handles (in list, some are OK)
2Upgrade request for 'cached' data (cache enabled)Refuse request, not support

Characteristics


#ParameterExpectationNotes
1Request Frequency
Upgrade to NEW ModuleSetTags
3 upgrades  / second → 180 upgrades / minute

The assumption is there are 100 modules in each moduleSet and a moduleSet is available from a dmi plugin within 0.5 seconds.  Also assume there is a 90% overlap in modules across all CM Handles.

2Request Frequency
Upgrade to already existing ModuleSetTags
6 upgrades  / second → 360 upgrades / minute
3Test Environment
  1. CPS and NCMP

requests:
    cpu: 2000m
    memory: 2Gi
limits:
    memory: 3Gi
    cpu: 3000m

2. Postgres

requests:
    cpu: 4000m
    memory: 1Gi
 limits:
    memory: 3Gi
    cpu: 6000m


4Concurrent request12 clients requests toward 1 NCMP simultaneously
5Number of CM Handles in one request





Out-of-scope

  • Upgrade of models for cached data. "ncmp-datastore:operational" is out-of-scope.  

 Note: Only pass-through i.e. non-cached data upgrade is in scope; "ncmp-datastore:passthrough-running" and "ncmp-datastore:passthrough-operational" is in scope.


Assumptions

#AssumptionNotes
1

Client will be informed of upgrade by 'state-change' notifications


Issues & Decisions

#IssueNotes Decision
1Type of Interface REST or KafkaREST
  1. easier/cheaper
  2. possibly (complete) re-use of (inventory) existing interface
  3. well documented by OpenAPI
  4. support test stubs (contract testing)

Kafka

  1. more complicated/costly
  2. plethora of topics and messages, not well documented (no standard)
  3. More robust (request persisted until acknowledged)

meeting Agreed to use REST interface.  

2moduleSetTag based on Hash no (yet) implemented!

This study seems to assume the module set tag is already implemented but it isn't!


[kieran mccarthy]:  the request it to introduce the module set tag/identifier of some kind for this new upgrade usecase.  Not assuming it is there already.  Will be costlier but is important for performance to avoid pulling models if they are already known to NCMP.
3Expected Responses

when and what content?

  1. just acknowledge upon receipt
  2. response on completion

Should follow error handling for Inventory

202 Accepted if there are no issues with the payload
     - request payload is well formed 
     - all cmhandles are valid

404 Not Found Reject the request if an unknown cmhandle is sent in TBD partial correct cm hanldes

4Should CM-Handle state change (e.g. to 'locked')  'during' upgrade?Yes but is important to not be locked for long which makes it important to use the moduleSetTag

kieran mccarthy    Should be set to LOCKED until the new moduleSet is associated with the cmhandle.  I think there is a LOCKED_UPGRADING if I remember right.  Lock reason should state "upgrade initiated at time xxx for new moduleSetTag xyz".  When lock is being removed any lockReason message should be cleared. 
See CPS-799 Spike: Define states and state handling for CM handle

5moduleSetTag is Optional (owned and defined by DMI Plugin)Support for upgrade without continues using delete/add cm handle approach.
If the update includes an moduleSetTag it would be considered an upgrade

meeting Agreed to use REST interface with "upgradedCmHandles". 

6moduleSetTag should be able to be used during initial inventory too!Initial Inventory should be sped up too (capability requirements impacts ?!)
Note.  Current inventory 'createdCmHandles' only supports a list of cm handle Ids can this be in backward compatible way be modified to optionally include a ModuleSetTag

7Exact name moduleSetTag

meeting agreed on moduleSetTag

8How to store: hardcoded (postgress schema), inventory yang model or as additional property (private or public)? update Inventory Yang Model so it can be queried (without code changes!) like other aspect such as 'state'

meeting agreed to update Yang Model  

9additional operation for inventory Interface: 'upgradedCmHandles'
The interface currently supports
  1. createdCmHandles
  2. updatedCmHandles
  3. removedCmHandles

it possibly could be done as part of 'updatedCmHandles' and look for /recognize the moduleSetTag update but this would be messy and confusing, also then theoretically properties could be updated as the same time as the module set..


meeting agreed 


10Clarify capabilities
  • Expected Response/process times
  • 'batch' size
  • concurrent request combined with request frequency i.e 12 * 25 request per second?!

11Separate Notification on change of ModuleSetTag
  • There will already LCM notification, maybe that is enough?


Solution Proposals 

Toine Siebelink Can you alternative proposals be maintained (kafka) so we know they were considered and reviewed and ruled out.  Be good to see what was reviewed/considered.

Update Inventory REST Interface

Making the module upgrade request either over REST or Kafka Event with a supplied 'moduleSetTag' property will indicate to NCMP that a cmhandle has a new moduleSet (node has been upgraded).  The moduleSetTag is a unique identifier for the set of modules associated with a cmhandle. This event or rest request will trigger ncmp to either retrieve the new module set for this cmhandle from the dmi plugin or if NCMP is already aware of moduleSetTag as part of a previous retrieval for a set of modules for a cmhandle that supplied this moduleSetTag then it should not re-retrieve the modules from the dmi plugin as it already has them.  NCMP should use its stored moduleSetTag to get the set of modules.  It can then do a delta with the existing cmhandle moduleSet and update the moduleSet for the cmhandle.

The above proposal would require model updates to NCMP to store the association between a moduleSetTag supplied by a dmi-plugin (during and updateCmHandles request) and the modules.  Initially moduleSetTag is not known to NCMP.  However, after retrieval of the modules for the first time for the cmhandle, NCMP can store the association.  Any subsequent cmhandle that references the same moduleSetTag will not require NCMP to go back to the dmi plugin for the moduleSet.

Reuse the NCMP Inventory API (CPS-NCMP-I-01). URI : POST /v1/ch

URI: POST /v1/ch requestbody
{
    upgradedCmHandles : [      
      {
         "cmhandle" : "<cmhandle-id-1>",
         "moduleSetTag" : "ffsdfg55342"   #  new moduleSetTag ffsdfg55342 for the cmhandle        },       
      {
         "cmhandle" : "<cmhandle-id-2>",
         "moduleSetTag" : "ffsdfg55342"   #  new moduleSetTag ffsdfg55342 for the cmhandle        },     
      { 
         "cmhandle" : "<cmhandle-id-3>",    
         "moduleSetTag" : "ddger34324"    #  new moduleSetTag ddger34324 for the cmhandle         }
  ]
}

Support for upgrade without (empty) moduleSetTag

If the moduleSetTag json property is set to "" (empty string) or then it should also indicate that the moduleSet for a cmhandle has been updated but there is no associated moduleSetTag available for that cmhandle.  This approach will always result is a full request to the dmi plugin for the module set for the cmhandle.


Suggested User Stories

  1. Define (in Open API )and agree inventory interface (changes)  for 'upgradedCmHandles'
  2. Update Inventory Model to store 'ModuleSetTag' (Liquibase set incl rollback) 
  3. Implement upgrade
  4. (Check) Locking/notifications state handling (some modifications might be needed)
  5. Implement/test error scenarios
  6. Test & Document performance
  7. Implement ModuleSetTag for Initial Inventory

Proposed JIRAs

PriorityComponent DescriptionJIRAEstimates
1NCMPExpose REST endpoint to upgrade YANG schema set using moduleSet Tag

CPS-1798 - Getting issue details... STATUS


2NCMPUpdate inventory YANG model to store moduleSetTag

CPS-1804 - Getting issue details... STATUS


3NCMPHandle expected response code for upgrading YANG schema-set

CPS-1800 - Getting issue details... STATUS


4NCMPUpdate cmhandle state (lock) during YANG model upgrade

CPS-1801 - Getting issue details... STATUS


5NCMPModify inventory using moduleSetTag as optional attribute

CPS-1803 - Getting issue details... STATUS


6NCMPIdentify and test error scenarios 

CPS-1802 - Getting issue details... STATUS


7NCMPUpdate DMI Stub  for testing purposes and add CSIT test 

CPS-1806 - Getting issue details... STATUS


8NCMPTest and document performance of updating YANG schema set API.

CPS-1805 - Getting issue details... STATUS


  • No labels