Giter Site home page Giter Site logo

puppet-redis's People

Contributors

barruumrex avatar billmoritz avatar bleuchtang avatar bovy89 avatar buzzdeee avatar cdenneen avatar derdanne avatar dwerder avatar hskwirblies avatar huandu avatar infraded avatar jlindquist-godaddy avatar joekohlsdorf avatar joshbeard avatar lampapetrol avatar matthiaswiesner avatar mwillson2 avatar obliadp avatar pbrit avatar pulyaevskiy avatar pwx21 avatar quixoten avatar rubyisbeautiful avatar tomeklaskarzewski avatar vchan-cylance avatar vide avatar voroniys avatar zbstof avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-redis's Issues

Compile Error - Validation of Exec[Make dir /opt] failed

Getting the following on it { should compile } in my tests

Failure/Error: it { should compile }
error during compilation: Validation of Exec[Make dir /opt] failed: 'mkdir -p /opt' is not qualified and no path was specified. Please qualify the command or specify a path.

I also had to specifically call in 'epel-release' in order to get it to do anything, should this be installed by your module?

class { '::redis::install':
    redis_version     => $redis_version,
    redis_build_dir   => '/opt',
    redis_install_dir => '/usr/bin',
    require           => Package['epel-release'],
  }

Any suggestions?

with custom instance but default one keeps running

Hello,

I try to use your Puppet module on Debian 7 running Puppet 3.4. My tests use Vagrant.
I want to use the Debian packaged Redis version, and to configure my redis server to listen to all IPs, so I use the following code:

class { 'redis::install':
    redis_version   => '2:2.8.17-1~bpo70+1+b1',
    redis_package   => true,
}
redis::server {
    'master':
        redis_ip    => '0.0.0.0',
        redis_port  => 6400,
        running     => true,
        enabled     => true,
}

I thought the init.d file for the default server (/etc/init.d/redis-server) would be remove which is not the case, and in fact in my machine only the default redis server is running not my configured instance

# netstat -utpln
Proto Recv-Q Send-Q Adresse locale          Adresse distante        Etat        PID/Program name
tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN      2080/redis-server 1

I changed the port to 6400 to see if 2 instances will run, but it's not the case, even if I have 2 init files (one redis-server, one redis-server_master)

If I try to launch /etc/init.d/redis-server_master it won't work. If I stop the default one, I can start it.

I may have missed something in the documentation and my code may be wrong somewhere.
Could you tell me how I can:

  • not have the default server run, maybe even not have its init file?
  • have my configured one runs, and be 'monitored' by Puppet?

Thanks.

Dependency Failures

Provisioning gives several dependency errors despite having stdlib 4.6.0 installed. Shouldn't these be automatically installed by the puppet module?

Installation:

puppet module install --force --target-dir /usr/share/puppet/modules dwerder/redis

Puppet declaration:

class { 'redis::install':
redis_version => '3.0.2',
}

Errors:

==> dev: Warning: /Stage[main]/Redis::Install/Anchor[redis::prepare_build]: Skipping because of failed dependencies
==> dev: Warning: /Stage[main]/Redis::Install/Exec[redis::compile]: Skipping because of failed dependencies
==> dev: Warning: /Stage[main]/Redis::Install/File[/opt/redis]: Skipping because of failed dependencies
==> dev: Warning: /Stage[main]/Redis::Install/Anchor[redis::install]: Skipping because of failed dependencies
==> dev: Warning: /Stage[main]/Redis::Install/Redis::Installbinary[redis-cli]/File[/usr/bin/redis-cli]: Skipping because of failed dependencies
==> dev: Warning: /Stage[main]/Redis::Install/Redis::Installbinary[redis-check-aof]/File[/usr/bin/redis-check-aof]: Skipping because of failed dependencies
==> dev: Warning: /Stage[main]/Redis::Install/Redis::Installbinary[redis-sentinel]/File[/usr/bin/redis-sentinel]: Skipping because of failed dependencies
==> dev: Warning: /Stage[main]/Redis::Install/Redis::Installbinary[redis-server]/File[/usr/bin/redis-server]: Skipping because of failed dependencies
==> dev: Warning: /Stage[main]/Redis::Install/Redis::Installbinary[redis-check-dump]/File[/usr/bin/redis-check-dump]: Skipping because of failed dependencies
==> dev: Warning: /Stage[main]/Redis::Install/Redis::Installbinary[redis-benchmark]/File[/usr/bin/redis-benchmark]: Skipping because of failed dependencies

