sous-chefs / users

Development repository for the users cookbook
https://supermarket.chef.io/cookbooks/users
Apache License 2.0
138 stars 217 forks source link

3.0.0 breaks `users_manage` #335

Closed ianbamforth closed 7 years ago

ianbamforth commented 8 years ago

The 3.0.0 release seems to have broken users_manage - it worked yesterday (~13:00 UTC) with 2.0.3.

Cookbook version

3.0.0

Chef-client version

12.4.1

Platform Details

Ubuntu 14.04

Scenario:

users_manage 'my_user' do action [ :create ] end

Steps to Reproduce:

Expected Result:

a user to be created

Actual Result:

users_manage[my_user] action create[2016-08-03T10:17:31+00:00] WARN: Failed to read the private key /etc/chef/client.pem: #<Errno::ENOENT: No such file or directory @ rb_sysopen - /etc/chef/client.pem>

    ================================================================================
    Error executing action `create` on resource 'users_manage[my_user]'
    ================================================================================

    Chef::Exceptions::PrivateKeyMissing
    -----------------------------------
    I cannot read /etc/chef/client.pem, which you told me to use to sign requests!

    Cookbook Trace:
    ---------------
    /home/jenkins/chef-solo/cookbooks-2/users/providers/manage.rb:40:in `block in class_from_file'

    Resource Declaration:
    ---------------------
    # In <blah>/recipes/default.rb

     23: users_manage 'my_user' do
     24:   action [ :create ]
     25: end
     26: 

    Compiled Resource:
    ------------------
    # Declared in <blah>/recipes/default.rb:23:in `from_file'

    users_manage("my_user") do
      action [:create]
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      declared_type :users_manage
      cookbook_name :my_cookbook
      recipe_name "default"
      group_name "my_user"
      data_bag "users"
      search_group "my_user"
    end
ianbamforth commented 8 years ago

Suspect this is a result of https://github.com/chef-cookbooks/users/commit/43c802d053d40bbda456067aef1a1c85e5ed5ad5. Not sure of the philosophical reasons behind binning chef-solo support, but it might be good to put some kind of warning in the readme?

nkadel-skyhook commented 8 years ago

Looks like chef-solo is being deprecated by upstream in favor of chef-zero. It's already replaced with chef-zero in chefdk.

I'm afraid this is going to be very bad for anyone currently using chef-solo.

tas50 commented 7 years ago

We've moved this cookbook away from chef-solo and we instead rely on the server functionality in chef zero. If you're on a newer chef-client this should just work with local mode. If not you'll definitely want to pin back to an older release of the cookbook where the legacy solo mode is still a first class citizen.