On Jun 8, 10:09 am, Papp Tamas <[email protected]> wrote:
> On 06/01/2012 04:34 PM, jcbollinger wrote:
> > You didn't say what those modifications were, but probably they are
> > what's killing you. For the modules and classes in this example,
>
> If I see well, the only one is a node.pp imported from site.pp .
It should not be a problem for site.pp to import a "node.pp" manifest.
> > In any case, your strace shows that the problem is indeed with paths.
> > You even appear to have flagged the line that says so:
>
> >> lstat("*/etc/puppet/modules/bob/manifests/bob/postfix.pp*",
> >> 0x7fff452bdf70) = -1 ENOENT (No such file or directory)
>
> The real path:
>
> /etc/puppet/modules/bob/manifests/postfix.pp
My bad. Puppet is indeed looking in the wrong directory there.
> The question is that why it search for it under path 'bob/bob' ? It's
> supposed to be only bob because 'include bob::postfix' means that.
You are right about that.
[... directory tree ...]
That layout looks ok, though some of the characters didn't translate.
> *site.pp:*
>
> # The filebucket option allows for file backups to the server
> filebucket { main: server => 'puppet.foo.com' }
>
> # Set global defaults - including backing up all files to the main
> filebucket and adds a global path
> File { backup => main }
> Exec { path => "/usr/bin:/usr/sbin/:/bin:/sbin" }
>
> node default {
> import "nodes"
>
> }
Having that import statement inside your node declaration looks
suspicious. Do you intend it to mean something different there than
it would outside the node block, either immediately before or
immediately after? If so, then it may not mean what you think it
means. I recommend you move it outside the block, though I would be
surprised if that solved the problem you asked about.
> node nodes_LINUX inherits default {
>
> [...some user definition....]
>
> }
>
> include apt
> include cron
> include ldap_client
> include munin_node
> include postfix
> include ssh
> include sudo
> include system
> include packages
> include rsyslog
> include users
> include nagios_agent
>
> }
>
> node nodes_LXC inherits nodes_LINUX {
> include packages::lxc
>
> }
>
> node nodes_ESXL inherits nodes_LINUX {
> include packages::hwl
> include backup
>
> }
>
> node nodes_HWL inherits nodes_LINUX {
> include packages::hwl
> include backup
>
> }
>
> *nodes.pp:*
>
> #########################
> #### LXC Linux node #####
> #########################
>
> node "bob.foo.com" inherits nodes_LXC {
> include bob
>
> }
>
> The module called 'postfix' works fine, I don't copy its contents here.
>
> *module called 'bob':*
>
> # cat /etc/puppet/modules/bob/manifests/init.pp
> class bob {
> include bob::postfix
>
> }
>
> # cat /etc/puppet/modules/bob/manifests/postfix.pp
> class bob::postfix inherits postfix {
> File ["/etc/postfix/main.cf"] {
> content => template('bob/etc/postfix/main.cf.erb')
> }
>
> }
>
> I'm trying to figure outt. what the problem is, but I don't see.
Other than the oddly-placed "import" statement, I don't a problem
either. I recommend you try to reduce all this to the minimum
possible manifest set that will reproduce the problem. Odds are that
the process of doing so will reveal the problem to you, but if it
doesn't then what's left will be easier for the rest of us to analyze.
John
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" 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-users?hl=en.