Skip to content
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

GlusterFS peers are not defined as prerequisite for a GlusterFS volume #182

Open
humboldt63 opened this issue Oct 12, 2018 · 2 comments
Open

Comments

@humboldt63
Copy link

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: Puppet Enterprise 2018.1.4, Puppet Agent 5.5.6
  • Ruby: 2.0.0p648
  • Distribution: RHEL 7.5 3.10.0-862.9.1.el7.x86_64
  • Application: GlusterFS 3.7.9-10.el7rhgs
  • Module version: 4.1.0

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

  $glusterversion = '3.7.9-10.el7rhgs'
  $poolname = 'production'
  $dirname = 'share'
  $replica_no = 3
  $bricks = ['gluster01:/srv/glfs/share', 'gluster02:/srv/glfs/share', 'gluster03:/srv/glfs/share']
  
  class { ::gluster:
    repo    => false,
    version => $glusterversion,
    server  => true,
    client  => false,
    pool    => $poolname,
    volumes => {
      $dirname => {
        replica   => $replica_no,
        bricks    => $bricks,
        transport => 'tcp',
        options   => ['nfs.disable: true'],
      }
    }
  }

What are you seeing

The Gluster module for puppet 4.1.0 with Puppet Enterprise 2018.4.1 for RHEL 7.5 does not define GlusterFS peers as prerequisite for the GlusterFS volume.

What behaviour did you expect instead

The Gluster module for puppet should define all peers and the volume in only one puppet run.

Output log

Puppet Agent Run 1 (Peer nodes are ready)

puppet agent log:

Notice: /Stage[main]/Gluster/Gluster::Volume[share]/Exec[gluster create volume share]/returns: volume create: share: failed: Host gluster02 is not in ' Peer in Cluster' state
Error: '/sbin/gluster volume create share replica 3 transport tcp gluster01:/srv/glfs/share gluster02:/srv/glfs/share gluster03:/srv/glfs/share' returned 1 instead of one of [0]
Error: /Stage[main]/Gluster/Gluster::Volume[share]/Exec[gluster create volume share]/returns: change from 'notrun' to ['0'] failed: '/sbin/gluster volume create share replica 3 transport tcp gluster01:/srv/glfs/share gluster02:/srv/glfs/share gluster03:/srv/glfs/share' returned 1 instead of one of [0]
Notice: /Stage[main]/Gluster/Gluster::Volume[share]/Gluster::Volume::Option[share:nfs.disable]/Exec[gluster option share nfs.disable true]: Dependency Exec[gluster create volume share] has failures: true

check peers manually afterwards:

# gluster peer status
Number of Peers: 0

Puppet Agent Run 2 (Peer nodes are ready)

puppet agent log:

Notice: /Stage[main]/Gluster/Gluster::Volume[share]/Exec[gluster create volume share]/returns: volume create: share: failed: /srv/glfs/share is already part of a volume
Error: '/sbin/gluster volume create share replica 3 transport tcp gluster01:/srv/glfs/share gluster02:/srv/glfs/share gluster03:/srv/glfs/share' returned 1 instead of one of [0]
Error: /Stage[main]/Gluster/Gluster::Volume[share]/Exec[gluster create volume share]/returns: change from 'notrun' to ['0'] failed: '/sbin/gluster volume create share replica 3 transport tcp gluster01:/srv/glfs/share gluster02:/srv/glfs/share gluster03:/srv/glfs/share' returned 1 instead of one of [0]
Notice: /Stage[main]/Gluster/Gluster::Volume[share]/Gluster::Volume::Option[share:nfs.disable]/Exec[gluster option share nfs.disable true]: Dependency Exec[gluster create volume share] has failures: true

check peers and facts (set by the gluster module) manually afterwards:

# gluster peer status
Number of Peers: 0

# puppet facts | grep gluster_
    "gluster_binary": "/sbin/gluster",
    "gluster_peer_count": 0,
    "gluster_peer_list": "",

manual peer probes after the two puppet runs are successful:

# gluster peer probe gluster02
peer probe: success. 

# gluster peer probe gluster03
peer probe: success. 

# gluster peer status
Number of Peers: 2

Hostname: gluster02
Uuid: ********-****-****-****-************
State: Peer in Cluster (Connected)

Hostname: gluster03
Uuid: ********-****-****-****-************
State: Peer in Cluster (Connected)

Any additional information you'd like to impart

I think the problem is that the peers are not defined. Tests with the gluster::peer class also did not define peers although the GlusterFS software is installed successfully and glusterd is started successfully on all peers.

The installed GlusterFS software and Daemon works fine because defining peers and the volume with this installed software can be done manually without any problems.

@tsmgeek
Copy link

tsmgeek commented Sep 7, 2019

I have the same issue where its not setting up the peers.

@skyfox14
Copy link

skyfox14 commented Mar 21, 2021

The define gluster::peer is using a legacy fact that is hidden per default: https://puppet.com/docs/puppet/6.21/core_facts.html#fqdn

You've to use $facts['networking']['fqdn'] instead:

gluster::peer { [ 'srv1.local', 'srv2.local' ]: 
  fqdn => $facts['networking']['fqdn'],
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants