Issue #2814 has been updated by Luke Kanies.

Status changed from Unreviewed to Rejected

At this point, this is working as expected - something changed that the service 
needs to respond to (the file), so the service gets restarted.

I could see where this would be considered a bug, but it's hard to decide 
either way - until this restart happens, you're running in an inconsistent 
state, and Puppet doesn't cache that the service needs to restart so if it 
doesn't do it now it might never do it.
----------------------------------------
Bug #2814: service still restarted even though dependencies fail
http://projects.reductivelabs.com/issues/2814

Author: Jason Lavoie
Status: Rejected
Priority: Normal
Assigned to: 
Category: 
Target version: 
Affected version: 0.25.1
Keywords: 
Branch: 


Shouldn't the "Skipping because of failed dependencies" in the output           
below be absolute?  Why is puppet still refreshing the Service[dep]             
(in the very next log line)?  Am I misunderstanding how the dependencies        
should work?


service { dep:
    hasstatus => true, status => "/bin/true status",
    start => "/bin/true start", stop => "/bin/true stop",
    subscribe => File["/tmp/dep"],
    require => Exec["check-dep"],
}

exec { "check-dep":
    command => "exit 1",
    path => "/bin",
    subscribe => File["/tmp/dep"],
}

file { "/tmp/dep":
    content => "foo",
}

$ puppet --debug dep.pp
[...]
debug: //Service[dep]/require: requires Exec[check-dep]
debug: //Service[dep]/subscribe: subscribes to File[/tmp/dep]
debug: //Exec[check-dep]/subscribe: subscribes to File[/tmp/dep]
debug: //File[/tmp/dep]: File does not exist
debug: //File[/tmp/dep]/checksum: Initializing checksum hash
debug: //File[/tmp/dep]: Changing content
debug: //File[/tmp/dep]: 1 change(s)
debug: //File[/tmp/dep]: Creating checksum {md5}acbd18db4cc2f85cedef654fccc4a4d8
notice: //File[/tmp/dep]/content: defined 'content' as 
'{md5}acbd18db4cc2f85cedef654fccc4a4d8'
info: //File[/tmp/dep]: Scheduling refresh of Service[dep]
info: //File[/tmp/dep]: Scheduling refresh of Exec[check-dep]
debug: //Exec[check-dep]: Changing returns
debug: //Exec[check-dep]: 1 change(s)
debug: //Exec[check-dep]: Executing 'exit 1'
debug: Executing 'exit 1'
err: //Exec[check-dep]/returns: change from notrun to 0 failed: exit 1 returned 
1 instead of 0 at /home/jlavoie/dep.pp:12
notice: //Exec[check-dep]: Triggering 'refresh' from 1 dependencies
debug: //Exec[check-dep]: Executing 'exit 1'
debug: Executing 'exit 1'
err: //Exec[check-dep]: Failed to call refresh on Exec[check-dep]: exit 1 
returned 1 instead of 0 at /home/jlavoie/dep.pp:12
notice: //Service[dep]: Dependency exec[exit 1] has 1 failures
warning: //Service[dep]: Skipping because of failed dependencies
notice: //Service[dep]: Triggering 'refresh' from 1 dependencies
debug: Service[dep](provider=debian): Executing '/bin/true status'
debug: Service[dep](provider=debian): Executing '/bin/true stop'
debug: Service[dep](provider=debian): Executing '/bin/true start'
debug: Finishing transaction -606555348 with 2 changes

puppet-users thread here:  
http://groups.google.com/group/puppet-users/browse_thread/thread/9e2bb00f38a71306

Tested with both 0.24.8 and 0.25.1.



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://reductivelabs.com/redmine/my/account

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to