Migration from one failover pair to two pairs; strategy, questions

Glenn Satchell Glenn.Satchell at uniq.com.au
Sun Jan 20 13:21:32 UTC 2008


>X-Virus-Scanned: amavisd-new at example.com
>Date: Sat, 19 Jan 2008 08:24:39 +1100
>From: Nick Urbanik <nicku at nicku.org>
>To: dhcp-users at isc.org
>Subject: Migration from one failover pair to two pairs; strategy, questions
>
>Dear Folks,
>
>I am writing code to migrate one ISC DHCP failover pair to two
>failover pairs.  I want to state my plan, and ask some questions that
>some of you may be able to answer.
>
>MIGRATION PLAN:
>===============
>
>To migrate from one pair to two pairs, I propose the following.  Note:
>primary, secondary, primary-a, primary-b, secondary-a, secondary-b are
>hostnames identifying individual server machines.
>
>The names "set", "seta" and "setb" are the failover peer identifiers
>used in failover peer statements in /etc/dhcpd.conf.
>
>1. Start with one failover pair, with one global failover peer
>    statement for failover peer identifier "set" in each
>    /etc/dhcpd.conf
>
>  +---------+                           +---------+
>  | +-----+ |                           | +-----+ |
>  | | set | | <-----------------------> | | set | |
>  | +-----+ |                           | +-----+ |
>  +---------+                           +---------+
>  primary                               secondary
>
>2. 2 global failover peer statements in each /etc/dhcpd.conf, two
>    machines still in one failover pair.  shared-network declarations
>    containing pools where all pools withing one shared network are
>    assigned to one of "seta" or "setb" failover peer.
>
>  +---------+                           +---------+
>  | +-----+ |                           | +-----+ |
>  | |seta | | <-----------------------> | |seta | |
>  | +-----+ |                           | +-----+ |
>  | +-----+ |                           | +-----+ |
>  | |setb | | <-----------------------> | |setb | |
>  | +-----+ |                           | +-----+ |
>  +---------+                           +---------+
>  primary-a                             secondary-a
>
>3. Two global failover peer statements in each /etc/dhcpd.conf,
>    introduce one more machine secondary-b.
>
>    Leases transferred from primary-a to secondary-b with failover peer
>    name "setb" to secondary-b using failover protocol.  secondary-b
>    begins with an empty leases file.
>
>                                        +---------+
>                                        | +-----+ |
>                            /---------> | |seta | |
>                           /            | +-----+ |
>  +---------+             /             | +-----+ |
>  | +-----+ |            /              | |setb | |
>  | |seta | | <---------/               | +-----+ |
>  | +-----+ |                           +---------+
>  | +-----+ |                           secondary-a
>  | |setb | | <----------
>  | +-----+ |            \              +---------+
>  +---------+             \             | +-----+ |
>  primary-a                \----------> | |setb | |
>                                        | +-----+ |
>                                        +---------+
>				       secondary-b
>
>4. One failover peer statement in each /etc/dhcpd.conf.
>    leases transferred from secondary-b with failover peer name setb
>    to primary-b using failover protocol.   primary-b begins with empty
>    leases file.
>
>  +---------+                           +---------+
>  | +-----+ |                           | +-----+ |
>  | |seta | | <-----------------------> | |seta | |
>  | +-----+ |                           | +-----+ |
>  +---------+                           +---------+
>  primary-a                             secondary-a
>
>  +---------+                           +---------+
>  | +-----+ |                           | +-----+ |
>  | |seta | | <-----------------------> | |setb | |
>  | +-----+ |                           | +-----+ |
>  +---------+                           +---------+
>  primary-b                             secondary-b
>
>
>Note: 4. is the final aim of the migration; steps 2, 3 are transitions
>between the current situation 1. to the new situation 4.
>
>QUESTIONS:
>==========
>
>1. Can I create two global failover peer statements in /etc/dhcpd.conf
>    like this (for step 3. above, on primary-a):
>failover peer "seta" {
>         primary;
>         address primary-a;
>         port 520;
>         peer address secondary-a;
>         peer port 520;
>         max-response-delay 60;
>         max-unacked-updates 10;
>         mclt 3600;
>         split 128;
>         load balance max seconds 3;
>}
>failover peer "setb" {
>         primary;
>         address primary-a;
>         port 520;
>         peer address secondary-b;
>         peer port 520;
>         max-response-delay 60;
>         max-unacked-updates 10;
>         mclt 3600;
>         split 128;
>         load balance max seconds 3;
>}
>
>2. Can anyone suggest a better/simpler migration strategy?  Most
>    important aim is to avoid any outage.

I think this will work, but there are three re-starts involved.

Another approach would be create the configuration you want in
dhcpd.conf for seta and setb, copy the dhcpd.leases files from the
corresponding primary hosts and start it up. There will be some time
spent as it discards all the leases for ip addresses outside the
subnets defined, but after that will operate normally. With the scale
of your client base I can't estimate how long that will take. Maybe you
should set up some test servers and try it out?

regards,
-glenn
--
Glenn Satchell     mailto:glenn.satchell at uniq.com.au | It's a dog  eat dog
Uniq Advances Pty Ltd         http://www.uniq.com.au | world, and by golly,
PO Box 70 Paddington NSW Australia 2021              | we better make sure
tel:0409-458-580  tel:02-9380-6360  fax:02-9380-6416 | we're the dog.


More information about the dhcp-users mailing list