When VMDK plugin is being restarted (e.g. due to VM restart), the background refcnt thread needs some time to initialize. During the initialization process, the plugin might get incoming mount/unmount/remove volume requests. These operations will need to get the ref counts of the volume. In this case , the current logic will return a hard-coded value 1, indicating the refcnt is still in initialization process. This caused very confusing error message being returned to the caller. For example, after verifying the volume status is detached, removing this volume still failed with error message: "Remove failure - volume is still mounted", which is very confusing and misleading.
As we discussed, we should be using a special value, such as -1, to indicate this special status when refcount is still initializing. Using 1 will make it confusing with the normal scenario where the volume is truly being referenced by one container.
We need to fix all 3 functions - vmdk.getRefCount(), vmdk.incrRefCount() and vmdk.decrRefCount() - to return this special value, and fixing the calling APIs accordingly to check this special value and handle the logic appropriately.
This issue has caused vmlistener test case fails intermittently - see issue #1308
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4