Issue #9862 has been updated by Andrew Parker.

I've cleaned up the tests to make the functionality around choosing the owner 
and group clearer to myself. The result can be seen at 
<https://github.com/zaphod42/puppet/blob/4bf2095fd68f9387a273c4ae8a62dea727a1691f/spec/unit/settings/file_setting_spec.rb#L31>.
 

Those tests make clear that the group behaves substantially differently from 
the owner.

  1. setting the group to `root` is no different from setting the group to 
`service`
  2. group does not take into account `Puppet[:mkusers]` or whether the group 
actually exists on the system

Alex has a valid concern that not all systems use the same group for the root 
user. We could leave behavior 1 as is, but I don't think that having that 
difference in behavior between user and group would be very user-friendly (no 
pun intended). Behavior 2 is the root of this issue and so fixing that is the 
minimum needed.

I hacked around while investigating this and came up with a similar patch to 
Alex for the group.

Since the behavior for a group of `root` doesn't seem to be intentional, I'm 
not sure of the right course of action for that. I can leave it as is for now, 
but if I do that I think setting group to `root` should be deprecated.
----------------------------------------
Bug #9862: puppet cannot run without puppet group on the system
https://projects.puppetlabs.com/issues/9862#change-79140

Author: Jeff McCune
Status: Accepted
Priority: High
Assignee: Andrew Parker
Category: settings
Target version: 3.1.0
Affected Puppet version: 2.7.0
Keywords: settings
Branch: 


# Overview #

Working with Puppet 2.7.5 I notice that `puppet apply` fails to work properly 
if the user puppet is not present on the system.  In previous versions of 
Puppet, `puppet apply` does not require the user puppet to be present.

This is a problem because puppet apply may be responsible for managing the user 
puppet itself.  This presents a chicken and an egg problem if puppet apply is 
not able to properly manage the resources puppet itself needs.

# Steps to reproduce #

With 2.7.5:

<pre>
root@pe-centos6:~# puppet apply --modulepath /vagrant/modules 
/vagrant/manifests/vmsetup.pp --noop
notice: Finished catalog run in 0.74 seconds
err: /File[/var/lib/puppet/rrd]: Could not evaluate: Could not find group puppet
err: Could not send report: Got 1 failure(s) while initializing: Could not 
evaluate: Could not find group puppet
root@pe-centos6:~# puppet --version
2.7.5
root@pe-centos6:~# facter --version
1.6.1
</pre>

# Expected Behavior #

With 2.6.10 it works as expected:

<pre>
root@pe-centos6:~# puppet --version
2.6.10
root@pe-centos6:~# facter --version
1.6.1
root@pe-centos6:~# puppet apply --modulepath /vagrant/modules 
/vagrant/manifests/vmsetup.pp --noop
notice: Finished catalog run in 0.67 seconds
root@pe-centos6:~#
</pre>

# Additional Information #

This bug appears to have been introduced in 2.7.0:

<pre>
root@pe-centos6:~# facter --version
1.6.1
root@pe-centos6:~# puppet --version
2.7.0
root@pe-centos6:~# puppet apply --modulepath /vagrant/modules 
/vagrant/manifests/vmsetup.pp --noop
notice: Finished catalog run in 0.75 seconds
err: /File[/var/lib/puppet/rrd]: Could not evaluate: Could not find group puppet
err: Could not send report: Got 1 failure(s) while initializing: Could not 
evaluate: Could not find group puppet
</pre>

Also, I should note this problem exists in the default case.  I have no 
customizations to puppet.conf at all:

<pre>
root@pe-centos6:~# cat /etc/puppet/puppet.conf
cat: /etc/puppet/puppet.conf: No such file or directory
</pre>

# Trace #

Here is the trace when running against 2.7.x (2.7.5-91-g2958b05)

<pre>

