Re: [PATCH] iscsi: do not fail to stop a stopped pool

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

 




On 04/29/2015 09:08 AM, Ján Tomko wrote:
> Just as we allow stopping filesystem pools when they were unmounted
> externally, do not fail to stop an iscsi pool when someone else
> closed the session externally.
> 
> Resolves:
> https://bugzilla.redhat.com/show_bug.cgi?id=1171984

For this I disagree - it doesn't resolve all the issues in 1171984. It
resolves a symptom of libvirt allowing more than one pool to use the
same session.

While there is disagreement over the method I've taken :

http://www.redhat.com/archives/libvir-list/2015-April/msg01197.html

Simply "covering up" the original issue by just ignoring the error on
stop doesn't seem to be the best solution to me.

John
> ---
>  src/storage/storage_backend_iscsi.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c
> index 197d333..bea6758 100644
> --- a/src/storage/storage_backend_iscsi.c
> +++ b/src/storage/storage_backend_iscsi.c
> @@ -449,8 +449,13 @@ virStorageBackendISCSIStopPool(virConnectPtr conn ATTRIBUTE_UNUSED,
>                                 virStoragePoolObjPtr pool)
>  {
>      char *portal;
> +    char *session;
>      int ret = -1;
>  
> +    if ((session = virStorageBackendISCSISession(pool, false)) == NULL)
> +        return 0;
> +    VIR_FREE(session);
> +
>      if ((portal = virStorageBackendISCSIPortal(&pool->def->source)) == NULL)
>          return -1;
>  
> 

--
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]