`@stop-writes-on-bgsave-error' is not allowed as an instance variable name

We got a lot of 500 errors from Gitlab. Inspecting the logs shows it's a redis crash. We tried a couple of things like setting stop-writes-on-bgsave-error yes on redis.conf but now we're getting this error permanently (regardless of the value of stop-writes-on-bgsave-error).

We're getting this error when running gitlab-ctl reconfigure.

  * template[/var/opt/gitlab/redis/redis.conf] action create
    
    ================================================================================
    Error executing action `create` on resource 'template[/var/opt/gitlab/redis/redis.conf]'
    ================================================================================
    
    NameError
    ---------
    `@stop-writes-on-bgsave-error' is not allowed as an instance variable name
    
    Resource Declaration:
    ---------------------
    # In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/definitions/redis_service.rb
    
     58:   template redis_config do
     59:     source "redis.conf.erb"
     60:     owner redis_user
     61:     mode "0644"
     62:     variables(node['gitlab'][svc].to_hash.merge({ is_slave: is_slave }))
     63:     notifies :restart, "service[#{svc}]", :immediately if omnibus_helper.should_notify?(svc)
     64:   end
     65: 
    
    Compiled Resource:
    ------------------
    # Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/definitions/redis_service.rb:58:in `block in from_file'
    
    template("/var/opt/gitlab/redis/redis.conf") do
      params {:socket_group=>"git", :name=>"redis"}
      action [:create]
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      source "redis.conf.erb"
      variables {"enable"=>true, "ha"=>false, "dir"=>"/var/opt/gitlab/redis", "log_directory"=>"/var/log/gitlab/redis", "username"=>"gitlab-redis", "uid"=>nil, "gid"=>nil, "shell"=>"/bin/false", "home"=>"/var/opt/gitlab/redis", "bind"=>"127.0.0.1", "port"=>0, "maxclients"=>"10000", "tcp_timeout"=>60, "tcp_keepalive"=>300, "password"=>nil, "unixsocket"=>"/var/opt/gitlab/redis/redis.socket", "unixsocketperm"=>"777", "master"=>true, "master_name"=>"gitlab-redis", "master_ip"=>nil, "master_port"=>6379, "master_password"=>nil, "client_output_buffer_limit_normal"=>"0 0 0", "client_output_buffer_limit_slave"=>"256mb 64mb 60", "client_output_buffer_limit_pubsub"=>"32mb 8mb 60", "stop-writes-on-bgsave-error"=>false, :is_slave=>nil}
      declared_type :template
      cookbook_name "gitlab"
      recipe_name "redis"
      mode "0644"
      owner "gitlab-redis"
      path "/var/opt/gitlab/redis/redis.conf"
    end
    
    Platform:
    ---------
    x86_64-linux

Here's our /var/opt/gitlab/redis/redis.conf (attached) redis.conf

Edited Jul 21, 2017 by Lef Ioannidis
Assignee Loading
Time tracking Loading