Cloud-Migration-Tool icon indicating copy to clipboard operation
Cloud-Migration-Tool copied to clipboard

cloudmig fails to run in concurrent, simultaneous threads

Open mattfoxvog opened this issue 9 years ago • 0 comments

Cloudmig will fail to run if run twice, in 2 different bash shells, simultaneously. Only 1 instance will succeed. If i add a slight delay (even .1 seconds) between cloudmig runs, everything works perfectly fine. The problem occurs specifically, when run simultaneously.

I proved this out with the following script & configurations: https://gist.github.com/mlaurie/8d8011aaeaad03a41e6e

If you don't get the error immediately, try running several times. It will error pretty commonly.

There 1 primary error that cloudmig gives:

Unexpected exception: Command 'cloudmig -c /tmp/testConfig1.json' returned non-zero exit status 1
cloudmig:6611:[INFO][Loading Profiles]: Starting...
cloudmig:6611:[INFO][Loading Profiles]: Profiles loaded with success.
cloudmig:6611:[INFO][Loading Status] Starting status loading...
cloudmig:6611:[ERR][Loading Status/Exists] Could not list open status store path(opendir): DPL_ENOENT
cloudmig:6611:[INFO][Creating Status Store]  Status Store not found. Creating...
mkdir: File exists
cloudmig:6611:[ERR][Creating Status Store] Could not create store(directory): DPL_EEXIST

mattfoxvog avatar Oct 06 '15 08:10 mattfoxvog