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

Fix bugs. Upgrade gluster to 3.6 and use the ppa. #11

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2015-02-25 - 0.0.3.1
* Fix bugs
* Use ubuntu ppa for glusterfs 3.6

2013-05-24 - 0.0.3
* Update README and use markdown.
* Change to 2-space indent.
Expand Down
6 changes: 5 additions & 1 deletion manifests/client.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
#
class glusterfs::client {

package { 'glusterfs-fuse': ensure => installed }
require glusterfs::ppa
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes the module only work on Ubuntu


package { 'glusterfs-client':
ensure => installed,
}

}

3 changes: 2 additions & 1 deletion manifests/mount.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
device => $device,
fstype => 'glusterfs',
options => $options,
require => Package['glusterfs-fuse'],
remounts => false,
require => Package['glusterfs-client'],
}

}
Expand Down
2 changes: 1 addition & 1 deletion manifests/peer.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

exec { "/usr/sbin/gluster peer probe ${title}":
unless => "/bin/egrep '^hostname.+=${title}$' /var/lib/glusterd/peers/*",
require => Service['glusterd'],
require => Service['glusterfs-server'],
}

}
Expand Down
12 changes: 12 additions & 0 deletions manifests/ppa.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class glusterfs::ppa(
$ppa = 'ppa:gluster/glusterfs-3.4'
) {

include apt

apt::ppa { $ppa:
}

}


9 changes: 6 additions & 3 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@
# }
#
class glusterfs::server (
$peers = []
$peers = [],
$ensure = 'installed'
) {

require glusterfs::ppa

# Main package and service it provides
package { 'glusterfs-server': ensure => installed }
service { 'glusterd':
package { 'glusterfs-server': ensure => $installed }
service { 'glusterfs-server':
enable => true,
ensure => running,
hasstatus => true,
Expand Down
2 changes: 1 addition & 1 deletion manifests/volume.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}

exec { "/usr/sbin/gluster volume start ${title}":
unless => "[ \"`gluster volume info ${title} | egrep '^Status:'`\" = 'Status: Started' ]",
unless => "gluster volume info ${title} | grep -q '^Status: Started'",
path => [ '/usr/sbin', '/usr/bin', '/sbin', '/bin' ],
require => Exec["gluster volume create ${title}"],
}
Expand Down