Hi Edison,

So, I'm looking in CitrixResourceBase at the execute(AttachVolumeCommand)
method.

I think the new logic would go in two places:

right after "if (attach)" and right after the else for "if (attach)".

Let's look at "if (attach)":

At this point in execution, how can I tell if the incoming
AttachVolumeCommand relates to my situation?  For example, I should be able
to query the AttachVolumeCommand instance to see if it is related to a SAN
volume that is zone wide and does not have an SR in the resource pool we
want to use the volume in.  Any idea how I can detect this situation?

In a similar fashion, the else for "if (attach)":

We need a way for me to determine if I'm in my situation, as well.  If it
is my situation (zone-wide primary storage), I probably should delete the
storage repository from the resource pool.  Of course we would not want to
delete the SAN volume unless delete Async is called (because we might end
up reattaching this SAN volume somewhere else later).

Thanks!


On Wed, Apr 17, 2013 at 12:09 AM, Edison Su <edison...@citrix.com> wrote:

>  Creatasync doesn't need to create a storage pool on the hypervisor host,
> as you don't know which hypervisor host want to access the volume yet.
> The volume will be accessed by hypervisor host in attachvolumecmd, you can
> add your code in citrixresource: execute(attachvolumecmd), to create a sr
> from an iscsi lun, and also create a vdi from the sr, then vbd, the attach
> it to vm.
>
> Sent from my Windows Phone
>  ------------------------------
> From: Mike Tutkowski <mike.tutkow...@solidfire.com>
> Sent: 4/16/2013 1:59 PM
> To: Edison Su <edison...@citrix.com>; cloudstack-...@incubator.apache.org
> Subject: createAsync Question
>
>  Hi Edison,
>
>  I have another question regarding our discussion yesterday.
>
>  I'm trying to implement the createAsync method.
>
>  This is my impression for how I should start doing so:
>
>  Create a volume on our SAN.  I believe I can get the specs for this
> volume from the Disk Offering like this:
>
>  DiskOfferingVO offering = diskOfferingDao
> .findById(volume.getDiskOfferingId());
>
>  The next part is a bit hazy.  As we discussed yesterday, let's just deal
> with XenServer for the moment.  :)
>
>  I'm thinking after I create my volume on the SAN, I should create an
> instance of CreateStoragePoolCommand and send it to the hypervisor this way:
>
>  Answer answer = storageMgr.sendToPool(pool, null, cmd);
>
>  The type of the storage pool I would place in the
> CreateStoragePoolCommand instance is StoragePoolType.IscsiLUN.
>
>  This would create a storage repository for me on the hypervisor.
>
>  I would then need to create an instance of CreateCommand and send it to
> the hypervisor the same way to create a volume on the storage repository I
> just created:
>
>  Answer answer = storageMgr.sendToPool(pool, null, cmd);
>
>  This volume on the storage repository would consume the entire SR.
>
>  Am I making decent sense here?
>
>  Thanks!
>
>  --
> *Mike Tutkowski*
> *Senior CloudStack Developer, SolidFire Inc.*
> e: mike.tutkow...@solidfire.com
> o: 303.746.7302
> Advancing the way the world uses the 
> cloud<http://solidfire.com/solution/overview/?video=play>
> *™*
>



-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkow...@solidfire.com
o: 303.746.7302
Advancing the way the world uses the
cloud<http://solidfire.com/solution/overview/?video=play>
*™*

Reply via email to