Issue #4201 has been updated by Markus Roberts.

Status changed from Investigating to Needs more information
Assigned to changed from Markus Roberts to James Turnbull

Can a non-root user see useradd on that box?

The only way I can reproduce these test failures is to hide the executables.

If that's what's going on, the core problem is that these are bad unit tests 
and ought to be mocking/stubbing the executable probing, rather tan doing it 
for real.

----------------------------------------
Bug #4201: No default user / group provider for non-root linux users.
http://projects.puppetlabs.com/issues/4201

Author: James Turnbull
Status: Needs more information
Priority: Low
Assigned to: James Turnbull
Category: testing
Target version: 2.6.0
Affected version: 2.6alpha1
Keywords: 
Branch: 


A large number of spec and unit tests fail when run as a non-root user under 
Fedora 12 (though they appear to work under, say Ubuntu 10) because puppet can 
not find a default provider (e.g. useradd) when run as non-root.  

This may be a provider detection problem or it may be a test confinement 
problem.

-------------------------

The following failed on Fedora 12 when run as a non-root user - they all PASS 
when run as root.

Linux pelin.lovedthanlost.net 2.6.32.12-linode25 #1 SMP Wed Apr 28 19:25:11 UTC 
2010 i686 i686 i386 GNU/Linux
ruby --version
ruby 1.8.6 (2010-02-05 patchlevel 399) [i386-linux]
spec --version
rspec 1.3.0

<pre>

1)
Puppet::DevError in 'Puppet::Type::Resources#generate when the catalog contains 
a purging resource should not include the skipped users'
Could not find a default provider for user
./spec/unit/type/resources_spec.rb:60:in `new'
./spec/unit/type/resources_spec.rb:60:
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in
 `run'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `each'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `run'

2)
Puppet::DevError in 'Puppet::Type::User should have a default provider 
inheriting from Puppet::Provider'
Could not find a default provider for user
./spec/unit/type/user_spec.rb:15:
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in
 `run'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `each'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `run'

3)
Puppet::DevError in 'Puppet::Type::User should be able to create a instance'
Could not find a default provider for user
./spec/unit/type/user_spec.rb:19:in `new'
./spec/unit/type/user_spec.rb:19:
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in
 `run'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `each'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `run'

4)
Puppet::DevError in 'Puppet::Type::User instances should have a valid provider'
Could not find a default provider for user
./spec/unit/type/user_spec.rb:40:in `new'
./spec/unit/type/user_spec.rb:40:
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in
 `run'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `each'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `run'

5)
Puppet::DevError in 'Puppet::Type::User instances should delegate existence 
questions to its provider'
Could not find a default provider for user
./spec/unit/type/user_spec.rb:44:in `new'
./spec/unit/type/user_spec.rb:44:
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in
 `run'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `each'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `run'

6)
Puppet::DevError in 'Puppet::Type::User when retrieving all current values 
should return a hash containing values for all set properties'
Could not find a default provider for user
./spec/unit/type/user_spec.rb:80:in `new'
./spec/unit/type/user_spec.rb:80:
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in
 `run'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `each'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `run'

7)
Puppet::DevError in 'Puppet::Type::User when retrieving all current values 
should set all values to :absent if the user is absent'
Could not find a default provider for user
./spec/unit/type/user_spec.rb:80:in `new'
./spec/unit/type/user_spec.rb:80:
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in
 `run'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `each'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `run'

8)
Puppet::DevError in 'Puppet::Type::User when retrieving all current values 
should include the result of retrieving each property's current value if the 
user is present'
Could not find a default provider for user
./spec/unit/type/user_spec.rb:80:in `new'
./spec/unit/type/user_spec.rb:80:
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in
 `run'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `each'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `run'

9)
Puppet::DevError in 'Puppet::Type::User when user has roles should autorequire 
roles'
Could not find a default provider for user
./spec/unit/type/user_spec.rb:266:in `new'
./spec/unit/type/user_spec.rb:266:
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in
 `run'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `each'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `run'

10)
Puppet::DevError in 'Puppet::Type::Group should have a default provider'
Could not find a default provider for group
./spec/unit/type/group_spec.rb:12:
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in
 `run'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `each'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `run'

11)
Puppet::DevError in 'Puppet::Type::Group should have a default provider 
inheriting from Puppet::Provider'
Could not find a default provider for group
./spec/unit/type/group_spec.rb:16:
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in
 `run'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `each'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `run'

12)
Puppet::DevError in 'Puppet::Type::Group should have a boolean method for 
determining if duplicates are allowed'
Could not find a default provider for group
./spec/unit/type/group_spec.rb:43:in `new'
./spec/unit/type/group_spec.rb:43:
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in
 `run'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `each'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `run'

13)
Puppet::DevError in 'Puppet::Type::Group should call 'create' to create the 
group'
Could not find a default provider for group
./spec/unit/type/group_spec.rb:47:in `new'
./spec/unit/type/group_spec.rb:47:
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in
 `run'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `each'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `run'

14)
Puppet::DevError in 'Puppet::Type::Group should call 'delete' to remove the 
group'
Could not find a default provider for group
./spec/unit/type/group_spec.rb:53:in `new'
./spec/unit/type/group_spec.rb:53:
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in
 `run'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `each'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `run'

15)
Puppet::DevError in 'Puppet::Type::Group when validating attributes should 
convert gids provided as strings into integers'
Could not find a default provider for group
./spec/unit/type/group_spec.rb:33:in `new'
./spec/unit/type/group_spec.rb:33:
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in
 `run'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `each'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `run'

16)
Puppet::DevError in 'Puppet::Type::Group when validating attributes should 
accepts gids provided as integers'
Could not find a default provider for group
./spec/unit/type/group_spec.rb:37:in `new'
./spec/unit/type/group_spec.rb:37:
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in
 `run'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `each'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `run'

17)
Puppet::DevError in 'Puppet::Resource::Ral find if there is no instance, it 
should create one'
Could not find a default provider for user
./spec/unit/indirector/resource/ral_spec.rb:27:
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in
 `run'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `each'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `run'

Finished in 190.118989 seconds

8828 examples, 17 failures, 47 pending
</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