Unit redis.service failed to load: No such file or directory

Manifest:

class { 'redis::install': }

redis::server {
    'master':
        requirepass => 'default',
}
[vagrant@localhost ~]$ sudo service redis status
Redirecting to /bin/systemctl status  redis.service
redis.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

[vagrant@localhost ~]$ sudo service redis start
Redirecting to /bin/systemctl start  redis.service
Failed to issue method call: Unit redis.service failed to load: No such file or directory.
[vagrant@localhost ~]$

After successful installation, redis does not start/cannot be started.

Server Not Starting

The puppet module is properly installing redis on my box but the redis::server configuration isn't getting set anywhere and the server isn't starting up. Is there something wrong with my configuration below? I'd prefer not to have to set init.d and conf files through puppet if this module can handle that setup for me.

node 'redis.my.server' {
     class { 'redis::install':
           redis_version => '2.8.8',
     }

     redis::server {
        'master':
            redis_name      => 'master',
            redis_memory    => '1g',
            redis_ip        => '0.0.0.0',
            redis_port      => 6379,
            running         => true,
            enabled         => true,
     }
}

redis-check-dump was renamed to redis-check-rdb in redis version 3.2

There is new version of redis which causes the module to fail on installation:

Error: /Stage[main]/Redis::Install/Redis::Installbinary[redis-check-dump]/File[/usr/bin/redis-check-dump]: Could not evaluate: Could not retrieve information from environment vagrant source(s) file:/opt/redis/redis-check-dump

redis-check-dump doesn't exists in redis 3.2

looks like redis-check-dump should be option:
Error: /Stage[main]/Redis::Install/Redis::Installbinary[redis-check-dump]/File[/usr/bin/redis-check-dump]: Could not evaluate: Could not retrieve information from environment production source(s) file:/opt/redis/redis/redis-check-dump

Failed to start on CentOS 7.2 after update to 1.8.0

After updating module to 1.8.0 I can't run redis on my CentOS 7.2. It doesn't even create log files. The only thing I have is log from systemctl status:
Apr 07 11:17:05 vagrant02.dev.pl systemd[1]: Failed to start Redis persistent key-value database server.

The machine is created with Vagrant using box puppetlabs/centos-7.2-64-puppet

This is my redis.pp:
https://gist.github.com/bkibilko/9c7914195d9b1c28c8e0a191ed3b5133

... and variables from hiera:
https://gist.github.com/bkibilko/14986c03a7b88a2d78a35fe70b25006f

After downgrading to 1.7.0 it works fine.

Dependency to puppetlabs-stdlib is missing

==> default: Debug: Runtime environment: puppet_version=3.7.2, ruby_version=2.0.0, run_mode=user, default_encoding=UTF-8
==> default: Debug: importing '/tmp/vagrant-puppet-3/modules-0/redis/manifests/init.pp' in environment production
==> default: Debug: importing '/tmp/vagrant-puppet-3/modules-0/redis/manifests/install.pp' in environment production
==> default: Debug: Automatically imported redis::install from redis/install into production
==> default: Debug: importing '/tmp/vagrant-puppet-3/modules-0/redis/manifests/params.pp' in environment production
==> default: Debug: Automatically imported redis::params from redis/params into production
==> default: Debug: hiera(): Hiera YAML backend starting
==> default: Debug: hiera(): Looking up redis::install::redis_version in YAML backend
==> default: Debug: hiera(): Looking for data source common
==> default: Debug: hiera(): Cannot find datafile /var/lib/hiera/common.yaml, skipping
==> default: Debug: hiera(): Looking up redis::install::redis_build_dir in YAML backend
==> default: Debug: hiera(): Looking for data source common
==> default: Debug: hiera(): Cannot find datafile /var/lib/hiera/common.yaml, skipping
==> default: Debug: hiera(): Looking up redis::install::redis_install_dir in YAML backend
==> default: Debug: hiera(): Looking for data source common
==> default: Debug: hiera(): Cannot find datafile /var/lib/hiera/common.yaml, skipping
==> default: Debug: hiera(): Looking up redis::install::redis_package in YAML backend
==> default: Debug: hiera(): Looking for data source common
==> default: Debug: hiera(): Cannot find datafile /var/lib/hiera/common.yaml, skipping
==> default: Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
==> default: Debug: Executing '/bin/rpm --version'
==> default: Debug: Executing '/bin/rpm -ql rpm'
==> default: Debug: Executing '/bin/rpm --version'
==> default: Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type anchor at /tmp/vagrant-puppet-3/modules-0/redis/manifests/install.pp:93 on node localhost
==> default: Wrapped exception:
==> default: Invalid resource type anchor
==> default: Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type anchor at /tmp/vagrant-puppet-3/modules-0/redis/manifests/install.pp:93 on node localhost
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

