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