Commit 517449e0 authored by Witold Krecicki's avatar Witold Krecicki
Browse files

Add a status line to rndc status notifying that server is being reloaded/reconfigured

parent 35d495db
......@@ -78,6 +78,7 @@ struct named_server {
isc_mutex_t reload_event_lock;
isc_event_t * reload_event;
bool reload_in_progress;
bool flushonshutdown;
......
......@@ -9325,6 +9325,7 @@ view_loaded(void *arg) {
"FIPS mode is %s",
FIPS_mode() ? "enabled" : "disabled");
#endif
server->reload_in_progress = false;
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_NOTICE,
......@@ -9660,6 +9661,7 @@ named_server_create(isc_mem_t *mctx, named_server_t **serverp) {
CHECKFATAL(server->reload_event == NULL ?
ISC_R_NOMEMORY : ISC_R_SUCCESS,
"allocating reload event");
server->reload_in_progress = true;
/*
* Setup the server task, which is responsible for coordinating
......@@ -9970,6 +9972,7 @@ loadconfig(named_server_t *server) {
static isc_result_t
reload(named_server_t *server) {
isc_result_t result;
server->reload_in_progress = true;
CHECK(loadconfig(server));
result = load_zones(server, false, false);
......@@ -10316,6 +10319,7 @@ named_server_reloadcommand(named_server_t *server, isc_lex_t *lex,
isc_result_t
named_server_reconfigcommand(named_server_t *server) {
isc_result_t result;
server->reload_in_progress = true;
CHECK(loadconfig(server));
......@@ -11461,6 +11465,10 @@ named_server_status(named_server_t *server, isc_buffer_t **text) {
server->sctx->tcpquota.used, server->sctx->tcpquota.max);
CHECK(putstr(text, line));
if (server->reload_in_progress) {
CHECK(putstr(text, "reload/reconfig in progress"));
}
CHECK(putstr(text, "server is up and running"));
CHECK(putnull(text));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment