Giter Site home page Giter Site logo

asher256 / puppet-redis_cluster Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 3.0 71 KB

Install multiple redis instances via Puppet to configure a cluster with redis-trib.rb (for Redis version >= 3.0)

License: Apache License 2.0

Ruby 67.22% Puppet 27.34% Shell 5.07% HTML 0.37%
debian puppet redis redis-cluster redis-configuration redis-server redis-trib

puppet-redis_cluster's People

Contributors

asher256 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

puppet-redis_cluster's Issues

Dependency loop for redis_cluster instance definition?

Hi,

I've been trying to set up a redis cluster through using this module. In hiera, I have defined an array as follows:

# redis node config
redis_cluster::instances:
  'master_6379':
    ip: '10.0.5.9'
    port: '6379'
  'master_6380':
    ip: '10.0.5.10'
    port: '6380'

Whenever I run this on the node in question, this results in a dependency loop:

node1 /root # pa -tv --environment=redis_cluster_stage --graph
Info: Using configured environment 'redis_cluster_stage'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for node1
Info: Applying configuration version '1481542006'
Error: Failed to apply catalog: Found 1 dependency cycle:
(File[/lib/systemd/system/redis-server-master_6379.service] => Redis_cluster::Instance::Service[master_6379] => Redis_cluster::Instance[master_6379] => Class[Redis_cluster::Load_instances] => Redis_cluster::Instance::Service[master_6379] => File[/lib/systemd/system/redis-server-master_6379.service])
Try the '--graph' option and opening the resulting '.dot' file in OmniGraffle or GraphViz

The dotfile looks as follows:
screen shot 2016-12-12 at 12 39 45

Which to me looks like the systemd file, depends on the redis-server-${name} resource, which in turn depends back on the redis_cluster instance service resource, and back on the systemd file.

In the puppet code I have seen the following:

    redis_port => $redis_port,
    require    =>  [Class['::redis_cluster::repos'],
                    Class['::redis_cluster::install'],
                    Class['::redis_cluster::load_instances'],
                    Augeas["update ${redis_config}"]],
  }

When I comment out the Class requirements of the individual manifests, the puppetrun works as expected. Why are these explicit requires set if they are actually going to be loaded on module autoload anyway?

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.