Re: [PATCH] storage: Need to set secrettype for direct iscsi disk volume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 06/08/2015 07:00 PM, John Ferlan wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1200206
> 
> Commit id '1b4eaa61' added the ability to have a mode='direct' for
> an iscsi disk volume.  It relied on virStorageTranslateDiskSourcePool
> in order to copy any disk source pool authentication information to
> the direct disk volume, but it neglected to also copy the 'secrettype'
> field which ends up being used in the domain volume formatting code.
> Adding a secrettype for this case will allow for proper formatting later
> and allow disk snapshotting to work properly
> 

Found yet another path that won't work quite right - tweaking now and
will repost everything as a v2, so ignore this one...

John
> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
> ---
>  src/storage/storage_driver.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
> index ab8675d..57060ab 100644
> --- a/src/storage/storage_driver.c
> +++ b/src/storage/storage_driver.c
> @@ -3310,6 +3310,16 @@ virStorageTranslateDiskSourcePool(virConnectPtr conn,
>                                                       &pooldef->source) < 0)
>                 goto cleanup;
>  
> +           /* Source pool may not fill in the secrettype field,
> +            * so we need to do so here
> +            */
> +           if (def->src->auth && !def->src->auth->secrettype) {
> +               const char *secrettype =
> +                   virSecretUsageTypeToString(VIR_SECRET_USAGE_TYPE_ISCSI);
> +               if (VIR_STRDUP(def->src->auth->secrettype, secrettype) < 0)
> +                   goto cleanup;
> +           }
> +
>             if (virStorageAddISCSIPoolSourceHost(def, pooldef) < 0)
>                 goto cleanup;
>             break;
> 

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]