Hello everybody out there! Is there anyone who can explain why; .................................................................................. $share1 = "share -F nfs -o ro,anon=0 /jumpstart/install" $share2 = "share -F nfs -o ro,anon=0 /jumpstart/config" dfshare {[$share1,$share2]: before => Exec["shareall"] } service { "rpc/bind": enable => true, ensure => running } service { "nfs/server": enable => true, ensure => running, require => Service["rpc/bind"] } exec { "shareall": command => "/usr/sbin/shareall", require => Service["nfs/server"] ..................................................................................... Sometimes results in; ============================================================err: /Stage[main]/Nfsexport/Exec[shareall]/returns: change from notrun to 0 failed: /usr/sbin/shareall returned 32 instead of one of [0] at /proj/unixteam/ puppet/modules/jumpstart/manifests/init.pp:36 ============================================================= To me the Exec["shareall"] will be run last? But does it? Rgds, Mat -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 08/09/2011 01:19 PM, ki_chi_saga wrote:> To me the Exec["shareall"] will be run last? But does it? > > Rgds, > Mat >if you care about order you should make it explicit: exec { ''a'': ... } -> exec { ''b'': ... } -> exec { ''c'': ... } or exec { ''a'': before => Exec[ ''b'' ], ... } exec { ''b'': before => Exec[ ''c'' ], ... } exec { ''c'': ... } -- vagn -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Tue, Aug 09, 2011 at 10:19:26AM -0700, ki_chi_saga wrote:> Hello everybody out there! > Is there anyone who can explain why; > .................................................................................. > $share1 = "share -F nfs -o ro,anon=0 /jumpstart/install" > $share2 = "share -F nfs -o ro,anon=0 /jumpstart/config" > dfshare {[$share1,$share2]: > before => Exec["shareall"] > } > > service { "rpc/bind": > enable => true, > ensure => running > } > > service { "nfs/server": > enable => true, > ensure => running, > require => Service["rpc/bind"] > } > > exec { "shareall": > command => "/usr/sbin/shareall", > require => Service["nfs/server"] > ..................................................................................... > > Sometimes results in; > > ============================================================> err: /Stage[main]/Nfsexport/Exec[shareall]/returns: change from notrun > to 0 failed: > /usr/sbin/shareall returned 32 instead of one of [0] at /proj/unixteam/ > puppet/modules/jumpstart/manifests/init.pp:36 > =============================================================> > To me the Exec["shareall"] will be run last? But does it? > > Rgds, > Mat >If I understand this, »shareall« will only run if both services are up? First thing I would do: check what returncode 32 stands for. Then run your manifest in debug mode -- you''ll now see what puppet is executing in the background. You should see something like /usr/sbin/svcadm enable rpc/bind /usr/sbin/svcadm enable nfs/server /usr/sbin/shareall You may want to run this as a small shell script. If I recall correctly svcadm enable can actually return before the service is really up. So you may have to spend a sleep exec somewhere (ugly). -Stefan
I suggest using a notice => Exec["shareall"] in your dfsshare rather than before. Also make exec{"shareall": refreshonly => true} That may or may not help with your problem but either way good design On Tue, Aug 9, 2011 at 11:23 AM, Stefan Schulte < stefan.schulte@taunusstein.net> wrote:> On Tue, Aug 09, 2011 at 10:19:26AM -0700, ki_chi_saga wrote: > > Hello everybody out there! > > Is there anyone who can explain why; > > > .................................................................................. > > $share1 = "share -F nfs -o ro,anon=0 /jumpstart/install" > > $share2 = "share -F nfs -o ro,anon=0 /jumpstart/config" > > dfshare {[$share1,$share2]: > > before => Exec["shareall"] > > } > > > > service { "rpc/bind": > > enable => true, > > ensure => running > > } > > > > service { "nfs/server": > > enable => true, > > ensure => running, > > require => Service["rpc/bind"] > > } > > > > exec { "shareall": > > command => "/usr/sbin/shareall", > > require => Service["nfs/server"] > > > ..................................................................................... > > > > Sometimes results in; > > > > ============================================================> > err: /Stage[main]/Nfsexport/Exec[shareall]/returns: change from notrun > > to 0 failed: > > /usr/sbin/shareall returned 32 instead of one of [0] at /proj/unixteam/ > > puppet/modules/jumpstart/manifests/init.pp:36 > > =============================================================> > > > To me the Exec["shareall"] will be run last? But does it? > > > > Rgds, > > Mat > > > > If I understand this, »shareall« will only run if both services are up? > First thing I would do: check what returncode 32 stands for. Then run > your manifest in debug mode -- you''ll now see what puppet is executing > in the background. You should see something like > > /usr/sbin/svcadm enable rpc/bind > /usr/sbin/svcadm enable nfs/server > /usr/sbin/shareall > > You may want to run this as a small shell script. If I recall correctly > svcadm enable can actually return before the service is really up. So > you may have to spend a sleep exec somewhere (ugly). > > -Stefan >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>> if you care about order you should make it explicit:Good point, but;> exec { ''a'': ... } -> > exec { ''b'': ... } -> > exec { ''c'': ... }can I really be sure that puppet evaluates this in the sequence of writing? Rgds, Mats _____________________________________________________________________ On Aug 9, 7:29 pm, vagn scott <vagnsc...@gmail.com> wrote:> On 08/09/2011 01:19 PM, ki_chi_saga wrote: > > if you care about order you should make it explicit: > > exec { ''a'': ... } -> > exec { ''b'': ... } -> > exec { ''c'': ... } >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Aug 9, 8:23 pm, Stefan Schulte <stefan.schu...@taunusstein.net> wrote:> If I understand this, »shareall« will only run if both services are up?Thats is correct.> First thing I would do: check what returncode 32 stands for.I''ve tried but unable to find it.>Then run your manifest in debug modeGood point, I will> If I recall correctly svcadm enable can actually return before the service is really up.Very interesting. I''ve also suspecting some kind of timing issue Rgds, Mats -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Aug 9, 8:37 pm, Scott Smith <sc...@ohlol.net> wrote:> I suggest using a notice => Exec["shareall"] in your dfsshare rather than > before. Also make exec{"shareall": refreshonly => true} > > That may or may not help with your problem but either way good design >Thanks I will try this Rgds, Mat -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 08/10/2011 02:40 AM, ki_chi_saga wrote:>> > exec { ''a'': ... } -> >> > exec { ''b'': ... } -> >> > exec { ''c'': ... } >> > can I really be sure that puppet evaluates this in the sequence of > writing? >See the little arrows? -> That is one way to declare sequence. There are others. See the puppet language guide. -- vagn -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
> See the little arrows?No i didn''t ....> See the puppet language guide.I did and now (...) I see it! Thank you! Rgds Mat ...................................................................... On Aug 10, 4:28 pm, vagn scott <vagnsc...@gmail.com> wrote:> On 08/10/2011 02:40 AM, ki_chi_saga wrote:>> > exec { ''a'': ... } -> > >> > exec { ''b'': ... } -> > >> > exec { ''c'': ... } > > > can I really be sure that puppet evaluates this in the sequence of > > writing? > > See the little arrows? > > -> > > That is one way to declare sequence. There are others. > See the puppet language guide. > > -- > vagn-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Thu, Aug 11, 2011 at 12:40 AM, ki_chi_saga <fanell@kth.se> wrote:>> See the little arrows? > No i didn''t ....I think that this is more common than we suspect. It''s been on my list for a while, now I have a ticket: http://projects.puppetlabs.com/issues/8923 Maybe what we''re doing now cannot be improved, but I''ll keep thinking about it. Feedback welcome. r -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.