Fwd: What will PGs do when the network splits?

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

 



Thanks for help.

I know that process, but it can't avoid my problem while the new OSDs
can't reach the old OSDs because of the network problem, so there is
actually no one could tell the old PGs that they are not primary
anymore.

Think about the following scene:

There are two rooms A and B with 10 osds for each room, and 3 mons in
room A. The replicas are in the same room with their primay (That can
be implemented by CRUSH). When the network between room A and B is
broken. How does the PGs on OSDs in the room B know about that?

I think when a new PG wants to become primay, it must talk with the
old primay PG, so there will never be two same primay PG at the same
time, but with the network problem, the commucaiton between the old
and new primay PGs is impossible. Under this situation what will the
new primay do? or they will never become Active?

In other distributed system lease may be used for these issue, but I
don't find any codes about that.

I hope there is something wrong with my opinion.

Thank you again.

On 6 April 2013 19:54, Yan, Zheng <ukernel@xxxxxxxxx> wrote:
> On Sat, Apr 6, 2013 at 1:22 PM, 袁冬 <yuandong1222@xxxxxxxxx> wrote:
>>
>> Hi guys.
>>
>> I have a problem when reading the codes of the ceph.
>>
>> In the osd.cc, the tick method will check if the mon is timeout by
>> compare "now - g_conf->osd_mon_ack_timeout" with last_pg_stats_ack, if
>> it's timeout, then monc->reopen_session() will be called to try to
>> re-connect to the mon.
>>
>> The question is that, if the network has splited so that the osd will
>> never be able to connect to any mon, how do the PGs on the osd know
>> that? I think the PGs may still believe they are heathly with the
>> current OSDMap even the mons have already mark their osd down & out
>> (but couldn't tell them for the network problem), Then they continue
>> to sevice clients who have the same OSDMap with them. So two primary
>> PG may exist in the cluster at the same time which is terrible.
>
>
> When OSDs communicate, they check if their OSDMaps match. If not, ODS that
> has
> newer OSDMap sends OSDMap to ODSs that have old map. To migrate a PG to new
> OSDs, the new OSDs need communicate with the old OSDs, so it's impossible to
> have
> two active PG primaries exist at the same time.
>
>
>>
>>
>> I want to knwon any code work with this issue or is there some wrong
>> with my opinion?
>>
>> Thanks for any help!
>>
>>
>> --
>> 袁冬
>> Email:yuandong1222@xxxxxxxxx
>> QQ:10200230
>> --
>> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>> the body of a message to majordomo@xxxxxxxxxxxxxxx
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>



--
袁冬
Email:yuandong1222@xxxxxxxxx
QQ:10200230


--
袁冬
Email:yuandong1222@xxxxxxxxx
QQ:10200230
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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