Issue #18026 has been updated by Chuck Schweizer.
Based on these three test cases it looks like I am seeing the desired behavior.
1) try to ensure a file is absent in a directory I don't have permission on.
Puppet is running with the warnings it is supposed to.
$ puppet apply --noop --execute "file { '/root/chuj': ensure => absent; }"
Warning: /File[/root/chuj]/seluser: Could not stat; Permission denied -
/root/chuj
Warning: /File[/root/chuj]/selrole: Could not stat; Permission denied -
/root/chuj
Warning: /File[/root/chuj]/seltype: Could not stat; Permission denied -
/root/chuj
Warning: /File[/root/chuj]/selrange: Could not stat; Permission denied -
/root/chuj
Warning: /File[/root/chuj]: Could not stat; permission denied
Notice: Finished catalog run in 0.04 seconds
2) run puppet against a directory I do have permission on and it finds the file
is absent. So no errors
$ puppet apply --noop --execute "file { '/opt/chuj': ensure => absent; }"
Notice: Finished catalog run in 0.10 seconds
3) created the file in a directory I have permissions to.
$ puppet apply --noop --execute "file { '/opt/chuj': ensure => absent; }"
Notice: /File[/opt/chuj]/ensure: current_value file, should be absent (noop)
Notice: Class[Main]: Would have triggered 'refresh' from 1 events
Notice: Stage[main]: Would have triggered 'refresh' from 1 events
Notice: Finished catalog run in 0.10 seconds
----------------------------------------
Bug #18026: SELinux warnings when using ensure => absent on file
https://projects.puppetlabs.com/issues/18026#change-80970
Author: Malcolm Howe
Status: Needs Decision
Priority: Normal
Assignee: eric sorenson
Category: SELinux
Target version: 3.1.0
Affected Puppet version: 3.0.2
Keywords:
Branch:
When using, for example,
file {"/etc/exclude.systemdump": ensure => absent }
If the file is already absent Puppet 3.0.2rc1 gives the following warnings not
seen in Puppet 3.0.1
Warning: /File[/etc/exclude.systemdump]/seluser: Could not stat; No such
file or directory - /etc/exclude.systemdump
Warning: /File[/etc/exclude.systemdump]/selrole: Could not stat; No such
file or directory - /etc/exclude.systemdump
Warning: /File[/etc/exclude.systemdump]/seltype: Could not stat; No such
file or directory - /etc/exclude.systemdump
Warning: /File[/etc/exclude.systemdump]/selrange: Could not stat; No such
file or directory - /etc/exclude.systemdump
System is running Centos 6 with SELinux in permissive mode.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" 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-bugs?hl=en.