[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16397503#comment-16397503
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10241:
---------------------------------------------

rafaelweingartner commented on a change in pull request #2414: 
[CLOUDSTACK-10241] Duplicated file SRs being created in XenServer pools
URL: https://github.com/apache/cloudstack/pull/2414#discussion_r174255133
 
 

 ##########
 File path: 
plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/Xenserver625StorageProcessor.java
 ##########
 @@ -65,90 +69,181 @@ public Xenserver625StorageProcessor(final 
CitrixResourceBase resource) {
         super(resource);
     }
 
-    protected boolean mountNfs(final Connection conn, final String remoteDir, 
String localDir) {
+    private void mountNfs(Connection conn, String remoteDir, String localDir) {
         if (localDir == null) {
             localDir = "/var/cloud_mount/" + 
UUID.nameUUIDFromBytes(remoteDir.getBytes());
         }
-
-        final String results = hypervisorResource.callHostPluginAsync(conn, 
"cloud-plugin-storage", "mountNfsSecondaryStorage", 100 * 1000, "localDir", 
localDir, "remoteDir",
-                remoteDir);
-
-        if (results == null || results.isEmpty()) {
+        String result = hypervisorResource.callHostPluginAsync(conn, 
"cloud-plugin-storage", "mountNfsSecondaryStorage", 100 * 1000, "localDir", 
localDir, "remoteDir", remoteDir);
+        if (StringUtils.isBlank(result)) {
             final String errMsg = "Could not mount secondary storage " + 
remoteDir + " on host " + localDir;
-
             s_logger.warn(errMsg);
-
             throw new CloudRuntimeException(errMsg);
         }
-
-        return true;
     }
 
-    protected boolean makeDirectory(final Connection conn, final String path) {
-        final String result = hypervisorResource.callHostPlugin(conn, 
"cloud-plugin-storage", "makeDirectory", "path", path);
+    protected boolean makeDirectory(Connection conn, String path) {
 
 Review comment:
   Because it is useless in this context.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Duplicated file SRs being created in XenServer pools
> ----------------------------------------------------
>
>                 Key: CLOUDSTACK-10241
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10241
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>            Reporter: Rafael Weingärtner
>            Assignee: Rafael Weingärtner
>            Priority: Major
>
> Due to a race condition between multiple management servers, in some rare 
> cases, CloudStack is creating multiple file SRs to the same secondary folder. 
> This causes a problem when introducing the SR to the XenServer pools, as 
> “there will be VDIs with duplicated UUIDs“. The VDIs are the same, but they 
> are seen in different SRs, and therefore cause an error.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to