Issue #16167 has been reported by Peter Valdemar Mørch.
----------------------------------------
Bug #16167: "warning: Cannot manage ownership unless running as root" - but
only on 2nd and later invocations...
https://projects.puppetlabs.com/issues/16167
Author: Peter Valdemar Mørch
Status: Unreviewed
Priority: Normal
Assignee:
Category:
Target version:
Affected Puppet version: 2.6.2
Keywords:
Branch:
I am in fact intentionally running as non-root. All files of interest are owned
by the same user.
If I use puppet to copy a source -> destination, it works fine the first time.
Delete the destination and try again => get a warning. Delete the destination
*and ~/.puppet* and try again => all is fine again.
Reproduction recipe:
$ rm -rf /tmp/source /tmp/destination ~/.puppet/
$ touch /tmp/source
# First time no warning
$ puppet -e 'file { "/tmp/destination": ensure => present, source =>
"/tmp/source" }'
notice: /Stage[main]//File[/tmp/destination]/ensure: defined content as
'{md5}d41d8cd98f00b204e9800998ecf8427e'
$ rm /tmp/destination
# Why do I get a warning here
$ puppet -e 'file { "/tmp/destination": ensure => present, source =>
"/tmp/source" }'
warning: Cannot manage ownership unless running as root
notice: /Stage[main]//File[/tmp/destination]/ensure: defined content as
'{md5}d41d8cd98f00b204e9800998ecf8427e'
# Actually only necessary to delete ~/.puppet/var/state/state.yaml
$ rm -rf /tmp/destination ~/.puppet/
# But not here
$ puppet -e 'file { "/tmp/destination": ensure => present, source =>
"/tmp/source" }'
notice: /Stage[main]//File[/tmp/destination]/ensure: defined content as
'{md5}d41d8cd98f00b204e9800998ecf8427e'
Version information: Debian Squeeze
$ puppet --version
2.6.2
$ dpkg-query -W | grep puppet
puppet 2.6.2-5+squeeze6
puppet-common 2.6.2-5+squeeze6
I haven't actually tried it on newer versions of puppet (if I do then I'll
update the bug), but regardless - it seems to be valid for 2.6.2 at least.
--
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.