On Friday, May 10, 2013 3:17:16 PM UTC-5, pup_userz0 wrote:
>
> [root@puptmaster:~/manifests]#
> [root@puptmaster:~/manifests]#cat 1.file.pp
> file {'testfile':
>         path => '/tmp/testfile',
>         ensure => present,
>         mode => 0640,
>         content => "I'm a test file.",
> }
> [root@puptmaster:~/manifests]#
> [root@npuptmaster:~/manifests]#rm -f /tmp/testfile
> [root@puptmaster:~/manifests]#
> [root@puptmaster:~/manifests]#
> [root@npuptmaster:~/manifests]#puppet apply 1.file.pp
> notice: /Stage[main]//File[testfile]/ensure: created
> notice: Finished catalog run in 0.05 seconds
> [root@puptmaster:~/manifests]#
> [root@puptmaster:~/manifests]#ls -l /tmp/testfile
> -rw-r----- 1 root root 16 May 10 16:07 /tmp/testfile
> [root@puptmaster:~/manifests]#
> [root@puptmaster:~/manifests]#
>
> Yet I cannot run a "puppet agent --test" on the same machine.
> Any ideas?
>
> Below is the error:
>
> root@puptmaster:~/manifests]#
> [root@puptmaster:~/manifests]#puppet agent -t
> info: Caching catalog for puppeta
> err: Failed to apply catalog: Parameter mode failed on 
> File[/var/lib/puppet/reports]: The file mode specification is invalid: "488"
> [root@puptmaster:~/manifests]#
>
> Has anyone seen this kind of error before?
>
> Puser
>
>

Because the diagnostics show a catalog being cached and the failure 
occurring during the catalog application stage, we can be confident that it 
is the agent that failed, not the master.

The diagnostic further identifies a particular file (directory) involved: 
/var/lib/puppet/reports.  Presumably, you are not directly attempting to 
manage this file, but the agent uses the same machinery to manage its 
internal runtime requirements as it does to manage the resources you 
directly assign to nodes.  It is attempting to set up the area in which it 
will (may) write a report of its activity to submit to the master.  That 
does not happen when you run "puppet apply".

The specific error message "mode specification is invalid" is probably a 
bit misleading.  It likely means that the agent attempted to set the listed 
mode (488 decimal = 0750 octal) on that directory, but failed.  In all 
likelihood that results from a permissions problem: either the agent is not 
running as root (which it must do for most purposes), or some manner of 
access control that can affect root is in play (e.g. SELinux in enforcing 
mode or permission limitations inherent in the file system).

Make sure to run the agent as root, and in the correct security context if 
you are enforcing SELinux policy.  If applicable, ensure that 
/var/lib/puppet and all files and directories within bear the correct 
SELinux labels.  Alternatively, change SELinux to permissive mode (or 
disable it altogether) if you don't care about it.


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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to