Mark the lock-file configuration option as deprecated

This is first step in removing the lock-file configuration option, it
marks both the `lock-file` configuration directive and -X option to
named as deprecated.
This commit is contained in:
Ondřej Surý 2023-10-26 11:08:49 +02:00
parent 40c4540cf9
commit d3f2766a79
No known key found for this signature in database
GPG key ID: 2820F37E873DEA41
5 changed files with 16 additions and 3 deletions

View file

@ -203,6 +203,8 @@ Options
Use of this option overrides the ``lock-file`` option in
:iscman:`named.conf`. If set to ``none``, the lock file check is disabled.
This option has been deprecated and will be removed in the next release.
Signals
~~~~~~~

View file

@ -8171,6 +8171,11 @@ check_lockfile(named_server_t *server, const cfg_obj_t *config,
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
"'lock-file' has no effect "
"because the server was run with -X");
isc_log_write(
named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
"-X option has been deprecated and will be "
"removed in the a release");
if (named_g_defaultlockfile != NULL) {
server->lockfile = isc_mem_strdup(
server->mctx, named_g_defaultlockfile);
@ -8185,6 +8190,10 @@ check_lockfile(named_server_t *server, const cfg_obj_t *config,
filename);
}
} else if (named_g_forcelock && named_g_defaultlockfile != NULL) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
"-X option has been deprecated and will be "
"removed in the a release");
server->lockfile = isc_mem_strdup(server->mctx,
named_g_defaultlockfile);
}

View file

@ -1477,9 +1477,11 @@ default is used.
on exit. If not specified, the default is ``named.memstats``.
.. namedconf:statement:: lock-file
:tags: server
:tags: deprecated
:short: Sets the pathname of the file on which :iscman:`named` attempts to acquire a file lock when starting for the first time.
This option is deprecated and will be removed in a future release.
This is the pathname of a file on which :iscman:`named` attempts to acquire a
file lock when starting for the first time; if unsuccessful, the
server terminates, under the assumption that another server

View file

@ -164,7 +164,7 @@ options {
listen-on [ port <integer> ] [ tls <string> ] [ http <string> ] { <address_match_element>; ... }; // may occur multiple times
listen-on-v6 [ port <integer> ] [ tls <string> ] [ http <string> ] { <address_match_element>; ... }; // may occur multiple times
lmdb-mapsize <sizeval>;
lock-file ( <quoted_string> | none );
lock-file ( <quoted_string> | none ); // deprecated
managed-keys-directory <quoted_string>;
masterfile-format ( raw | text );
masterfile-style ( full | relative );

View file

@ -1269,7 +1269,7 @@ static cfg_clausedef_t options_clauses[] = {
CFG_CLAUSEFLAG_OBSOLETE },
{ "listen-on", &cfg_type_listenon, CFG_CLAUSEFLAG_MULTI },
{ "listen-on-v6", &cfg_type_listenon, CFG_CLAUSEFLAG_MULTI },
{ "lock-file", &cfg_type_qstringornone, 0 },
{ "lock-file", &cfg_type_qstringornone, CFG_CLAUSEFLAG_DEPRECATED },
{ "managed-keys-directory", &cfg_type_qstring, 0 },
{ "match-mapped-addresses", &cfg_type_boolean, 0 },
{ "max-rsa-exponent-size", &cfg_type_uint32, 0 },