OS : Suse 64bit
Changeset : 5.2 GA
Setup : 4 nodes
Summary: IMM: SearchNext returning BAD_HANDLE when ERR_NOT_EXISTS is expected while searching for runtime object
Steps to Reproduce
1. Create a runtime object
2. Do Search Initiliaze()
3. Delete the object created in Step1
4. Do SearchNext()
5. Do SearchNext() again
Observed Bahavior:
Step4 returning SA_AIS_ERR_TIMEOUT
Step5 is returning SA_AIS_ERR_BAD_HANDLE (SA_AIS_ERR_NOT_EXIST is expected)
Agent traces and immnd traces attached for controller and payload
In omSearchNext, ERR_NOT_EXIST means that the search has come to the end, and that there is no more results to fetch. So, ERR_NOT_EXIST cannot be returned in this case at all.
If after omSearchInitialize call, the search result is altered, it means that the search result is corrupted, and that that search result is not the same as the search result from omSearchInitialize.
According to SAF spec and allowed return errors for omSearchNext, ERR_BAD_HANDLE is the most suitable error code in this case.