Permalink
Browse files

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

…ated exec.
  • Loading branch information...
1 parent f312b06 commit b5a8d2b25287ac733eb9780fc7bf1475004f20cf @mfournier mfournier committed Feb 2, 2010
Showing with 6 additions and 13 deletions.
  1. +3 −10 manifests/classes/drbd.pp
  2. +1 −1 manifests/definitions/config.pp
  3. +2 −2 manifests/definitions/resource.pp
View
@@ -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"],
}
}
@@ -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"],
}
}
@@ -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"],

0 comments on commit b5a8d2b

Please sign in to comment.