mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Keep retry logic for make directory method which is returning false positive yet times
This commit is contained in:
parent
570f3214b8
commit
ebe0e2bb24
@ -136,6 +136,16 @@ public class DatastoreMO extends BaseMO {
|
|||||||
fullPath = String.format("[%s] %s", datastoreName, path);
|
fullPath = String.format("[%s] %s", datastoreName, path);
|
||||||
|
|
||||||
_context.getService().makeDirectory(morFileManager, fullPath, morDc, true);
|
_context.getService().makeDirectory(morFileManager, fullPath, morDc, true);
|
||||||
|
|
||||||
|
int retry = 2;
|
||||||
|
for (int i = 0; i < retry; i++) {
|
||||||
|
DatastoreFile datastoreFile = new DatastoreFile(fullPath);
|
||||||
|
if (!folderExists(String.format("[%s]", datastoreName), datastoreFile.getFileName())) {
|
||||||
|
_context.getService().makeDirectory(morFileManager, fullPath, morDc, true);
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String getDatastoreRootPath() throws Exception {
|
String getDatastoreRootPath() throws Exception {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user