There are couple of things that remain unclear to me.
What permission check it would make sense to do when updating sizes of direct LUNs?
At seems that the only thing, besides LUN Guids, needed to execute
VDSCommandType.GetDeviceList is storage pool id (to get all VDS and pass them as an
argument).
So it would make sense to return something like this in getPermissionCheckSubjects:
new PermissionSubject(getStoragePoolId(), VdcObjectType.StoragePool,
getActionType().getActionGroup()));
But it's unclear what storage pool we should pick. Direct LUNs don't seems to have
much info associated with them, there is only storageDomainId we can retrieve by lunDao
and then get related storagePoolIds I guess.
Is this the right way?
Thanks,
Fedor Gavrilov
----- Original Message -----
From: "Nir Soffer" <nsoffer(a)redhat.com>
To: "Fedor Gavrilov" <fgavrilo(a)redhat.com>
Cc: "devel" <devel(a)ovirt.org>, "Fred Rolland"
<frolland(a)redhat.com>
Sent: Tuesday, June 11, 2019 11:08:36 AM
Subject: Re: [ovirt-devel] GetDeviceList and direct LUNs
On Tue, Jun 11, 2019, 12:04 Fedor Gavrilov <fgavrilo(a)redhat.com> wrote:
Hi Nir,
Thanks a lot for the response!
It could be that I misunderstand what you say, but I am not sure about if
making one "Refresh all LUN sizes" button is better idea than one button
per LUN.
Vdsm does not support refreshing single LUN. We refresh all LUNs in all
storage servers of any type. So global refresh command seems to be the
right way to go.
From what I learned from support, there are users with lots of LUNs per VM
> and huge amount of direct LUNs total. If someone resizes several LUNs at
> once, they are probably doing so from a script anyway and can make use of
> curl.
>
> Thanks,
> Fedor Gavrilov
>
> ----- Original Message -----
> From: "Nir Soffer" <nsoffer(a)redhat.com>
> To: "Fedor Gavrilov" <fgavrilo(a)redhat.com>
> Cc: "devel" <devel(a)ovirt.org>, "Fred Rolland"
<frolland(a)redhat.com>
> Sent: Monday, June 10, 2019 7:33:45 PM
> Subject: Re: [ovirt-devel] GetDeviceList and direct LUNs
>
> On Mon, Jun 10, 2019 at 6:20 PM Fedor Gavrilov <fgavrilo(a)redhat.com>
> wrote:
>
> > Hi,
> >
> > I want to implement a feature that would allow one to manually refresh
> > sizes for direct LUNs and I am not sure if existing code in the engine
> > codebase is gonna help with that.
> >
> > RefreshLunsSizeCommand seems to be doing what is needed, but it operates
> > on a premise that LUNs to refresh belong to a storage domain which makes
> > most of its code irrelevant for purposes of direct LUNs.
> > It seems that workhorse is GetDeviceList command, but from the code I
> > can't quite understand if it's supposed to be used with external iSCSI
> > targets. Especially 'VDS' part here confuses me since I am not sure
what
> > VDS we're talking about in the first place when using direct LUN.
> >
> > If GetDeviceList is of no use, is there anything else VDSM provides?
> >
>
> On vdsm side, you want to use Host.getDeviceList:
>
>
https://github.com/oVirt/vdsm/blob/2bce8e8bff09b9c2fe4854ad91c40fdf6b7a01...
>
> Specify the storage type and the WWN of the LUN, also knows as GUID in
> vdsm/engine.
>
> checkStatus must be False, it is needed only when adding a device to a VG.
>
> The resize is performed in sdCache.refreshStorage(), effecting all storage
> types and all devices, so you
> want to call Host.getDeviceList() once with the list of GUIDs to refresh,
> instead of once per GUID.
>
> Adding Fred who worked on this feature.
>
> Nir
>
>
> >
> > Thanks,
> > Fedor Gavrilov
> > _______________________________________________
> > Devel mailing list -- devel(a)ovirt.org
> > To unsubscribe send an email to devel-leave(a)ovirt.org
> > Privacy Statement:
https://www.ovirt.org/site/privacy-policy/
> > oVirt Code of Conduct:
> >
https://www.ovirt.org/community/about/community-guidelines/
> > List Archives:
> >
>
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/NOJ2UT6FP5V...
> >
>