Using with https://vagrantcloud.com/puppetlabs/boxes/centos-7.0-64-puppet

Systemctl unable to start redis-server: Can't open the log file: Permission denied

Hi there,

I am using 1.9.0 version of this puppet-redis module to install and start Redis 3.2.3 server on CentOS 7 with puppet 3.8.7. The error shown below is logged to journalctl when puppet tries to start redis-server via systemd as root user (service config is shown at the bottom). I do not get any errors and redis-server starts up fine when I run /usr/bin/redis-server /var/run/redis/redis_redis1.conf --daemonize no as root.

Similar issues have been reported by others.

Any ideas on how to fix this?

systemd[1]: Starting Redis redis_redis1 database server...
systemd[1]: Started Redis redis_redis1 database server.
redis-server[30824]: *** FATAL CONFIG FILE ERROR ***
redis-server[30824]: Reading the configuration file, at line 52
redis-server[30824]: >>> 'logfile /var/log/redis/redis_redis1.log'
redis-server[30824]: Can't open the log file: Permission denied
systemd[1]: redis-server_redis1.service: main process exited, code=exited, status=1/FAILURE
>> cat /usr/lib/systemd/system/redis-server_redis1.service
[Unit]
Description=Redis redis_redis1 database server
After=network.target

[Service]
ExecStartPre=/bin/mkdir -p /var/run/redis
ExecStartPre=/bin/cp -u /etc/redis_redis1.conf /var/run/redis/redis_redis1.conf
ExecStart=/usr/bin/redis-server /var/run/redis/redis_redis1.conf --daemonize no
ExecStop=/usr/bin/redis-cli -p 6800 shutdown
User=root
Group=root

[Install]
WantedBy=multi-user.target
ls -lah /var/log/redis/redis_redis1.log
-rw-rw-r--. 1 redis redis 51K Sep 25 01:27 /var/log/redis/redis_redis1.log

ensure_packages requires an Array (Ubunut 14.04)

I'm using this to provision a Vagrant box on Ubuntu 14.04. This error kept appearing:

==> default: Error: ensure_packages(): Requires array given (String) at /tmp/vagrant-puppet/modules-25122be7f814d9df3db6ebc5babb457c/redis/manifests/install.pp:67 on node vagrant-ubuntu-trusty-64

I was able to fix this by changing line 67 in manifests/install.pp:

67: ensure_packages('build-essential') 

to

67: ensure_packages(['build-essential'])

port to Foreman

i use the foreman to manage my infra , i tryed port creating a class over ther module to can show on the foreman , but i got issues fist , i create a 2 class one for master and other for slave server , but they are instaling both files in all server , can you help me ?

Duplicate declaration on build-essential

Hi there,
Still relatively new to puppet, I seem to have a little issue with puppet-reddis :

Error: Evaluation Error: Error while evaluating a Function Call, 
Duplicate declaration: Package[build-essential] is already declared in file /local/puppet/modules/common/manifests/virtual_packages.pp:3; cannot redeclare at /local/puppet/modules/redis/manifests/install.pp:67 at /local/puppet/modules/redis/manifests/install.pp:67:9 on node XXXX

Version of puppet

/opt/puppetlabs/puppet/bin/puppet --version
2017-03-27 08:30:33.725348 WARN  puppetlabs.facter - locale environment variables were bad; continuing with LANG=C LC_ALL=C
4.9.4

Version of Linux

lsb_release -d
Description:	Ubuntu 16.04.2 LTS

It seems that these lines are causing the troubles :

'Debian', 'Ubuntu' : {
        ensure_packages('build-essential')
        Package['build-essential'] -> Anchor['redis::prepare_build']
      }

Duplicate declaration: Exec[systemd_service_{name}_preset]

On CentOS 7, there is potential for a duplicate Exec declaration when setting up the systemd script if both server and sentinel live on the same server and share the same name.

This results in duplicate declaration error:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Exec[systemd_service_ola_preset] is already declared in file /etc/puppet/environments/ola/modules/redis/manifests/server.pp:180; cannot redeclare at /etc/puppet/environments/ola/modules/redis/manifests/sentinel.pp:103 at /etc/puppet/environments/ola/modules/redis/manifests/sentinel.pp:103:5 on node a2dlolaredis01.cloud.iad2.gdg
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Example:

redis::servers:
  'ola':
    requirepass: <somepass>
    running: true
    enabled: true
    redis_ip: '0.0.0.0'
    redis_port: '6379'
    redis_memory: '4g'
redis::sentinel { 'ola':
    running       => true,
    enabled       => true,
    sentinel_ip   => '0.0.0.0',
    sentinel_port => 26379,
    monitors      => {
      'ola' => {
        master_host             => '10.26.85.58',
        master_port             => 6379,
        quorum                  => 2,
        down_after_milliseconds => 10000,
        parallel-syncs          => 1,
        failover_timeout        => 60000,
        auth-pass               => <somepass>
      }
    }
  }

See:
https://github.com/echocat/puppet-redis/blob/master/manifests/server.pp#L211
https://github.com/echocat/puppet-redis/blob/master/manifests/sentinel.pp#L113

spec test fails to compile

I saw issue #36 and I have the same problem. I looked at your spec test and I don't see $::path defined there. How are your tests passing?

Also, isn't it best practice to use a File resource or ensure_resource were used instead of exec?

file { 'redis build directory' : 
  path => $redis_build_dir,
  ensure => 'directory',
}

or

ensure_resource('file', "${redis_build_dir}", { 'ensure' => 'present' })

sentinel conf error with multiple monitors and optional params

Hi,
multiple sentinel monitors and optional params (like auth-pass), generate this configuration:

# monitor master_instance_1
sentinel monitor master_instance_1 127.0.0.1  6379 2
sentinel down-after-milliseconds master_instance_1 60000
sentinel parallel-syncs master_instance_1 1
sentinel failover-timeout master_instance_1 180000
sentinel auth-pass master_instance_1 superstrongpassword1# monitor master_instance_2
sentinel monitor master_instance_2 127.0.0.1  6380 2
sentinel down-after-milliseconds master_instance_2 60000
sentinel parallel-syncs master_instance_2 1
sentinel failover-timeout master_instance_2 180000
sentinel auth-pass master_instance_2 superstrongpassword2# monitor master_instance_3
sentinel monitor master_instance_3 127.0.0.1  6381 2
sentinel down-after-milliseconds master_instance_3 60000
sentinel parallel-syncs master_instance_3 1
sentinel failover-timeout master_instance_3 180000

instead of this one:

# monitor master_instance_1
sentinel monitor master_instance_1 127.0.0.1  6379 2
sentinel down-after-milliseconds master_instance_1 60000
sentinel parallel-syncs master_instance_1 1
sentinel failover-timeout master_instance_1 180000
sentinel auth-pass master_instance_1 superstrongpassword1

# monitor master_instance_2
sentinel monitor master_instance_2 127.0.0.1  6380 2
sentinel down-after-milliseconds master_instance_2 60000
sentinel parallel-syncs master_instance_2 1
sentinel failover-timeout master_instance_2 180000
sentinel auth-pass master_instance_2 superstrongpassword2

# monitor master_instance_3
sentinel monitor master_instance_3 127.0.0.1  6381 2
sentinel down-after-milliseconds master_instance_3 60000
sentinel parallel-syncs master_instance_3 1
sentinel failover-timeout master_instance_3 180000

Sentinel service cannot start.

Module version: 1.9.0
Puppet version: not relevant

CentOS 6: /var/run/redis directory not created

Using a manifest like this:

  redis::server { "${env}-redis-${port}" :
    redis_memory => $memory,
    redis_ip     => $ip,
    redis_port   => $port,
    requirepass  => $password,
    running      => true,
    enabled      => true,
    redis_nr_dbs => 2
  }

On CentOS 6, the /var/run/redis directory is not created and the puppet agent run fails when it can't copy the /etc/redis.conf to that that directory. I fixed it by putting the following at the top of my manifest:

file { '/var/run/redis' :
    ensure => 'directory',
  }

Should be using ensure_packages when installing packages

