-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sentinel support broken? #166
Comments
This is puppet 4 master and my servers are ubuntu 16.04 |
@KlavsKlavsen I haven't looked at the sentinal work for a while, could you try the following change: diff --git a/manifests/sentinel.pp b/manifests/sentinel.pp
index 617dfc4..298c647 100644
--- a/manifests/sentinel.pp
+++ b/manifests/sentinel.pp
@@ -190,11 +190,7 @@ class redis::sentinel (
$client_reconfig_script = $::redis::params::sentinel_client_reconfig_script,
) inherits redis::params {
- unless defined(Package[$package_name]) {
- ensure_resource('package', $package_name, {
- 'ensure' => $package_ensure
- })
- }
+ require redis |
I'm also adding in an acceptance test for a basic sentinel setup 👍 |
that gives Class[Redis] is already declared; Duplicate declaration: Class[Redis] is already declared; cannot redeclare.. if I remove it - and don't insert "require redis" - then it runs. Next is that redis::sentinel is adding an init script (kinda odd when in systemd land :) - and when systemd starts it - it says all is good.. except /usr/sbin/redis-sentinel binary does not exist.. I'm assuming the sentinel support actually works that way as sentinel was seperate from redis before 3.0? I assume module was suppose to create symlink /usr/bin/redis-sentinel - pointing to redis binary? (or just run redis with --sentinel option) ? |
Are you running sentinel cluster mode instead? |
Basically, this is because of different packaging standards:
So you could use Puppet to create this symlink. I would say I don't know enough about sentinel to accurately test this. I will open a PR to change the package requirement to be an include of redis. |
I believe this was fixed by #171 and an additional acceptance test was added, if not I'll re-open |
When doing this:
class { 'redis::sentinel':
master_name => $master_name,
redis_host => $redis_master,
failover_timeout => $failover_timeout,
}
class { 'redis':
bind => $listen_ip,
slaveof => $redis_master ? {
"$fqdn" => undef,
default => "$redis_master 6379"
}
}
to setup my hosts - with one being set to master- and redis-sentinel setup on same host.. puppet dies with:
Duplicate declaration: Package[redis-server] - as its both defined in install.pp and in redis::sentinel
I assume someone have used redis with sentinel with this module before, and I'm just understanding the documentation wrong?
The text was updated successfully, but these errors were encountered: