Gracefully shutdown dhcpd

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Gracefully shutdown dhcpd

Shraddha Pandhe
Hi,

Is there a way to gracefully shutdown DHCPD using a signal?

I see that dhcpd supports following states:

enum dhcp_shutdown_state {
shutdown_listeners,
shutdown_omapi_connections,
shutdown_drop_omapi_connections,
shutdown_dhcp,
shutdown_done
};


Is there a way to follow these states, without using OMAPI connection?


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Gracefully shutdown dhcpd

Bob Harold


On Tue, Jun 23, 2015 at 7:24 PM, Shraddha Pandhe <[hidden email]> wrote:
Hi,

Is there a way to gracefully shutdown DHCPD using a signal?

I see that dhcpd supports following states:

enum dhcp_shutdown_state {
shutdown_listeners,
shutdown_omapi_connections,
shutdown_drop_omapi_connections,
shutdown_dhcp,
shutdown_done
};


Is there a way to follow these states, without using OMAPI connection?

From the man page:
"To restart dhcpd, send a SIGTERM (signal 15) to the process ID contained in RUNDIR/dhcpd.pid, and then re-invoke dhcpd."

Sounds to me like  kill -TERM is a graceful shutdown for dhcpd.


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Gracefully shutdown dhcpd

Shraddha Pandhe
Hi Bob,

Thanks for responding. I tried out SIGTERM. Here are my findings.

When I follow the omshell way of graceful shutdown [1], I see following in dhcpd logs. This seems like graceful shutdown. But when I do `kill -15 <pid>` I don't see any such log. Is there a way to verify that dhcpd has shutdown gracefully?



Jun 24 17:26:32 painedingrained dhcpd: Disabling output on LPF/eth0/fa:16:3e:0c:f2:ef/**.**.**.**/**

Jun 24 17:26:32 painedingrained dhcpd: Disabling input on LPF/eth0/fa:16:3e:0c:f2:ef/**.**.**.**/**




[1]  omshell

> server 127.0.0.1

> port 8080

> connect

obj: <null>

> new control

obj: control

> open

obj: control

state = 00:00:00:00

> set state = 2

obj: control

state = 2

> update

can't update object: connection reset by peer

obj: control

state = 2



_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Gracefully shutdown dhcpd

Bob Harold

On Wed, Jun 24, 2015 at 1:30 PM, Shraddha Pandhe <[hidden email]> wrote:
Hi Bob,

Thanks for responding. I tried out SIGTERM. Here are my findings.

When I follow the omshell way of graceful shutdown [1], I see following in dhcpd logs. This seems like graceful shutdown. But when I do `kill -15 <pid>` I don't see any such log. Is there a way to verify that dhcpd has shutdown gracefully?



Jun 24 17:26:32 painedingrained dhcpd: Disabling output on LPF/eth0/fa:16:3e:0c:f2:ef/**.**.**.**/**

Jun 24 17:26:32 painedingrained dhcpd: Disabling input on LPF/eth0/fa:16:3e:0c:f2:ef/**.**.**.**/**




[1]  omshell

> server 127.0.0.1

> port 8080

> connect

obj: <null>

> new control

obj: control

> open

obj: control

state = 00:00:00:00

> set state = 2

obj: control

state = 2

> update

can't update object: connection reset by peer

obj: control

state = 2



I don't know.  Hopefully someone else can help.

Bob Harold
 


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Gracefully shutdown dhcpd

Shraddha Pandhe
Thanks Bob!

On Wed, Jun 24, 2015 at 11:26 AM, Bob Harold <[hidden email]> wrote:

On Wed, Jun 24, 2015 at 1:30 PM, Shraddha Pandhe <[hidden email]> wrote:
Hi Bob,

Thanks for responding. I tried out SIGTERM. Here are my findings.

When I follow the omshell way of graceful shutdown [1], I see following in dhcpd logs. This seems like graceful shutdown. But when I do `kill -15 <pid>` I don't see any such log. Is there a way to verify that dhcpd has shutdown gracefully?



Jun 24 17:26:32 painedingrained dhcpd: Disabling output on LPF/eth0/fa:16:3e:0c:f2:ef/**.**.**.**/**

Jun 24 17:26:32 painedingrained dhcpd: Disabling input on LPF/eth0/fa:16:3e:0c:f2:ef/**.**.**.**/**




[1]  omshell

> server 127.0.0.1

> port 8080

> connect

obj: <null>

> new control

obj: control

> open

obj: control

state = 00:00:00:00

> set state = 2

obj: control

state = 2

> update

can't update object: connection reset by peer

obj: control

state = 2



I don't know.  Hopefully someone else can help.

Bob Harold
 


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users