On Tue, Nov 29, 2011 at 2:06 PM, jasper.hargrea...@m-w.co.uk
<jasper.hargrea...@m-w.co.uk> wrote:
> Hi all,
>
> Recently upgraded one of our puppet servers from 2.6.4 to 2.7.5, and
> we're noticing some rather odd behaviour.
> What's always traditionally worked for creating ini files and the
> like, is now creating directories instead of files (indeed, replacing
> my existing files with directories, which had some rather catastrophic
> consequences for the poor poor test systems).
>
> Even when hard coding ensure => file, instead of a passing a
> parameter... it creates a directory.
> The type parameter just doesn't seem to be doing as it's told.  Roll
> back to previous version of puppet server, it's all happy again
> (though it can't convert the directory back to a file, but that'll be
> a separate issue entirely).
>
> Anybody have any clues as where else would be worth looking in trying
> to resolve this?
>
>
> relevant section of files:
>
> file { $name:
>                name => "${path}${name}",
>                mode => $mode,
>                owner => $owner,
>                group => $group,
>                backup => $backup,
>                recurse => $recurse,
>                ensure => $ensure,
>                source => [
>                        
> "puppet://puppet/modules/standalone-configs/$folder/$name-$type-
> $fqdn",
>                        
> "puppet://puppet/modules/standalone-configs/$folder/$name-$type-
> $operatingsystem",
>                        
> "puppet://puppet/modules/standalone-configs/$folder/$name-$type-
> $default",
>                        
> "puppet://puppet/modules/standalone-configs/$folder/$name-$fqdn",
>                        
> "puppet://puppet/modules/standalone-configs/$folder/$name-
> $operatingsystem",
>                        
> "puppet://puppet/modules/standalone-configs/$folder/$name-default"
>                ],
>                notify => $notify

I can't say for sure, but a few things to help you troubleshoot. On
the master run puppet master --compile $hostname and compare the
output for the file resource in 2.6 v.s. 2.7. Here's a simple example:

      {
        "exported": false,
        "line": 21,
        "title": "/tmp/sample",
        "parameters": {
          "ensure": "file"
        },
...
        "type": "File",
        "file": "/etc/puppet/manifests/site.pp"
      },

So the first thing is making sure they are the same, the second is
write a test manifests with all your attributes on the 2.7 system and
see how it behaves:

file { "/path/to/file":
   ensure => file,
   ...
   source => [...],
}

Thanks,

Nan

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to