-
Notifications
You must be signed in to change notification settings - Fork 95
[Multi-ESX] DB connection issue while invoking "vmdkops_admin volume ls" observed only on one ESX #1144
Comments
I suspect we hit the moment when VMFS on ESX2 was locking the sqlite file, thus preventing VMFS on ESX1 from opening it. Great catch! I am concerned that could actually be a problem for vmdk_ops.py , so the docker ops may fail. |
@shuklanirdesh82, is it possible to share the VMDK on two different docker hosts? |
I think these parts were incidental. The issue is with file open, and it is opened only during docker command, not while container is already running |
Yeah, it is not possible in an absence of multi-writer scenario; step#5 does mention about the expected behavior i.e. exception/error should be shown. An error is observed only on one of the ESX but not. |
Yeah it seems to me too. |
Steps:
Steps and their output are as follows: From ESX-1:
From ESX-2:
|
Per offline discussion, currently we will not really address the DB file concurrent access issue. For now we will simply return a user-friendly error message instead of the sqlite error. |
I also suggest adding some log error explaining potential reason, and suggestion to retry |
@msterin I was thinking to add some more messages, such as suggestion to retry. However, considering that the current concurrency issue is actually a rare case comparing to other common DB failures (such as DB corruption, file not exists, etc.). So adding this message might cause confusion in other error scenarios. So I think we may just keep it as is for now (please see the error message I have pasted in the PR). In the future I think we should improve our DB access module to support more advanced features, such as concurrent access, by introducing connection pool, appropriate read-write lock, etc. |
Setup: VM1 on ESX1 and VM2 on ESX2 > both docker hosts are in the same tenant
Steps to reproduce
While invoking
vmdkops_admin.py volume ls
during step#4, running into following issue on ESX1 where as ESX2 is not complaining and showing the output correctly.Note: I haven't found any interesting thing in vmdk_ops.log so not uploading. (logs will be uploaded upon ask)
on ESX1:
on ESX2
/CC @msterin @lipingxue
The text was updated successfully, but these errors were encountered: