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

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

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

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

GitHub user karuturi opened a pull request:

    https://github.com/apache/cloudstack/pull/2007

    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

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/Accelerite/cloudstack CLOUDSTACK-9834

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/2007.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2007
    
----
commit 8a976d27350cec2417b596dba311628de56ed13c
Author: Rajani Karuturi <ra...@accelerite.com>
Date:   2017-03-15T10:29:06Z

    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

----


> 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
>            Assignee: 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)