Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

drbd: defined a restart parameter to drbd service, instead of a dedic…

…ated exec.
  • Loading branch information...
commit b5a8d2b25287ac733eb9780fc7bf1475004f20cf 1 parent f312b06
@mfournier mfournier authored
View
13 manifests/classes/drbd.pp
@@ -63,18 +63,11 @@
service { "drbd":
ensure => running,
hasstatus => true,
+ restart => "/etc/init.d/drbd reload",
enable => true,
require => [Package["drbd", "drbd-module"], Exec["load drbd module"]],
}
- # Notifying the drbd service is definitely a bad idea. This exec will do the
- # same thing "service drbd reload" would do.
- exec { "reload drbd":
- command => "drbdadm adjust all",
- refreshonly => true,
- require => Service["drbd"],
- }
-
# this file just includes other files
file { "/etc/drbd.conf":
ensure => present,
@@ -85,7 +78,7 @@
',
require => Package["drbd"],
before => Service["drbd"],
- notify => Exec["reload drbd"],
+ notify => Service["drbd"],
}
# only allow files managed by puppet in this directory.
@@ -96,7 +89,7 @@
recurse => true,
force => true,
require => Package["drbd"],
- notify => Exec["reload drbd"],
+ notify => Service["drbd"],
}
}
View
2  manifests/definitions/config.pp
@@ -29,7 +29,7 @@
owner => "root",
content => "# file managed by puppet\n\n${content}\n",
require => Package["drbd"],
- notify => Exec["reload drbd"],
+ notify => Service["drbd"],
}
}
View
4 manifests/definitions/resource.pp
@@ -57,7 +57,7 @@
command => "drbdadm create-md $name",
onlyif => "test -e $disk",
unless => "drbdadm dump-md $name || (drbdadm cstate $name | egrep -q '^Connected')",
- before => Exec["reload drbd"],
+ before => Service["drbd"],
require => [
Exec["load drbd module"],
Drbd::Config["ZZZ-resource-${name}"],
@@ -67,7 +67,7 @@
exec { "enable DRBD resource $name":
command => "drbdadm up $name",
onlyif => "drbdadm dstate $name | egrep -q '^Diskless/|^Unconfigured'",
- before => Exec["reload drbd"],
+ before => Service["drbd"],
require => [
Exec["intialize DRBD metadata for $name"],
Exec["load drbd module"],
Please sign in to comment.
Something went wrong with that request. Please try again.