Re: rgw-multisite: why do we set the default placement-rule zonegroup-level?

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

 



Casey Bodley <cbodley@xxxxxxxxxx> 于2018年8月29日周三 下午8:24写道:
>
>
> On 08/29/2018 02:33 AM, Test Test wrote:
> > Hi cephers:
> >
> > Recently, I was testing the multisite of rgw(ceph 12.2.5). I have some
> > questions, can you give me a hand?
> >
> > 1. every zone has its own placement-rules. But when I create a bucket,
> > it will be created on all the other zones which requires the zone s
> > have the same placement-rule. So are the placement rules the zone's
> > info or the zonegroup's info?
>
> the set of possible placement rules are defined in the zonegroup. each
> zone needs to map each of those placement rules to its own pool names.
> so there's both a global (zonegroup) part and a local (zone) part
>
> > 2. every bucket records its placement-rule and it asks the
> > placement-rule never changed. But we can change the placement-rule
> > easily. So why does not the bucket record the pool's info instead of
> > the placement-rule?
>
> all bucket metadata (which includes this placement id) is replicated
> between zones by metadata sync, so is effectively global. the pool names
> themselves are local to zones, because different zones want to use
> different pools. that wouldn't work if the bucket stored the pool names
> directly
>
> in fact, before jewel the bucket did store pool names - and we still
> support the 'explicit_placement' field for backward compatibility,
> though it has that defect when used in a multisite configuration
>
> >
> > 3. the zonegroup has a default placement-rule. Why is the default
> > placement-rule zonegroup-level, not zone-level?
> >
> > Thanks!!!
>
> the default placement rule is used when creating new buckets, and all
> bucket creation happens on the metadata master zone (the master zone of
> the master zonegroup). if that zone becomes unavailable and you fail
> over to another master zone, it should use that same default

The list of placement-rules is global and the content of
placement-rules is local. After a bucket uses the placement-rule, the
placement-rule should not be changed again. If we modify as follows:

1. When a bucket is created, it records the placement-rule and pools'
info( in 'explicit_placement').
2. When a bucket syncs, the plcament-rule syncs, the pools' info does
not sync. the bucket in other zones updates its pools‘ info (according
the placement-rule in other zones).

So the bucket in different zones will have the same placement-rule but
different pools' info. And changing the placement-rule will not affect
the availability of the bucket.




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux