fsalum / puppet-redis

Redis Server Module for Puppet
Apache License 2.0
20 stars 68 forks source link

how do i set version #38

Closed rudymccomb closed 10 years ago

rudymccomb commented 10 years ago

i've been trying 'redis_version_override', 'version', 'redis_version' => 2.8

i keep getting 'Invalid parameter'. how do i ensure the version of redis that i want.

thanks

gaga-github commented 10 years ago

You need the full version 2.8.x Here is the list: http://download.redis.io/releases/

=> 2.8.15

fsalum commented 10 years ago

@rudymccomb the redis_version_override parameter of the module wasn't released to forge yet (release 1.0.0)

install the redis module from this repo and try again..let me know how it goes then I will bump a new minor version and push to forge.

rudymccomb commented 10 years ago

@fsalum i installed from this repo and now all it does is lock up when puppet is attempting to start redis..

Info: Applying configuration version '1410819159'
Notice: /Stage[main]/Epel/File[/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6]/ensure: defined content as '{md5}d865e6b948a74cb03bc3401c0b01b785'
Debug: /Stage[main]/Epel/File[/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6]: The container Class[Epel] will propagate my refresh event
Debug: Exec[import-EPEL-6](provider=posix): Executing check 'rpm -q gpg-pubkey-$(echo $(gpg --throw-keyids < /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6) | cut --characters=11-18 | tr '[A-Z]' '[a-z]')'
Debug: Executing 'rpm -q gpg-pubkey-$(echo $(gpg --throw-keyids < /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6) | cut --characters=11-18 | tr '[A-Z]' '[a-z]')'
Debug: /Stage[main]/Epel/Epel::Rpm_gpg_key[EPEL-6]/Exec[import-EPEL-6]/unless: package gpg-pubkey-0608b895 is not installed
Debug: Exec[import-EPEL-6](provider=posix): Executing 'rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6'
Debug: Executing 'rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6'
Notice: /Stage[main]/Epel/Epel::Rpm_gpg_key[EPEL-6]/Exec[import-EPEL-6]/returns: executed successfully
Debug: /Stage[main]/Epel/Epel::Rpm_gpg_key[EPEL-6]/Exec[import-EPEL-6]: The container Epel::Rpm_gpg_key[EPEL-6] will propagate my refresh event
Debug: Epel::Rpm_gpg_key[EPEL-6]: The container Class[Epel] will propagate my refresh event
Debug: Prefetching inifile resources for yumrepo
Notice: /Stage[main]/Epel/Yumrepo[epel-testing-debuginfo]/ensure: created
Info: changing mode of /etc/yum.repos.d/epel-testing-debuginfo.repo from 600 to 644
Debug: /Stage[main]/Epel/Yumrepo[epel-testing-debuginfo]: The container Class[Epel] will propagate my refresh event
Notice: /Stage[main]/Epel/Yumrepo[epel-source]/ensure: created
Info: changing mode of /etc/yum.repos.d/epel-source.repo from 600 to 644
Debug: /Stage[main]/Epel/Yumrepo[epel-source]: The container Class[Epel] will propagate my refresh event
Notice: /Stage[main]/Epel/Yumrepo[epel]/ensure: created
Info: changing mode of /etc/yum.repos.d/epel.repo from 600 to 644
Debug: /Stage[main]/Epel/Yumrepo[epel]: The container Class[Epel] will propagate my refresh event
Notice: /Stage[main]/Redis/File[/etc/logrotate.d/redis]/ensure: defined content as '{md5}7b5aef50c388783e67cb48f50ec270f4'
Debug: /Stage[main]/Redis/File[/etc/logrotate.d/redis]: The container Class[Redis] will propagate my refresh event
Debug: Prefetching yum resources for package
Debug: Executing '/bin/rpm --version'
Debug: Executing '/bin/rpm -qa --nosignature --nodigest --qf '%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n''
Debug: Executing '/bin/rpm -q redis --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'
Debug: Executing '/usr/bin/yum -d 0 -e 0 -y list redis'
Debug: Package[redis](provider=yum): Ensuring => present
Debug: Executing '/usr/bin/yum -d 0 -e 0 -y install redis'
Notice: /Stage[main]/Redis/Package[redis]/ensure: created
Debug: /Stage[main]/Redis/Package[redis]: The container Class[Redis] will propagate my refresh event
Info: /Stage[main]/Redis/File[/etc/redis.conf]: Filebucketed /etc/redis.conf to puppet with sum 1b59697dc32ec93399fb1828553e5f97
Notice: /Stage[main]/Redis/File[/etc/redis.conf]/content: content changed '{md5}1b59697dc32ec93399fb1828553e5f97' to '{md5}68b329da9893e34099c7d8ad5cb9c940'
Debug: /Stage[main]/Redis/File[/etc/redis.conf]: The container Class[Redis] will propagate my refresh event
Info: /Stage[main]/Redis/File[/etc/redis.conf]: Scheduling refresh of Service[redis]
Notice: /Stage[main]/Epel/Yumrepo[epel-testing-source]/ensure: created
Info: changing mode of /etc/yum.repos.d/epel-testing-source.repo from 600 to 644
Debug: /Stage[main]/Epel/Yumrepo[epel-testing-source]: The container Class[Epel] will propagate my refresh event
Notice: /Stage[main]/Epel/Yumrepo[epel-debuginfo]/ensure: created
Info: changing mode of /etc/yum.repos.d/epel-debuginfo.repo from 600 to 644
Debug: /Stage[main]/Epel/Yumrepo[epel-debuginfo]: The container Class[Epel] will propagate my refresh event
Notice: /Stage[main]/Epel/Yumrepo[epel-testing]/ensure: created
Info: changing mode of /etc/yum.repos.d/epel-testing.repo from 600 to 644
Debug: /Stage[main]/Epel/Yumrepo[epel-testing]: The container Class[Epel] will propagate my refresh event
Notice: /Stage[main]/Redis/File[/var/lib/redis/]/group: group changed 'root' to 'redis'
Debug: /Stage[main]/Redis/File[/var/lib/redis/]: The container Class[Redis] will propagate my refresh event
Debug: Executing '/sbin/service redis status'
Debug: Executing '/sbin/chkconfig redis'
Debug: Executing '/sbin/service redis start'
^C^C^C
[vagrant@d634rl1 ~]$ sudo service redis restart
Stopping redis-server:                                     [FAILED]
Starting redis-server: [2740] 15 Sep 22:17:42 # Opening port 6379: bind: Address already in use
                                                           [FAILED]
[vagrant@d634rl1 ~]$ 

puppet doesnt finish the install and it hangs. im on centos.

fsalum commented 10 years ago

Can you make sure that "sudo service redis restart" works before running puppet ? kill redis, then try to start it, then restart.. make sure there is nothing wrong with redis before running puppet.

rudymccomb commented 10 years ago

@fsalum im noticing that redis.conf is an empty file after the puppet run

rudymccomb commented 10 years ago

@fsalum here's the output so far. "sudo service redis restart" does not work when i set

redis_version_override => '2.8.15',

this results in system hanging when puppet is trying to start redis and there ends up being a empty /etc/redis.conf

when i install redis using

  class { 'redis':
     conf_port => '6379',
    conf_bind => '0.0.0.0',
    #redis_version_override => '2.8.15',
  }

redis.conf gets populated, redis says its been started but when i check the status i get "redis-server is stopped"

[vagrant@d634rl1 ~]$ sudo puppet apply /etc/puppet/init.pp 
find: invalid predicate -context: SELinux is not enabled.
Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
Notice: Compiled catalog for d634rl1.foo.com in environment production in 1.85 seconds
Warning: The package type's allow_virtual parameter will be changing its default value from false to true in a future release. If you do not want to allow virtual packages, please explicitly set allow_virtual to false.
   (at /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:816:in `set_default')
Notice: /Stage[main]/Redis/File[/etc/redis.conf]/content: content changed '{md5}68b329da9893e34099c7d8ad5cb9c940' to '{md5}e124ffcc27724697e852ec4bffc5458d'
Notice: /Stage[main]/Redis/Service[redis]/ensure: ensure changed 'stopped' to 'running'
Notice: Finished catalog run in 0.93 seconds
[vagrant@d634rl1 ~]$ sudo service redis status
redis-server is stopped
[vagrant@d634rl1 ~]$ sudo less /etc/re
readahead.conf    redhat-release    redis.conf        request-key.conf  request-key.d/    resolv.conf       
[vagrant@d634rl1 ~]$ sudo less /etc/redis.conf 
[vagrant@d634rl1 ~]$ sudo service redis start
Starting redis-server:                                     [  OK  ]
[vagrant@d634rl1 ~]$ sudo service redis status
redis-server is stopped
[vagrant@d634rl1 ~]$ sudo service redis-server status
redis-server: unrecognized service
[vagrant@d634rl1 ~]$ sudo service redis-server restart
redis-server: unrecognized service
[vagrant@d634rl1 ~]$ sudo service redis restart
Stopping redis-server:                                     [FAILED]
Starting redis-server:                                     [  OK  ]
[vagrant@d634rl1 ~]$ sudo service redis-server status
redis-server: unrecognized service
[vagrant@d634rl1 ~]$ sudo service redis status
redis-server is stopped
[vagrant@d634rl1 ~]$ 
fsalum commented 10 years ago

how did you install redis on that host ? yum from repo ?

rudymccomb commented 10 years ago

i installed using this module. crazy thing is it works fine as long as i dont specify what version to install.

fsalum commented 10 years ago

do you have the version you are specifying in the repository ?

rudymccomb commented 10 years ago

fsalum, thanks the repo was one issue. the other was, that i was trying to pull from IUS. so redis28u, is what was available and i had

=> '28u',

instead of

=> 'redis28u',

basic linux, checking the repo for the available version. thanks @fsalum

when will this new version be available in the forge?

fsalum commented 10 years ago

Just pushed it to forge, version 1.0.1