Servers started without --configfile on a packaged host share /etc/kividb/kividb.conf, and CONFIG REWRITE overwrites it · Issue #475 · kividbio/kividb · GitHub
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Servers started without --configfile on a packaged host share /etc/kividb/kividb.conf, and CONFIG REWRITE overwrites it #475
When a deb or rpm package is installed, /etc/kividb/kividb.conf exists. Any other server started on that host without its own --configfile (as root or as kividb) loads that shared default file.
Since #456 this counts as "started from a config file" (configfile_loaded in src/config.rs). So when Sentinel sends REPLICAOF then CONFIG REWRITE, that extra server overwrites the packaged file with its own port and replicaof. The packaged server then picks those up on its next restart.
#442 fixed the case where the file was missing. This is the same kind of problem when the file exists.
Redis avoids it by having no implicit default path: a server reads a config file only when it is given one.
Options:
Read the default path only when it is given explicitly, as Redis does. The packages' unit already passes --configfile.
Or refuse CONFIG REWRITE when the file was found implicitly through the default path.
Activity