voxpupuli / puppet-gluster

Create and manage Gluster pools, volumes, and mounts
https://forge.puppet.com/puppet/gluster
MIT License
16 stars 72 forks source link

Duplicate declaration #128

Open dkossako opened 7 years ago

dkossako commented 7 years ago

Affected Puppet, Ruby, OS and module versions/distributions

How to reproduce (e.g Puppet code you use)

  class { ::gluster:
    server  => true,
    client  => false,
    repo    => false,
    volumes => {
      'backups' => {
        replica => 2,
        bricks  => [
          'sid-gfs-01.i.i.com:/mnt/backups',
          'sid-gfs-02.i.i.com:/mnt/backups',
        ],
        options => [
          'server.allow-insecure: on',
          'nfs.disable: true',
        ],
      }
    }
  }

  gluster::peer { [ 'sid-gfs-01.i.i.com' ]:
    pool    => 'gfs-backup',
    require => Class[::gluster::service],
  }

What are you seeing

Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Gluster::Peer[sid-gfs-01.i.i.com] is already declared in file modules/gluster/manifests/init.pp:73

This conf comes from examples and does not work.

tux-o-matic commented 7 years ago

You don't need to specify Peer resources when you have them declared as serving your bricks.

matthewmrichter commented 7 years ago

Can you update the documentation to reflect this? Like this poster, I am basically using the exact code from example_01 and it's not working due to this.