[
https://issues.apache.org/jira/browse/CLOUDSTACK-10241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16419576#comment-16419576
]
ASF subversion and git services commented on CLOUDSTACK-10241:
--------------------------------------------------------------
Commit 060715e9f5f929804b7f515cfba0b4b130581876 in cloudstack's branch
refs/heads/master from [~rafaelweingartner]
[ https://gitbox.apache.org/repos/asf?p=cloudstack.git;h=060715e ]
[CLOUDSTACK-10241] Duplicated file SRs being created in XenServer pools (#2414)
* [CLOUDSTACK-10241] Duplicated file SRs being created in XenServer pools
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.
The solution to avoid race conditions between management servers is to use a
deterministic srUuid for the file SR to be created (we are leaving XenServer
with the burden of managing race conditions). The UUID is based on the SR file
path and is generated using UUID#nameUUIDFromBytes. Therefore, if there is an
SR with the generated UUID, this means that some other management server has
just created it. An exception will occur and it will contain a message saying
'Db_exn.Uniqueness_constraint_violation'. In these unlikely events, we catch
the exception and use the method retrieveAlreadyConfiguredSrWithoutException to
get the SR that has already been created for the given mount point.
> 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)