notice: Finished catalog run in 1.04 seconds
/root/src/puppet/lib/puppet/type/file/group.rb:18:in `insync?'
/root/src/puppet/lib/puppet/type/file/group.rb:17:in `map!'
/root/src/puppet/lib/puppet/type/file/group.rb:17:in `insync?'
/root/src/puppet/lib/puppet/property.rb:162:in `safe_insync?'
/root/src/puppet/lib/puppet/transaction/resource_harness.rb:61:in 
`perform_changes'
/root/src/puppet/lib/puppet/transaction/resource_harness.rb:60:in `each'
/root/src/puppet/lib/puppet/transaction/resource_harness.rb:60:in 
`perform_changes'
/root/src/puppet/lib/puppet/transaction/resource_harness.rb:133:in `evaluate'
/root/src/puppet/lib/puppet/transaction.rb:49:in `apply'
/root/src/puppet/lib/puppet/transaction.rb:84:in `eval_resource'
/root/src/puppet/lib/puppet/transaction.rb:103:in `evaluate'
/root/src/puppet/lib/puppet/util.rb:459:in `thinmark'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/root/src/puppet/lib/puppet/util.rb:458:in `thinmark'
/root/src/puppet/lib/puppet/transaction.rb:103:in `evaluate'
/root/src/puppet/lib/puppet/transaction.rb:311:in `traverse'
/root/src/puppet/lib/puppet/transaction.rb:99:in `evaluate'
/root/src/puppet/lib/puppet/resource/catalog.rb:141:in `apply'
/root/src/puppet/lib/puppet/util/settings.rb:629:in `use'
/usr/lib/ruby/1.8/sync.rb:230:in `synchronize'
/root/src/puppet/lib/puppet/util/settings.rb:612:in `use'
/root/src/puppet/lib/puppet/indirector/report/processor.rb:10:in `initialize'
/root/src/puppet/lib/puppet/indirector/indirection.rb:315:in `new'
/root/src/puppet/lib/puppet/indirector/indirection.rb:315:in `make_terminus'
/root/src/puppet/lib/puppet/indirector/indirection.rb:124:in `terminus'
/root/src/puppet/lib/puppet/indirector/indirection.rb:303:in `prepare'
/root/src/puppet/lib/puppet/indirector/indirection.rb:263:in `save'
/root/src/puppet/lib/puppet/configurer.rb:174:in `send_report'
/root/src/puppet/lib/puppet/configurer.rb:168:in `run'
/root/src/puppet/lib/puppet/application/apply.rb:215:in `main'
/root/src/puppet/lib/puppet/application/apply.rb:135:in `run_command'
/root/src/puppet/lib/puppet/application.rb:306:in `run'
/root/src/puppet/lib/puppet/application.rb:410:in `hook'
/root/src/puppet/lib/puppet/application.rb:306:in `run'
/root/src/puppet/lib/puppet/application.rb:401:in `exit_on_fail'
/root/src/puppet/lib/puppet/application.rb:306:in `run'
/root/src/puppet/lib/puppet/util/command_line.rb:69:in `execute'
/root/src/puppet/bin/puppet:4
err: /File[/var/lib/puppet/rrd]: Could not evaluate: Could not find group puppet
/root/src/puppet/lib/puppet/util/settings.rb:633:in `use'
/root/src/puppet/lib/puppet/resource/catalog.rb:157:in `apply'
/root/src/puppet/lib/puppet/util/settings.rb:629:in `use'
/usr/lib/ruby/1.8/sync.rb:230:in `synchronize'
/root/src/puppet/lib/puppet/util/settings.rb:612:in `use'
/root/src/puppet/lib/puppet/indirector/report/processor.rb:10:in `initialize'
/root/src/puppet/lib/puppet/indirector/indirection.rb:315:in `new'
/root/src/puppet/lib/puppet/indirector/indirection.rb:315:in `make_terminus'
/root/src/puppet/lib/puppet/indirector/indirection.rb:124:in `terminus'
/root/src/puppet/lib/puppet/indirector/indirection.rb:303:in `prepare'
/root/src/puppet/lib/puppet/indirector/indirection.rb:263:in `save'
/root/src/puppet/lib/puppet/configurer.rb:174:in `send_report'
/root/src/puppet/lib/puppet/configurer.rb:168:in `run'
/root/src/puppet/lib/puppet/application/apply.rb:215:in `main'
/root/src/puppet/lib/puppet/application/apply.rb:135:in `run_command'
/root/src/puppet/lib/puppet/application.rb:306:in `run'
/root/src/puppet/lib/puppet/application.rb:410:in `hook'
/root/src/puppet/lib/puppet/application.rb:306:in `run'
/root/src/puppet/lib/puppet/application.rb:401:in `exit_on_fail'
/root/src/puppet/lib/puppet/application.rb:306:in `run'
/root/src/puppet/lib/puppet/util/command_line.rb:69:in `execute'
/root/src/puppet/bin/puppet:4
err: Could not send report: Got 1 failure(s) while initializing: Could not 
evaluate: Could not find group puppet
</pre>



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