8000 Servers started without --configfile on a packaged host share /etc/kividb/kividb.conf, and CONFIG REWRITE overwrites it · Issue #475 · kividbio/kividb · GitHub
[go: up one dir, main page]

Skip to content

Servers started without --configfile on a packaged host share /etc/kividb/kividb.conf, and CONFIG REWRITE overwrites it #475

Open

Description

@murtazayusuf

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.

Found while reviewing #456.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0