CLOUDSTACK-9834: prepareTemplate API call doesn't work well

with XenServer & Local SR (Db_exn.Uniqueness_constraint_violation)

removed the host uuid from SR label so that any host which has access to
the SR(all the hosts in the same pool) can reuse the same SR

(cherry picked from commit 1aa6a72bc7)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rajani Karuturi 2017-03-15 15:59:06 +05:30 committed by Rohit Yadav
parent 9ddbd9eda7
commit 9ce2dde030
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ public class Xenserver625StorageProcessor extends XenServerStorageProcessor {
PBD pbd = null;
try {
final String srname = hypervisorResource.getHost().getUuid() + path.trim();
final String srname = path.trim();
synchronized (srname.intern()) {
final Set<SR> srs = SR.getByNameLabel(conn, srname);
if (srs != null && !srs.isEmpty()) {