Networking

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Syncrepl out-of-sync detection.

    8 answers - 371 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi!
    I know that this question may have been asked before on this forum.
    But I just can't find the threads where it was discussed.
    Is there a way of telling wich slaves are not on sync on a syncrepl
    deployment? I mean, a "fast" way of telling whether "this" replica is
    not in sync.
    Thanks in advance,
    Ildefonso Camargo.
  • No.1 | | 502 bytes | |

    Monday, August 21, 2006 10:08 PM -0400 Jose Ildefonso Camargo Tolosa
    <ildefonso.camargo (AT) gmail (DOT) comwrote:

    Hi!

    I know that this question may have been asked before on this forum.
    But I just can't find the threads where it was discussed.

    Is there a way of telling wich slaves are not on sync on a syncrepl
    deployment? I mean, a "fast" way of telling whether "this" replica is
    not in sync.

    Examine the contextCSN value of the DIT being replicated?
  • No.2 | | 937 bytes | |

    Tuesday 22 August 2006 04:08, Jose Ildefonso Camargo Tolosa wrote:
    Hi!

    I know that this question may have been asked before on this forum.
    But I just can't find the threads where it was discussed.

    Is there a way of telling wich slaves are not on sync on a syncrepl
    deployment? I mean, a "fast" way of telling whether "this" replica is
    not in sync.

    I use the attached perl script to monitor performance and replication status
    with Hobbit (hobbitmon.sf.net), which then also keeps rrd files for the
    performance metrics which it graphs on the page for this test.

    You can use the perl script without Hobbit, I do this when I have a new slave
    and am waiting for it to sync.

    It assumes it will have anonymous access to the monitor backend on the
    consumer you are checking, and the base entry of each database (on the
    consumer and it's provider)

    Regards,
    Buchan
  • No.3 | | 995 bytes | |

    Tuesday 22 August 2006 09:19, Buchan Milne wrote:
    Tuesday 22 August 2006 04:08, Jose Ildefonso Camargo Tolosa wrote:
    Hi!

    I know that this question may have been asked before on this forum.
    But I just can't find the threads where it was discussed.

    Is there a way of telling wich slaves are not on sync on a syncrepl
    deployment? I mean, a "fast" way of telling whether "this" replica is
    not in sync.

    I use the attached perl script to monitor performance and replication
    status with Hobbit (hobbitmon.sf.net), which then also keeps rrd files for
    the performance metrics which it graphs on the page for this test.

    You can use the perl script without Hobbit, I do this when I have a new
    slave and am waiting for it to sync.

    It assumes it will have anonymous access to the monitor backend on the
    consumer you are checking, and the base entry of each database (on the
    consumer and it's provider)

    /me attaches attachment
  • No.4 | | 1325 bytes | |

    Hello!

    Tuesday 22 August 2006 09:19, you wrote:
    Tuesday 22 August 2006 04:08, Jose Ildefonso Camargo Tolosa wrote:
    Hi!

    I know that this question may have been asked before on this forum.
    But I just can't find the threads where it was discussed.

    Is there a way of telling wich slaves are not on sync on a syncrepl
    deployment? I mean, a "fast" way of telling whether "this" replica is
    not in sync.

    Thanks for asking this, I already wanted to ask a similiar question (how to
    monitor if syncrepl fails, but monitoring differences is also fine).

    I use the attached perl script to monitor performance and replication
    status with Hobbit (hobbitmon.sf.net), which then also keeps rrd files for
    the performance metrics which it graphs on the page for this test.

    Did you forget to attach the script?

    Another question, I just tested to simply dump everything with ldapsearch then
    to compare the results with diff. Tthe entries are in principle identical,
    only some newer entries are at different positions within the resulting ldif
    files. Is this common? course, that way my rude approach to compare the
    databases will fail. The next attempt would be to compare entry by entry, but
    maybe your script already does this?

    Thanks,
    Bernd
  • No.5 | | 1191 bytes | |

    Tuesday 22 August 2006 16:57, you wrote:
    Tuesday 22 August 2006 09:19, Buchan Milne wrote:
    Tuesday 22 August 2006 04:08, Jose Ildefonso Camargo Tolosa wrote:
    Hi!

    I know that this question may have been asked before on this forum.
    But I just can't find the threads where it was discussed.

    Is there a way of telling wich slaves are not on sync on a syncrepl
    deployment? I mean, a "fast" way of telling whether "this" replica is
    not in sync.

    I use the attached perl script to monitor performance and replication
    status with Hobbit (hobbitmon.sf.net), which then also keeps rrd files
    for the performance metrics which it graphs on the page for this test.

    You can use the perl script without Hobbit, I do this when I have a new
    slave and am waiting for it to sync.

    It assumes it will have anonymous access to the monitor backend on the
    consumer you are checking, and the base entry of each database (on the
    consumer and it's provider)

    /me attaches attachment

    Thanks, for the script. Unfortunately it says "K Not a syncrepl slave". How
    does it detect if it is a syncrepl slave?

    Thanks,
    Bernd
  • No.6 | | 1589 bytes | |

    Hi!

    8/22/06, Bernd Schubert <bernd-schubert (AT) gmx (DOT) dewrote:
    Hello!

    ()

    Another question, I just tested to simply dump everything with ldapsearch then
    to compare the results with diff. Tthe entries are in principle identical,
    only some newer entries are at different positions within the resulting ldif
    files. Is this common? course, that way my rude approach to compare the
    databases will fail. The next attempt would be to compare entry by entry, but
    maybe your script already does this?

    Yes, that's common. I would "split" the file in "entries", sort the
    file by "dn" (keeping each object as a whole), and "internally" sort
    each object (so that all attributes on each object are in the same
    order). course: make sure to keep dn as the first field. After
    sorting the files, you can use diff on them safely.

    I was about to take that approach. The problem is that it would mean
    transfering the "whole" ldif from the slave to the master from
    time-to-time. Not too bad, if you only do it, say, once every 48
    hours. approach wold be to use rsync; or to send the DNs with
    an SHA1 hash of the rest of the entry, and compare. If something
    differs, just issue a warning about it, and then transfer the whole
    entry (in order to fill a complete report of the sync status). But as
    you can see, it can be a rather complex system.

    I'll give a look at "hobbit" (thanks Buchan), and report about it.

    Thanks for all your answers,

    Sincerely,

    Ildefonso Camargo.
  • No.7 | | 1070 bytes | |

    Quanah Gibson-Mount wrote:
    --
    Monday, August 21, 2006 10:08 PM -0400 Jose Ildefonso Camargo
    Tolosa <ildefonso.camargo (AT) gmail (DOT) comwrote:
    >
    >Hi!
    >>

    >I know that this question may have been asked before on this forum.
    >But I just can't find the threads where it was discussed.
    >>

    >Is there a way of telling wich slaves are not on sync on a syncrepl
    >deployment? I mean, a "fast" way of telling whether "this" replica is
    >not in sync.
    >

    Examine the contextCSN value of the DIT being replicated?

    The fast yes/no answer is simply to compare the contextCSNs, as Quanah
    noted. If you want to know which entries are not yet sync'd, you can do
    essentially what the syncrepl engine does, and search for entries on the
    provider with entryCSN >= the contextCSN of the consumer. course, in
    the amount of time it takes to do that, the consumer would be able to
    sync itself already
  • No.8 | | 742 bytes | |

    Tuesday 22 August 2006 17:43, Bernd Schubert wrote:

    Another question, I just tested to simply dump everything with ldapsearch
    then to compare the results with diff. Tthe entries are in principle
    identical, only some newer entries are at different positions within the
    resulting ldif files. Is this common? course, that way my rude approach
    to compare the databases will fail. The next attempt would be to compare
    entry by entry, but maybe your script already does this?

    Since I have databases with 750 000, 500 000, 350 000, and 60 000 entries,
    this just isn't practical

    the smallest one (with ~ 250 entries) it might be practical, but it's not
    really necessary.

    Regards,
    Bucahn

Re: Syncrepl out-of-sync detection.


max 4000 letters.
Your nickname that display:
In order to stop the spam: 4 + 3 =
QUESTION ON "Networking"

EMSDN.COM