You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "Rajani Karuturi (JIRA)" <ji...@apache.org> on 2017/03/15 10:09:41 UTC

[jira] [Created] (CLOUDSTACK-9834) prepareTemplate API call doesn't work well with XenServer & Local SR (Db_exn.Uniqueness_constraint_violation)

Rajani Karuturi created CLOUDSTACK-9834:
-------------------------------------------

             Summary: prepareTemplate API call doesn't work well with XenServer & Local SR (Db_exn.Uniqueness_constraint_violation)
                 Key: CLOUDSTACK-9834
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9834
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
            Reporter: Rajani Karuturi


When the xenservers in the same pool create an SR from a share location and do the scan, sr scan fails.
steps to reproduce
on xenserver1 create a SR and do a scan. It is successful 
[root@cl08-11 ~]# mount -o tcp,soft,ro,timeo=133,retrans=1 10.220.128.55:/vol/xenrtnfs/1059631-bPv9c0 /var/cloud_mount/e485eb49-ed8d-3fee-a0f9-c60858c15107/
[root@cl08-11 ~]# xe sr-introduce type=file uuid=2d24f8b7-6e82-43b7-8206-75fef108261b shared=false name-label="test" content-type=file
2d24f8b7-6e82-43b7-8206-75fef108261b
[root@cl08-11 ~]# xe pbd-create sr-uuid=2d24f8b7-6e82-43b7-8206-75fef108261b device-config:location=/var/cloud_mount/e485eb49-ed8d-3fee-a0f9-c60858c15107/template/tmpl/1/5 host-uuid=d3d4eac1-b8f7-492c-b6df-49bb316d93e9
d86b64ef-e7ae-4bd7-3415-087386de3c23
[root@cl08-11 ~]# xe pbd-plug uuid=d8
d824a46b-d47e-acfc-1d7a-420cb08bec51 d86b64ef-e7ae-4bd7-3415-087386de3c23
[root@cl08-11 ~]# xe pbd-plug uuid=d86b64ef-e7ae-4bd7-3415-087386de3c23
[root@cl08-11 ~]# xe sr-scan uuid=2d24f8b7-6e82-43b7-8206-75fef108261b
[root@cl08-11 ~]#
on xenserver2 create an SR for the same nfs location and do a scan. SR scan fails.
[root@cl08-08 ~]# mount -o tcp,soft,ro,timeo=133,retrans=1 10.220.128.55:/vol/xenrtnfs/1059631-bPv9c0 /var/cloud_mount/e485eb49-ed8d-3fee-a0f9-c60858c15107/
[root@cl08-08 ~]# xe sr-introduce type=file uuid=9d511d99-0117-42af-85d6-1d590c1d429f shared=false name-label="test1" content-type=file
9d511d99-0117-42af-85d6-1d590c1d429f
[root@cl08-08 ~]# xe pbd-create sr-uuid=9d511d99-0117-42af-85d6-1d590c1d429f device-config:location=/var/cloud_mount/e485eb49-ed8d-3fee-a0f9-c60858c15107/template/tmpl/1/5 host-uuid=200cb213-ab89-4d6a-82fd-87abbc8aeaf8
e4cc74bc-c977-7bb5-0670-dfe7e377d62e
[root@cl08-08 ~]# xe pbd-plug uuid=e4cc74bc-c977-7bb5-0670-dfe7e377d62e
[root@cl08-08 ~]# xe sr-scan uuid=9d511d99-0117-42af-85d6-1d590c1d429f
Error code: SR_BACKEND_FAILURE_40
Error parameters: , The SR scan failed [opterr=['INTERNAL_ERROR', 'Db_exn.Uniqueness_constraint_violation("VDI", "uuid", "ac743f65-a3aa-3b3a-9886-e67031f40522")']],


Currently CCP creates a host based SR. SR is created for secondary storage on each host separately, this is causing the failure when scanning the SR as same VDI's are present



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)