-
Bug
-
Resolution: Done
-
Medium
-
New Delhi Release
-
None
Description
If there is an ongoing cmHandle upgrade and we send in an other request, we get back 200 response but the second upgrade will be never performed
Another issue is that if we start an upgrade on a non existing cmhandle it results 200 response
Affected version:
CPS NCMP 3.4.6, 3.4.7
Reproduction
Multiple cmhandle upgrades same time
- Register a cmHandle with moduleSetTag A
- Start and upgrade to moduleSetTag B
ncmp_url/ncmpInventory/v1/ch
{ "dmiDataPlugin": "http://dmi-plugin:80", "dmiModelPlugin": "http://model-dmi-plugin:8080", "upgradedCmHandles": { "cmHandles": ["cmHandleId"], "moduleSetTag": "B" }}
- Immediately after first upgrade issued start an other one to moduleSetTag C
ncmp_url/ncmpInventory/v1/ch
{ "dmiDataPlugin": "http://dmi-plugin:80", "dmiModelPlugin": "http://model-dmi-plugin:8080", "upgradedCmHandles": { "cmHandles": ["cmHandleId"], "moduleSetTag": "C" }}
- Result:
- Both request resulted 200 response
- moduleSetTag will be set to B at the end of the upgrade
- modules of version B are returned
Non exiting cmhandle upgrade
- Start and upgrade to moduleSetTag A in case of non existing cmhandle
ncmp_url/ncmpInventory/v1/ch
{ "dmiDataPlugin": "http://dmi-plugin:80", "dmiModelPlugin": "http://model-dmi-plugin:8080", "upgradedCmHandles": { "cmHandles": ["cmHandleId"], "moduleSetTag": "A" }}
- Result:
- request resulted 200 response
Expected behavior
- Give some kind of error if there is an ongoing upgrade, or perform the second upgrade too
- Error on non existing cmhandle upgrade