Issue #4867 has been updated by Markus Roberts.

Subject changed from On Solaris, puppet client requires the puppet user to 
exist before running to Puppet raises error when trying to set owner to 
non-existant user
Status changed from Investigating to Needs more information

I believe that this is actually a much simpler problem than it initially 
appeared, and have changed the title to reflect this belief.

I can produce the same symptoms on any system which does not have a user named 
"puppet" with the following manifest:

<pre>
node default {
  file { "/tmp/puppet_owned.txt":
    content => 'Mine, all mine!',
    owner => puppet
  }
}
</pre>

Note that the user "puppet" is not special here; it could just as well be:

<pre>
node default {
  file { "/tmp/killroy_owned.txt":
    content => 'Mine, all mine!',
    owner => killroy
  }
}
</pre>

And the fix is to ensure that the user exists before attempting to assign 
ownership to it:

<pre>
node default {
  user { "killroy": ensure => present }
  file { "/tmp/killroy_owned.txt":
    content => 'Mine, all mine!',
    require => User[killroy],
    owner => killroy
  }
}
</pre>

The only remaining issue, if this interpretation is correct, is why this raises 
an error rather than just failing the resource.

Does this interpretation fit the situation you are seeing (and does the 
solution fix it for you)?  

While waiting for feedback I'll investigate the fail-the-resource vs. 
stop-the-run issue.

----------------------------------------
Bug #4867: Puppet raises error when trying to set owner to non-existant user
https://projects.puppetlabs.com/issues/4867

Author: Brian Gallew
Status: Needs more information
Priority: Normal
Assignee: Markus Roberts
Category: agent
Target version: 2.6.3
Affected Puppet version: 2.6.1
Keywords: 
Branch: http://github.com/MarkusQ/puppet/tree/ticket/2.6.x/4867


When I ran 0.25.5, I relied on the puppet client to create the puppet user.  
Since I've upgraded to 2.6.1, the puppet user must already exist before the 
puppet client will run, otherwise the puppet client bails with an error:
err: Could not run Puppet configuration client: Could not find user puppet

This seems to be a fairly major regression.


-- 
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.

Reply via email to