Shutting down and restarting the dhcp server via omapi

Jürgen Dietl juergen.dietl at googlemail.com
Thu Feb 24 15:25:39 UTC 2011


Hello,

thanx a lot for your help. I tried it with the following script:

#!/bin/bash

/usr/local/bin/omshell << END
server localhost
port 7911
key xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
connect
new control
open
set state=2
update
END

The log file:

Feb 24 16:03:14 xxxxxxx dhcpd: peer xxxxxxxx: disconnected
Feb 24 16:03:14 xxxxxxx dhcpd: failover peer xxxxxxx: I move from normal to
communications-interrupted


Feb 24 16:03:09 xxxxxxx dhcpd: Disabling output on
LPF/eth0/00:00:00:00:00:00/10.2.220.0/24
Feb 24 16:03:09 xxxxxxx dhcpd: Disabling input on
LPF/eth0/00:00:00:00:00:00/10.2.220.0/24
Feb 24 16:03:09 xxxxxxx dhcpd: failover peer xxxxxxx: I move from normal to
shutdown
Feb 24 16:03:14 xxxxxxx dhcpd: failover peer xxxxxxx: I move from shutdown
to recover

I will do some trace soon and try to see how the 2 servers communicate. Till
now it looks to me that the server that shuts down dont tell it to the other
server.

cu later,
cheers,
Juergen




2011/2/24 Nils-Henner Krueger <nhk at snhc-krueger.de>

> Am 24.02.2011 14:56, schrieb Jürgen Dietl:
> > My main problem is that when I stop the dhcp server I always will get a
> > "communication-interrupted". What I would like to have is a
> "partner-down".
> >
> > So do any of you have a script or an idea how I can make the server to
> > make a graceful shutdown of dhcp service?
>
> 'man dhcpd' of version 4.11 says "To shut the server down, open its
> control object and set the state attribute to 2."
>
> I do it like this in a start/stop-Script:
>
> ${PRODPATH}/bin/omshell << END
> server localhost
> port xxxx
> connect
> new control
> open
> set state=2
> update
> END
>
> This works fine, logging on the shutdown server:
>
> dhcpd: failover peer ha: I move from normal to shutdown
> dhcpd: failover peer ha: peer moves from normal to partner-down
> dhcpd: failover peer ha: I move from shutdown to recover
>
> Logging on the partner cluster member:
>
> dhcpd: failover peer ha: peer moves from normal to shutdown
> dhcpd: failover peer ha: I move from normal to partner-down
> dhcpd: peer ha: disconnected
>
>
> nils-henner
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20110224/2b6b9e17/attachment.html>


More information about the dhcp-users mailing list