I am getting a dependency loop when trying to apply my puppet
manifests, however the loop makes little sense to me as one the
dependencies seems to come from no where.

The cycle is this:

   Augeas[Change production to development in virtual hosts] =>
   Exec[re-read apache config] =>
   Class[App::Apache] =>
   Augeas[Change production to development in virtual hosts])

This cycle is started with this resource in Class A:


    augeas { 'Change production to development in virtual hosts':
        context   => '/files/etc/httpd/conf.d/httpd-app.conf',
        changes   => [
            "set VirtualHost[1]/*[self::directive='SetEnv']/arg[2] development",
            "set VirtualHost[2]/*[self::directive='SetEnv']/arg[2] development",
        ],
        require => Class['app::apache'],
        notify  => Exec['re-read apache config'],
    }

 Exec['re-read apache config'] lives in the class app::apache, and it
looks like:

    exec { 're-read apache config':
        command     => '/sbin/apachectl graceful',
        require     => Class['app::packages'],
        refreshonly => true,
    }

So if I were to draw a dep graph I would draw two branches, this one:

      Augeas[Change production to development in virtual hosts] =>
      Class['app::apache']

And this one:

      Augeas[Change production to development in virtual hosts] =>
      Exec['re-read apache config'] =>
      Class['app::packages']


But I would not draw the one puppet came up with:


   Augeas[Change production to development in virtual hosts] =>
   Exec[re-read apache config] =>
   Class[App::Apache] =>
   Augeas[Change production to development in virtual hosts]

In particular I don't see where it is getting that Exec[re-read apache
config] requires Class[App::Apache] (which itself contains
Exec[re-read apache config]).  But then it goes a step beyond and
states that Class[App::Apache], the dep I can't explain requires
Augeas[Change production to development in virtual hosts] causing a
loop.   Near as I can tell App::Apache makes no requirements that
takes you directly back Augeas[Change production to development in
virtual hosts].

 Symbolically, I  expect the dependency graphs:

     A -> B
     A -> C -> D

where B contains C, but in no way expected the graph:

     A->C->B->A

Why might this be happening and what am I not understanding?

Thanks...James

-- 
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/CAPWHxfLJPf041A3sonLiyKWgP98H%3DTwy3FLFjos8s7CuC6tmYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to