Issue #7486 has been updated by Nigel Kersten. Assignee changed from Nigel Kersten to eric sorenson
---------------------------------------- Bug #7486: Service refreshed despite failed dependencies https://projects.puppetlabs.com/issues/7486#change-66118 Author: John Florian Status: Needs Decision Priority: Normal Assignee: eric sorenson Category: Target version: Affected Puppet version: 0.25.5 Keywords: Branch: In the following manifest, I would expect the service to not be restarted if either File results in a failure, however that's not the case: <pre> # dependency-test.pp file { "/tmp/test/xyz/A": content => 'file A', } file { "/tmp/test/B": content => 'file B', } service { "crond": enable => true, ensure => running, hasrestart => true, hasstatus => true, require => [ File['/tmp/test/xyz/A'], ], subscribe => [ File['/tmp/test/B'], ], } </pre> Here's the results I get: <pre> # cd /tmp; rm -rf test; mkdir test # service crond status; puppet -v dependency-test.pp; service crond status crond (pid 28753) is running... info: Applying configuration version '1305125236' err: //File[/tmp/test/xyz/A]/content: change from absent to {md5}31d97c4d04593b21b399ace73b061c34 failed: No such file or directory - /tmp/test/xyz/A.puppettmp_7091 notice: //File[/tmp/test/B]/content: defined content as 'unknown checksum' info: //File[/tmp/test/B]: Scheduling refresh of Service[crond] notice: //Service[crond]: Dependency file[/tmp/test/xyz/A] has 1 failures warning: //Service[crond]: Skipping because of failed dependencies notice: //Service[crond]: Triggering 'refresh' from 1 dependencies crond (pid 28937) is running... # puppet --version 0.25.5 </pre> File A's failure (because subdir xyz doesn't exist) is intentional here to demonstrate how the service gets restarted despite all dependencies not being satisfied. My understanding is that subscribe implies a depenency. However, I even tried adding File B to the require clause and got the exact same results, the service was started because File B sent a notify (as it should) and puppet ignored the failed dependency for File A (as it should not). I have an application in which the service absolutely must not start unless all dependencies are satisfied. This may be related to #5876. -- 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://projects.puppetlabs.com/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.
