-
Notifications
You must be signed in to change notification settings - Fork 125
Reload Configuration #107
Comments
I think I'd rather use I think if #71 is done before this, we don't lose any state when DHCP restarts. |
I think my best idea for this is having a This will mean that #110 will need modifying to be called externally by the signal handler in |
@icb- what would be the use case for what you're proposing? |
The biggest thing I'm after is rereading the static bindings without having to restart the daemon. |
What is lost by restarting the whole thing? It's very quick to start up and we don't keep that much important state. Especially when #110 is done. |
I don't want the user my webserver is running as (and therefore my provisioning CGIs) to be able to restart processes. If PyPXE is watching for changes in the static bindings, I don't need to do that. |
@mmattioli We didn't come to a resolution on this. Is this a feature that we want? If so I can start to work on it at some point soon. |
I agree with @icb-'s security concern. What's the cleanest way to implement with |
This is all I can think of off the top of my head, but I'm very open to suggestions.
|
@icb-, any opinion? |
We should be able to set
|
How do you propose we handle our generated dhcp leases when the user doesn't choose to save them? Just pull out the objects and somehow pass them in to the new service? Also nbd. What's the best way to transfer the COW file handles? Other than that, This seems like a good idea. |
It shouldn't be too hard to shuffle the DHCP leases to the new process ( I'm not sure how to handle NBD. Since the sessions are so long lived, would it make sense to shunt each one off to its own process? |
I think Pipe is a bit overkill and would end up being quite a large implementation for a small item. When calling the close method to signal the old server to shut down it could return a final leases list which we could update into the new server object. There could potentially be a slight race if the new server recieves a re-lease request before we've updated the leases object. This is probably only going to be a few milliseconds though so we should be safe. I think at the moment they're threads per client. However this doesn't help us, it probably makes it harder to update nbd settings. We need to decide what to do to old clients if the disk image changes. |
I would like to be able to reload configuration (particularly static bindings) without restarting. This could be as simple as responding to a
SIGHUP
as is convention, or periodically doing anos.stat
on the config files checking for changes inmtime
, or even inotify(7)/kqueue(2) type notifications.The text was updated successfully, but these errors were encountered: