Uploaded image for project: 'Configuration Persistence Service'
  1. Configuration Persistence Service
  2. CPS-1307

NCMP CRUD operations do not work after upgrade/downgrade

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Highest Highest
    • Kohn Release
    • Kohn Release
    • NCMP
    • None

      Current behavior

      Usecase 1

      NCMP CRUD (Create, Read, Update, Delete towards dmi plugin) operation requests do not work after upgrading to latest CPS master if there were registered cmHandles in the database before
      I got the following error, it seems that the database migration does not handle if there were cmHandles in the database before, and does not add status to those cmHandles:

      {     "status": "500 INTERNAL_SERVER_ERROR",     "message": "State mismatch exception.",     "details": "Cm-Handle not in READY state. cm handle state is null" }

       

      Usecase 2

      NCMP CRUD operation requests do not work after downgrading to previously working version
      After the downgrade I got the following error, so something happened with the database migration during downgrade:

      {     "status": "500 INTERNAL_SERVER_ERROR",     "message": "could not extract ResultSet",     "details": "Check logs for details." }

       

      Base version:
      https://gerrit.onap.org/r/gitweb?p=cps.git;a=commit;h=c2c4f5f17441154ded42cbced43bbf8d090b00f4

      Upgrade version
      https://gerrit.onap.org/r/gitweb?p=cps.git;a=commit;h=a59c24e665e30d5d47341b2c77cb65ae7118d849

      Expected behavior

      NCMP CRUD operations should work for the following scenarios:
      register cmHandle on base > searches successful > CRUD request successful > Upgrade to latest version > searches successful > CRUD request successful >  downgrade to previous version  > searches successful > CRUD request successful

       

      Reproduction

      1. Install a base version  https://gerrit.onap.org/r/gitweb?p=cps.git;a=commit;h=c2c4f5f17441154ded42cbced43bbf8d090b00f4
      2. Register a cmHandle
      3. Perform ncmp/v1/ch/searches on the registered cmHandle successful
      4. Perform a successful get operation on with the registered cmHandle /ncmp/v1/ch/cmhandle_id/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=Something=1
      5. Upgrade with database migration to https://gerrit.onap.org/r/gitweb?p=cps.git;a=commit;h=a59c24e665e30d5d47341b2c77cb65ae7118d849
      6. Perform ncmp/v1/ch/searches on the registered cmHandle successful
      7. Perform a failing get operation on with the registered cmHandle /ncmp/v1/ch/cmhandle_id/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=Something=1
                {         "status": "500 INTERNAL_SERVER_ERROR",         "message": "State mismatch exception.",         "details": "Cm-Handle not in READY state. cm handle state is null"         }
      8. Downgrade with database migration to https://gerrit.onap.org/r/gitweb?p=cps.git;a=commit;h=c2c4f5f17441154ded42cbced43bbf8d090b00f4
      9. Perform ncmp/v1/ch/searches on the registered cmHandle successful
      10. Perform a failing get operation on with the registered cmHandle /ncmp/v1/ch/cmhandle_id/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=Something=1
            {         "status": "500 INTERNAL_SERVER_ERROR",         "message": "could not extract ResultSet",         "details": "Check logs for details."     }
         

      Logs:

      Failure after upgrade is really talkative without logs too.
      Logs about the failure after downgrade. eric-oss-ncmp-9bd9c84fc-xlnnv.log
       

      Workaround

      It works with clean install if there are no registered cmHandles

       

      CPS version

      Base version:
      https://gerrit.onap.org/r/gitweb?p=cps.git;a=commit;h=c2c4f5f17441154ded42cbced43bbf8d090b00f4

      Upgrade version
      https://gerrit.onap.org/r/gitweb?p=cps.git;a=commit;h=a59c24e665e30d5d47341b2c77cb65ae7118d849

            sourabh_sourabh Sourabh Sourabh
            csaba.eder csaba Eder
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: