[libvirt] [PATCH 7/9] storage: Add duplicate host check for Sheepdog pool def
Peter Krempa
pkrempa at redhat.com
Mon Apr 13 10:23:44 UTC 2015
On Thu, Apr 02, 2015 at 13:39:44 -0400, John Ferlan wrote:
> Check proposed pool definitions to ensure they aren't trying to use the
> same host as currently defined definitions - disallow the duplicate
This statement is invalid. Multiple pols can be hosted on a single host.
The check needs to do better than just check the host name. Port and
pool path may differ denoting a different pool.
Btw same host can be described using multiple host strings so it also
isn't absolute.
>
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
> src/conf/storage_conf.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
> index 5f1c151..5db7478 100644
> --- a/src/conf/storage_conf.c
> +++ b/src/conf/storage_conf.c
> @@ -2427,9 +2427,12 @@ virStoragePoolSourceFindDuplicate(virConnectPtr conn,
> case VIR_STORAGE_POOL_DISK:
> matchpool = virStoragePoolSourceFindDuplicateDevices(pool, def);
> break;
> + case VIR_STORAGE_POOL_SHEEPDOG:
> + if (matchPoolSourceHost(&pool->def->source, &def->source))
> + matchpool = pool;
> + break;
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150413/27bc83a4/attachment-0001.sig>
More information about the libvir-list
mailing list