==> default: Error: Duplicate declaration: Package[make] is already declared in file /tmp/vagrant-puppet-3/modules-0/redis/manifests/install.pp:42; cannot redeclare at /tmp/vagrant-puppet-3/modules-0/nodejs/manifests/install.pp:149 on node localhost
==> default: Error: Duplicate declaration: Package[make] is already declared in file /tmp/vagrant-puppet-3/modules-0/redis/manifests/install.pp:42; cannot redeclare at /tmp/vagrant-puppet-3/modules-0/nodejs/manifests/install.pp:149 on node localhost

Consider using https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/lib/puppet/parser/functions/ensure_packages.rb or manually checking that packages are not already installed.

Missing newline in Sentinel template causes syntax error in config

There is a missing newline in the Sentinel template where monitors are setup (https://github.com/echocat/puppet-redis/blob/master/templates/etc/sentinel.conf.erb#L26-L37). When multiple monitors are setup, this leads to a syntax error in the config and a failure for Sentinel to start up properly. See snipped below for what the final output looks like with 2 sentinels configured

# monitor cache
sentinel monitor cache 10.32.155.112  6379 1
sentinel down-after-milliseconds cache 5000
sentinel parallel-syncs cache 1
sentinel failover-timeout cache 30000
sentinel auth-pass cache <removed># monitor jobs   <<< Syntax error
sentinel monitor jobs 10.32.155.112  6381 1
sentinel down-after-milliseconds jobs 5000
sentinel parallel-syncs jobs 1
sentinel failover-timeout jobs 30000
sentinel auth-pass jobs <removed>

I will have a PR ready shortly that should address this easily enough by adding a line break at the end of the loop

Ubuntu installation doesn't work

Error: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold --force-yes install redis=2.8.4-2' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package redis

it should be "redis-server".

P.

Add support for setting niceness

Support niceness in the systemd unit file, example:

diff --git a/templates/systemd/redis.service.erb b/templates/systemd/redis.service.erb
index caa55b6..1fce7b8 100644
--- a/templates/systemd/redis.service.erb
+++ b/templates/systemd/redis.service.erb
@@ -9,6 +9,7 @@ ExecStart=/usr/bin/redis-server <%= @redis_run_dir %>/<%= @conf_file_name %> --d
 ExecStop=/usr/bin/redis-cli -p <%= @redis_port %> shutdown
 User=<%= @redis_user or 'root' %>
 Group=<%= @redis_group or 'root' %>
+Nice=<%= @niceness or 0 %>

 [Install]
 WantedBy=multi-user.target

Sentinel configuration issues

Two issues spot here:

1.) The sentinel config template "templates/etc/sentinel.conf.erb" should refer to the monitor variables as follow:
@monitors.sort.each do |name, rule| %>

2.) In the case of using sentinel, then the redis config file should allow sentinel to manage:
File["/etc/redis_${redis_name}.conf"] { replace => false, }

Typos

manifests/server.pp:199 and 203
$::operatingsystemmajrelease is a string and may not be compared to an integer.

templates/systemd/sentinel.service.erb:2
"sentinel_name" needs to be "@sentinel_name"

Redis 2.8.19 does not understand "cluster-require-full-coverage"

Add support for binding to NUMA

Support numactl in the systemd unit file, example:

diff --git a/templates/systemd/redis.service.erb b/templates/systemd/redis.service.erb
index caa55b6..bd84f27 100644
--- a/templates/systemd/redis.service.erb
+++ b/templates/systemd/redis.service.erb
@@ -5,10 +5,15 @@ After=network.target
 [Service]
 ExecStartPre=/bin/mkdir -p <%= @redis_run_dir %>
 ExecStartPre=/bin/cp -u <%= @conf_file %> <%= @redis_run_dir %>/<%= @conf_file_name %>
+<% if @numactl_enable -%>
+ExecStart=/usr/bin/numactl --cpubind=<%= @numactl_node %> --membind=<%= @numactl_node 
 %> /usr/bin/redis-server <%= @redis_run_dir %>/<%= @conf_file_name %> --daemonize no
+<% else %>
 ExecStart=/usr/bin/redis-server <%= @redis_run_dir %>/<%= @conf_file_name %> --daemonize no
+<% end -%>
 ExecStop=/usr/bin/redis-cli -p <%= @redis_port %> shutdown
 User=<%= @redis_user or 'root' %>
 Group=<%= @redis_group or 'root' %>

+
 [Install]
 WantedBy=multi-user.target

