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

Re: [libvirt] [PATCH v2 7/8] storage: Add duplicate host check for Gluster pool def



On Wed, Apr 15, 2015 at 06:47:43 -0400, John Ferlan wrote:
> 
> 
> On 04/15/2015 03:57 AM, Peter Krempa wrote:
> > On Mon, Apr 13, 2015 at 17:21:11 -0400, John Ferlan wrote:
> >> Check the proposed pool source host XML definition against existing gluster
> >> pools to ensure the incoming definition doesn't use the same source host XML
> >> definition as an existing pool.
> >>
> >> Signed-off-by: John Ferlan <jferlan redhat com>
> >> ---
> >>  src/conf/storage_conf.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
> >> index 2b2104d..0a50f57 100644
> >> --- a/src/conf/storage_conf.c
> >> +++ b/src/conf/storage_conf.c
> >> @@ -2545,13 +2545,13 @@ virStoragePoolSourceFindDuplicate(virConnectPtr conn,
> >>              matchpool = virStoragePoolSourceFindDuplicateDevices(pool, def);
> >>              break;
> >>          case VIR_STORAGE_POOL_SHEEPDOG:
> >> +        case VIR_STORAGE_POOL_GLUSTER:
> > 
> > Gluster still can host multiple pools on a single host:port combination.
> > You also need to check that pool->def->source.dir are same among the two
> > pool definitions.
> > 
> >>              if (virStoragePoolSourceMatchSingleHost(&pool->def->source,
> >>                                                      &def->source))
> >>                  matchpool = pool;
> >>              break;
> >>          case VIR_STORAGE_POOL_MPATH:
> >>          case VIR_STORAGE_POOL_RBD:
> >> -        case VIR_STORAGE_POOL_GLUSTER:
> >>          case VIR_STORAGE_POOL_ZFS:
> >>          case VIR_STORAGE_POOL_LAST:
> >>              break;
> > 
> > ACK if you add the directory check.
> > 
> 
> So then GLUSTER is similar to NETFS then:
> 
>         case VIR_STORAGE_POOL_NETFS:
>             if (STREQ(pool->def->source.dir, def->source.dir) &&
>                 virStoragePoolSourceMatchSingleHost(&pool->def->source,
>                                                     &def->source))
>                 matchpool = pool;
> 
> And I could just move the GLUSTER to that same case, right?

Yes, exactly.

Peter

Attachment: signature.asc
Description: Digital signature


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