diff --git a/.kitchen.yml b/.kitchen.yml index f737d4c9..d06026d8 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -61,9 +61,13 @@ suites: - name: redis-package run_list: - recipe[redisio::default] + - recipe[redisio::install] + - recipe[redisio::disable_os_default] + - recipe[redisio::configure] - recipe[redisio::enable] attributes: redisio: + bypass_setup: true servers: - port: 6379 package_install: true diff --git a/.travis.yml b/.travis.yml index 7a3b4a1d..3df29688 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,5 +51,3 @@ matrix: allow_failures: # https://github.com/brianbianco/redisio/issues/335 - env: CMD="kitchen verify" OPTIONS="redis-package-centos-6" - # https://github.com/brianbianco/redisio/issues/336 - - env: CMD="kitchen verify" OPTIONS="redis-package-debian-7" diff --git a/templates/default/redis.conf.erb b/templates/default/redis.conf.erb index 3be809a6..dd4a3f99 100644 --- a/templates/default/redis.conf.erb +++ b/templates/default/redis.conf.erb @@ -83,6 +83,7 @@ protected-mode <%= @protected_mode %> # Close the connection after a client is idle for N seconds (0 to disable) <%= "timeout #{@timeout}" %> +<% if (@version[:major].to_i == 2 && @version[:minor].to_i >= 8) || @version[:major].to_i >= 3 %> # TCP keepalive. # # If non-zero, use SO_KEEPALIVE to send TCP ACKs to clients in absence @@ -98,6 +99,7 @@ protected-mode <%= @protected_mode %> # # A reasonable value for this option is 60 seconds. tcp-keepalive <%=@keepalive%> +<% end %> # Set server verbosity to 'debug' # it can be one of: @@ -160,6 +162,7 @@ databases <%=@databases%> <% end %> <% end %> +<% if (@version[:major].to_i == 2 && @version[:minor].to_i >= 6) || @version[:major].to_i >= 3 %> # By default Redis will stop accepting writes if RDB snapshots are enabled # (at least one save point) and the latest background save failed. # This will make the user aware (in a hard way) that data is not persisting @@ -174,6 +177,7 @@ databases <%=@databases%> # continue to work as usual even if there are problems with disk, # permissions, and so forth. stop-writes-on-bgsave-error <%= @stopwritesonbgsaveerror %> +<% end %> # Compress string objects using LZF when dump .rdb databases? # For default that's set to 'yes' as it's almost always a win. @@ -301,6 +305,7 @@ repl-timeout <%=@repltimeout%> repl-disable-tcp-nodelay <%= @repldisabletcpnodelay %> <% end %> +<% if (@version[:major].to_i == 2 && @version[:minor].to_i >= 8) || @version[:major].to_i >= 3 %> # Set the replication backlog size. The backlog is a buffer that accumulates # slave data when slaves are disconnected for some time, so that when a slave # wants to reconnect again, often a full resync is not needed, but a partial @@ -322,7 +327,9 @@ repl-backlog-size <%= @replbacklogsize %> # A value of 0 means to never release the backlog. # repl-backlog-ttl <%= @replbacklogttl %> +<% end %> +<% if (@version[:major].to_i == 2 && @version[:minor].to_i >= 6) || @version[:major].to_i >= 3 %> # The slave priority is an integer number published by Redis in the INFO output. # It is used by Redis Sentinel in order to select a slave to promote into a # master if the master is no longer working correctly. @@ -337,6 +344,7 @@ repl-backlog-ttl <%= @replbacklogttl %> # # By default the priority is 100. slave-priority <%= @slavepriority %> +<% end %> <% if @version[:major].to_i >= 3 %> # It is possible for a master to stop accepting writes if there are less than @@ -629,6 +637,7 @@ auto-aof-rewrite-min-size <%=@aofrewriteminsize%> aof-load-truncated <%= @aofloadtruncated %> <% end %> +<% if (@version[:major].to_i == 2 && @version[:minor].to_i >= 6) || @version[:major].to_i >= 3 %> ################################ LUA SCRIPTING ############################### # Max execution time of a Lua script in milliseconds. @@ -646,6 +655,7 @@ aof-load-truncated <%= @aofloadtruncated %> # # Set it to 0 or a negative value for unlimited execution without warnings. lua-time-limit <%= @luatimelimit %> +<% end %> ################################## SLOW LOG ################################### @@ -873,6 +883,7 @@ activerehashing <%= @activerehasing %> hash-max-zipmap-value 64 <% end %> +<% if (@version[:major].to_i == 2 && @version[:minor].to_i >= 6) || @version[:major].to_i >= 3 %> # The client output buffer limits can be used to force disconnection of clients # that are not reading data from the server fast enough for some reason (a # common reason is that a Pub/Sub client can't consume messages as fast as the @@ -914,7 +925,9 @@ activerehashing <%= @activerehasing %> <% @clientoutputbufferlimit.each do |c| %> <%= "client-output-buffer-limit #{c.flatten.join(' ')}" %> <% end %> +<% end %> +<% if (@version[:major].to_i == 2 && @version[:minor].to_i >= 8) || @version[:major].to_i >= 3 %> # Redis calls an internal function to perform many background tasks, like # closing connections of clients in timeout, purging expired keys that are # never requested, and so forth. @@ -937,6 +950,7 @@ hz <%= @hz %> # in order to commit the file to the disk more incrementally and avoid # big latency spikes. aof-rewrite-incremental-fsync <%= @aofrewriteincrementalfsync %> +<% end %> <%if @clusterenabled == 'yes' %> cluster-enabled yes