Systemd (Debian Jessie) not starting instances automatically

I've got:
redis::server {
'ta-app':
redis_memory => '2g',
redis_ip => '10.130.46.184',
redis_port => '6379',
redis_mempolicy => 'allkeys-lru',
redis_timeout => 0,
redis_nr_dbs => 16,
redis_loglevel => 'notice',
running => true,
enabled => true,
....

This should start, however, it doesn't, when running the agent with debugging enabled:
Debug: Executing '/usr/sbin/service redis-server_ta-app start'
Error: Could not start Service[redis-server_ta-app]: Execution of '/usr/sbin/service redis-server_ta-app start' returned 6: Failed to start redis-server_ta-app.service: Unit redis-server_ta-app.service failed to load: No such file or directory.
Wrapped exception:
Execution of '/usr/sbin/service redis-server_ta-app start' returned 6: Failed to start redis-server_ta-app.service: Unit redis-server_ta-app.service failed to load: No such file or directory.
Error: /Stage[main]/Main/Node[ta-application-01]/Redis::Server[ta-app]/Service[redis-server_ta-app]/ensure: change from stopped to running failed: Could not start Service[redis-server_ta-app]: Execution of '/usr/sbin/service redis-server_ta-app start' returned 6: Failed to start redis-server_ta-app.service: Unit redis-server_ta-app.service failed to load: No such file or directory.
Debug: Executing '/usr/sbin/service redis-server_ta-app status'

This could be solved by letting the systemctl do an enable command when first installing / preparing:

systemctl enable redis-server_ta-app
Synchronizing state for redis-server_ta-app.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d redis-server_ta-app defaults
insserv: warning: script 'redis-server_ta-app' missing LSB tags and overrides
Executing /usr/sbin/update-rc.d redis-server_ta-app enable
update-rc.d: error: redis-server_ta-app Default-Start contains no runlevels, aborting.

/etc/init.d/redis-server_ta-app start
[ ok ] Starting redis-server_ta-app (via systemctl): redis-server_ta-app.service.

Would it be possible to update this?

redis::server thinks that OracleLinux 6 has systemd

I just started using this module, so this may be answered somewhere else that I have found yet. But, in the case that this hasn't been documented yet, here's what's happening to me:

Environment:

  • $::operatingsystem => OracleLinux
  • $::operatingsystemmajrelease => 6
  • Puppet version => 4.10.10
  • mod 'dwerder-redis', '2.1.0'

Manifest where I'm using your module:

  class {'redis::install':
    redis_build_dir   => '/opt',
    redis_user        => 'apache',
    redis_group       => 'webadmin',
  }
  redis::server {'webapps':
    redis_memory    => '512mb',
    redis_ip        => '127.0.0.1',
    redis_port      => 6379,
    redis_nr_dbs    => 16,
    running         => true,
    enabled         => true,
  }

Error message being presented:
Error: Could not set 'file' on ensure: No such file or directory @ dir_s_mkdir - /usr/lib/systemd/system/redis-server_webapps.service20180403-41151-wnw22o.lock at /etc/puppetlabs/code/environments/pg_alter_redis/modules/redis/manifests/server.pp:235

I looked into the code in this repository at manifests/server.pp, and line 235 is inside a file declaration for $service_file. That variable, along with $has_systemd, gets defined in a case block in lines 200-223. The relevant section:

    'Fedora', 'RedHat', 'CentOS', 'OEL', 'OracleLinux', 'Amazon', 'Scientific': {
      if versioncmp($::operatingsystemmajrelease, '7') >= 0 {
        $has_systemd = true
        $service_file = "/usr/lib/systemd/system/redis-server_${redis_name}.service"
      }
    }

So, to my untrained eye, it appears that the OracleLinux 6 VM is being interpreted by this case statement to have a major version of 7 and thus $has_systemd is getting set to true and then it's trying to create $service_file when it shouldn't.

Do you have any insight on what might be happening, or how to resolve it? Thanks!

Update-rc.d fails on Debian Squeeze with munin-node package installed

Hi,

we encountered an issue today while having munin-node package installed on Debian Squeeze. The Problem is, that update-rc.d fins a loop and stops adding the redis sysvinit scripts. The Issue looks like this:

err: /Stage[main]//Node[redisserver]/Redis::Server[production]/Service[redis-server_production]/enable: change from false to true failed: Execution of '/usr/sbin/update-rc.d redis-server_production defaults' returned 1: update-rc.d: using dependency based boot sequencing
insserv: warning: script 'redis-server_production' missing LSB tags and overrides
insserv: warning: script 'redis-server_staging' missing LSB tags and overrides
insserv: There is a loop between service munin-node and redis-server_production if stopped
insserv: loop involving service redis-server_production at depth 2
insserv: loop involving service munin-node at depth 1
insserv: Stopping redis-server_production depends on munin-node and therefore on system facility $all' which can not be true! insserv: Stopping redis-server_staging depends on munin-node and therefore on system facility$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header

I was able to fix this by adding a proper INIT INFO part at the begin of the init-script. You can see my manual fix here: https://github.com/martinseener/puppet-redis/blob/master/templates/etc/init.d/debian_redis-server.erb.

If you like this fix, i can create a PR for you. Otherwise add it yourself or just close this issue. The fix i made works perfectly by the way.

Unit is not loaded properly: Bad message

Hello, after installing I got the message like in the subject.
Also

systemctl status redis-server_master.service
● redis-server_master.service
   Loaded: error (Reason: Bad message)
   Active: inactive (dead)

Feb 21 16:02:55 vmredisuk1 systemd[1]: [/usr/lib/systemd/system/redis-server_master.service:19] Invalid section header '[ "$NETWORKING" = "no" ] && exit 0'
Feb 21 16:05:13 vmredisuk1 systemd[1]: [/usr/lib/systemd/system/redis-server_master.service:13] Assignment outside of section. Ignoring.
Feb 21 16:05:13 vmredisuk1 systemd[1]: [/usr/lib/systemd/system/redis-server_master.service:16] Assignment outside of section. Ignoring.
Feb 21 16:05:13 vmredisuk1 systemd[1]: [/usr/lib/systemd/system/redis-server_master.service:19] Invalid section header '[ "$NETWORKING" = "no" ] && exit 0'
Feb 21 16:07:21 vmredisuk1 systemd[1]: [/usr/lib/systemd/system/redis-server_master.service:13] Assignment outside of section. Ignoring.
Feb 21 16:07:21 vmredisuk1 systemd[1]: [/usr/lib/systemd/system/redis-server_master.service:16] Assignment outside of section. Ignoring.
Feb 21 16:07:21 vmredisuk1 systemd[1]: [/usr/lib/systemd/system/redis-server_master.service:19] Invalid section header '[ "$NETWORKING" = "no" ] && exit 0'
Feb 21 16:07:28 vmredisuk1 systemd[1]: [/usr/lib/systemd/system/redis-server_master.service:13] Assignment outside of section. Ignoring.
Feb 21 16:07:28 vmredisuk1 systemd[1]: [/usr/lib/systemd/system/redis-server_master.service:16] Assignment outside of section. Ignoring.
Feb 21 16:07:28 vmredisuk1 systemd[1]: [/usr/lib/systemd/system/redis-server_master.service:19] Invalid section header '[ "$NETWORKING" = "no" ] && exit 0'

I have CentOS Linux release 7.3.1611 and Puppet 3.8.7

Centos6.4 redis 3.2 can not work

Hi, thank you great modules.

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Cannot reassign variable service_file at /etc/puppet/environments/production/modules/redis/manifests/server.pp:228 on node vm_13_72_centos
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

First:

node 'vm_13_72_centos' {

  class { 'redis::install':
    redis_version     => '3.2.1',
    redis_build_dir   => '/opt',
    redis_install_dir => '/usr/bin'
  }

can be work !

Step2: add instance

  redis::server {
    'testing':
      redis_memory    => '12m',
      redis_ip        => '10.135.13.72',
      redis_port      => 6379,
      redis_mempolicy => 'allkeys-lru',
      redis_timeout   => 0,
      redis_nr_dbs    => 16,
      redis_loglevel  => 'notice',
      running         => true,
      enabled         => true
  }

can not work .

puppet 2.7

Add support for yum options

Hello,

I'm getting the redis rpm from the remi repo which is disabled by default. In order to install from this repo yum needs the additional option --enablerepo=remi. I've created a branch that allows yum options to be passed in via a class parameter for such a situation. If you think this would be a good option I can create a PR.

https://github.com/rmacduff/puppet-redis/tree/add_yum_options

BTW, by far this is the best redis module out there! It's made installing and configuring redis for my testing really easy.

-Ross

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.