saltstack-formulas / redis-formula

Redis state
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
40 stars 184 forks source link

Removing invalid config values from redis 2.8 config #61

Closed myoung34 closed 7 years ago

myoung34 commented 7 years ago

Resolves #5 and #23

*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 11
>>> 'tcp-backlog 511'
Bad directive or wrong number of arguments

*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 11
>>> 'tcp-keepalive 0'
Bad directive or wrong number of arguments

*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 22
>>> 'stop-writes-on-bgsave-error yes'
Bad directive or wrong number of arguments

*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 23
>>> 'rdbchecksum yes'
Bad directive or wrong number of arguments

*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 28
>>> 'slave-read-only yes'
Bad directive or wrong number of arguments

*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 29
>>> 'repl-disable-tcp-nodelay no'
Bad directive or wrong number of arguments

*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 29
>>> 'slave-priority 100'
Bad directive or wrong number of arguments

*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 38
>>> 'lua-time-limit 5000'
Bad directive or wrong number of arguments

*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 41
>>> 'notify-keyspace-events ""'
Bad directive or wrong number of arguments

*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 43
>>> 'hash-max-ziplist-entries 512'
Bad directive or wrong number of arguments

*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 43
>>> 'hash-max-ziplist-value 64'
Bad directive or wrong number of arguments

*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 53
>>> 'client-output-buffer-limit normal 0 0 0'
Bad directive or wrong number of arguments

*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 53
>>> 'hz 10'
Bad directive or wrong number of arguments

*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 53
>>> 'aof-rewrite-incremental-fsync yes'
Bad directive or wrong number of arguments
myoung34 commented 7 years ago

Internal AMI tests using ami-spec:

Without fix:

+ bundle exec ami_spec --role Redis --ami ami-#### --subnet-id subnet-4a91dc03 --key-name test --aws-instance-type t2.micro --key-file test.pem --ssh-user ec2-user --aws-security-groups sg-### -t 120 --specs ./spec
boo!
Running tests for Redis
...............................................FFF........

Failures:

  1) Redis Server redis server Command "redis-cli incr something" exit_status should eq 0
     On host `10.0.3.4'
     Failure/Error: its(:exit_status) { should eq 0 }

       expected: 0
            got: 1

       (compared using ==)
       sudo -p 'Password: ' /bin/sh -c redis-cli\ incr\ something

     # ./spec/Redis/redis_spec.rb:16:in `block (4 levels) in <top (required)>'
     # /home/ec2-user/.gem/ruby/2.2/gems/ami_spec-0.3.0/lib/ami_spec/server_spec.rb:33:in `run'
     # /home/ec2-user/.gem/ruby/2.2/gems/ami_spec-0.3.0/lib/ami_spec.rb:59:in `block in run'
     # /home/ec2-user/.gem/ruby/2.2/gems/ami_spec-0.3.0/lib/ami_spec.rb:53:in `each'
     # /home/ec2-user/.gem/ruby/2.2/gems/ami_spec-0.3.0/lib/ami_spec.rb:53:in `run'
     # /home/ec2-user/.gem/ruby/2.2/gems/ami_spec-0.3.0/lib/ami_spec.rb:121:in `invoke'

  2) Redis Server redis server Command "redis-cli incr something" stderr should be empty
     On host `10.0.3.4'
     Failure/Error: its(:stderr) { should be_empty }
       expected `"Could not connect to Redis at 127.0.0.1:6379: Connection refused\n".empty?` to return true, got false

     # ./spec/Redis/redis_spec.rb:17:in `block (4 levels) in <top (required)>'
     # /home/ec2-user/.gem/ruby/2.2/gems/ami_spec-0.3.0/lib/ami_spec/server_spec.rb:33:in `run'
     # /home/ec2-user/.gem/ruby/2.2/gems/ami_spec-0.3.0/lib/ami_spec.rb:59:in `block in run'
     # /home/ec2-user/.gem/ruby/2.2/gems/ami_spec-0.3.0/lib/ami_spec.rb:53:in `each'
     # /home/ec2-user/.gem/ruby/2.2/gems/ami_spec-0.3.0/lib/ami_spec.rb:53:in `run'
     # /home/ec2-user/.gem/ruby/2.2/gems/ami_spec-0.3.0/lib/ami_spec.rb:121:in `invoke'

  3) Redis Server redis server Command "redis-cli incr something" stdout should match /^1$/
     On host `10.0.3.4'
     Failure/Error: its(:stdout) { should match(/^1$/) }
       expected "" to match /^1$/
       Diff:
       @@ -1,2 +1,2 @@
       -/^1$/
       +""

     # ./spec/Redis/redis_spec.rb:18:in `block (4 levels) in <top (required)>'
     # /home/ec2-user/.gem/ruby/2.2/gems/ami_spec-0.3.0/lib/ami_spec/server_spec.rb:33:in `run'
     # /home/ec2-user/.gem/ruby/2.2/gems/ami_spec-0.3.0/lib/ami_spec.rb:59:in `block in run'
     # /home/ec2-user/.gem/ruby/2.2/gems/ami_spec-0.3.0/lib/ami_spec.rb:53:in `each'
     # /home/ec2-user/.gem/ruby/2.2/gems/ami_spec-0.3.0/lib/ami_spec.rb:53:in `run'
     # /home/ec2-user/.gem/ruby/2.2/gems/ami_spec-0.3.0/lib/ami_spec.rb:121:in `invoke'

Finished in 1 minute 7.63 seconds (files took 2 minutes 3.9 seconds to load)
58 examples, 3 failures

Failed examples:

rspec ./spec/Redis/redis_spec.rb:16 # Redis Server redis server Command "redis-cli incr something" exit_status should eq 0
rspec ./spec/Redis/redis_spec.rb:17 # Redis Server redis server Command "redis-cli incr something" stderr should be empty
rspec ./spec/Redis/redis_spec.rb:18 # Redis Server redis server Command "redis-cli incr something" stdout should match /^1$/

With fix:

+ bundle exec ami_spec --role Redis --ami ami-#### --subnet-id subnet-4a91dc03 --key-name test --aws-instance-type t2.micro --key-file test.pem --ssh-user ec2-user --aws-security-groups sg-### -t 120 --specs ./spec
boo!
Running tests for Redis
..........................................................

Finished in 1 minute 8.99 seconds (files took 1 minute 55.05 seconds to load)
58 examples, 0 failures