Lachim / redis

Automatically exported from code.google.com/p/redis
2 stars 0 forks source link

Redis try to chdir to "dir" setting providen by an include, and overriden after #482

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What version of Redis you are using, in what kind of Operating System?

Redis 2.2.2 on Ubuntu 10.10

What is the problem you are experiencing?

I have a "default.conf" configuration for a project. In it i have

  dir /var/lib/redis/objiz/

This default configuration file can be used as an include to have others 
settings, eg locally. Here is my "local.conf"

  include "/home/twidi/dev/envs/oms/conf/redis/default.conf"
  dir "/home/twidi/dev/envs/oms/data/redis/"

But the server cannot be launched with ma local.conf, and i have this in logs :

  [28584] 09 Mar 03:10:17 # Can't chdir to '/var/lib/redis/objiz/': No such file or directory

What steps will reproduce the problem?

  1. Create a conf file with a non existent directory for "dir"
  2. Create another one, include the previous with "include", and add a line with an existent directory for "dir"
  3. Launch redis-server with the last conf file

Original issue reported on code.google.com by stephane.angel on 9 Mar 2011 at 2:20

GoogleCodeExporter commented 8 years ago
Hi Stephen, I don't think this is actually a problem, simply Redis checks for 
correctness of the "dir" parameter asap. If you want a neutral configuration 
what about not specifying at all dir in the default? Or you can specify a dir 
that always exists like /var/redis/default/

Cheers,
Salvatore

Original comment by anti...@gmail.com on 9 Mar 2011 at 9:41

GoogleCodeExporter commented 8 years ago
Hi Salvatore, thanks for your answer.

In this project, the default conf is used by the launcher if no specific 
configuration is found for this host (the "local.conf" is actually named with 
the hostname), so i thought that having a fully functional "default.conf" 
cannot cause problem since i override settings in the other (btw only "dir" is 
overriden). I cannot imagine that redis will evaluate all directives in order, 
not by the end.

But that's not a real problem for me, i will create a base.conf, without "dir" 
(is there other entries that i shloud take care of ?), and inherit from it in a 
default.conf and a local.conf

S. Angel / Twidi

Original comment by stephane.angel on 9 Mar 2011 at 2:22