Details
-
Bug
-
Status: Closed
-
Highest
-
Resolution: Not a Bug
-
Kohn Release
-
None
Description
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:
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:
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
- Install a base version https://gerrit.onap.org/r/gitweb?p=cps.git;a=commit;h=c2c4f5f17441154ded42cbced43bbf8d090b00f4
- Register a cmHandle
- Perform ncmp/v1/ch/searches on the registered cmHandle successful
- Perform a successful get operation on with the registered cmHandle /ncmp/v1/ch/cmhandle_id/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=Something=1
- Upgrade with database migration to https://gerrit.onap.org/r/gitweb?p=cps.git;a=commit;h=a59c24e665e30d5d47341b2c77cb65ae7118d849
- Perform ncmp/v1/ch/searches on the registered cmHandle successful
- 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" } - Downgrade with database migration to https://gerrit.onap.org/r/gitweb?p=cps.git;a=commit;h=c2c4f5f17441154ded42cbced43bbf8d090b00f4
- Perform ncmp/v1/ch/searches on the registered cmHandle successful
- 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