mumble-voip / mumble

Mumble is an open-source, low-latency, high quality voice chat software.
https://www.mumble.info
Other
6.28k stars 1.11k forks source link

Reload server config #1680

Closed remram44 closed 9 years ago

remram44 commented 9 years ago

There seem to be no way (that I could find in docs, anyway) to reload the config file or database without restarting the server. It is pretty common for servers to reload their setting upon receiving some signal, like SIGHUP.

mkrautz commented 9 years ago

Could you elaborate on which murmur.ini options you would like to change and have the server reload them?

In the general case, a LOT of the options in murmur.ini are simply defaults for virtual servers. This means that virtual servers will only use them if they don't have the corresponding option set.

Virtual servers are managed via RPC -- and practically all options can be set on a per-server basis. Most other options I can think of wouldn't really work in a hot reload situation and would require a full server restart anyway.

So, to sum up: Murmur is optimized for hosts that manage their server fleet via RPC. Pretty much everything can be done via RPC -- though some of those will require a restart a particular virtual server to take effect.

If you have any specific murmur.ini options in mind that would work great for hot-reloading, it's probably something we would consider.

Thanks for the report!

remram44 commented 9 years ago

I'm a lot more interested in changes in the sqlite database than the INI file. I was surprised to see that a change in ACL directly in the database didn't reflect on the server before a restart.

mkrautz commented 9 years ago

The database is considered private, and not part of any public interface for interacting with Murmur.

While it probably would be technically possible to obtain consistency while allowing users to write to the database, it would complicate the database layer considerably. Right now, it's just dumb, structured storage.

Were we to allow it, we would need to be informed of every change made to the database, as it happens, and sync our state accordingly, and tell all the connected clients.

If we were to allow simply "reloading" the database, avoiding the need to be informed immediately, we would also run into trouble. If the server doesn't know that the underlying database has changed, it could overwrite something the user has written to it. It could also, potentially, run into consistency issues.

So, it would only make sense to be able to reload the database if no clients at all are connected. In which case a restart of the daemon would work just as well.

I'd also like to add that anything you can change in the database directly, you can change via RPC. If you find anything that is missing, feel free to open a feature request for it.

mkrautz commented 9 years ago

Closing, as the DB is not considered part of any public Mumble programming interface.

adler187 commented 8 years ago

With the advent of Let's Encrypt and dns-01 validation, it would be nice to be able to reload the automatically renewed certificate without have to restart the server.

mkrautz commented 8 years ago

Coming in https://github.com/mumble-voip/mumble/pull/2221

adler187 commented 8 years ago

Not as easy as SIGHUP, but I'll take it. :)