I've open a bug ticket: puppet --graph misses some dependencies https://tickets.puppetlabs.com/browse/PUP-2075
d1 {'test': } -> d2 {'test': } define d1 { exec { exec1: command => '/bin/echo exec1; exit 1' } } define d2 { exec { exec2: command => '/bin/echo exec2; exit 1' } } --- $ puppet apply --graph test.pp the graph does not show any dependency between exec1 and exec2. However the dependency does exists, as puppet does nor execute exec2 because of "failed dependencies": $ puppet apply --graph dd.pp Notice: Compiled catalog for mac4c.local in environment production in 0.08 seconds Notice: /Stage[main]//D1[test]/Exec[exec1]/returns: exec1 Error: /bin/echo exec1; exit 1 returned 1 instead of one of [0] Error: /Stage[main]//D1[test]/Exec[exec1]/returns: change from notrun to 0 failed: /bin/echo exec1; exit 1 returned 1 instead of one of [0] Notice: /Stage[main]//D2[test]/Exec[exec2]: Dependency Exec[exec1] has failures: true Warning: /Stage[main]//D2[test]/Exec[exec2]: Skipping because of failed dependencies Notice: Finished catalog run in 0.11 seconds So, it seems that there is a bug in puppet --graph. On Wednesday, March 19, 2014 9:51:08 PM UTC+1, jcbollinger wrote: > > > > On Wednesday, March 19, 2014 7:54:27 AM UTC-5, David Portabella wrote: >> >> I have this test.pp example on puppet 3.4.3 on OSX 10.9: >> >> c2 {'test': } >> -> >> c3 {'test': } >> >> define c1 { >> notice "+++" >> file {'/tmp/c1.txt': ensure => present } >> } >> >> define c2 { >> c1 {$name: } >> notice "+++" >> file {'/tmp/c2.txt': ensure => present } >> } >> >> define c3 { >> notice "+++" >> file {'/tmp/c3.txt': ensure => present } >> } >> >> running: >> >> $ puppet apply --graph test.pp >> >> produces this graph >> /Users/david/.puppet/var/state/graphs/relationships.dot, >> >> *which shows that /tmp/c3.txt does not require /tmp/c2.txt.* >> >> *why?* >> > > > I don't know, and your graph did not come across. However, it may simply > be a case of Puppet optimizing. Two unrelated File resources cannot have a > *bona > fide* ordering relationship between them, because syncing one in no way > affects syncing the other. > > Still, I find it surprising. Is there at least a chain of relationships > that will cause File['/tmp/c2.txt'] to be applied before > File['/tmp/c3.txt']? Are you sure the catalog you analyzed corresponds to > the version of your manifest set that contains the chain operator you > depict? > > > John > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/9fe34fdb-4b31-4df3-ac5d-d0d1bfec49d8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.