Git Product home page Git Product logo

Comments (9)

poliva83 avatar poliva83 commented on August 27, 2024

@jkeiser @tyler-ball We discussed this issue today I'd rate this issue higher on priority as needing to run chef-client twice when adding new group is less then ideal.

from cheffish.

nlam79 avatar nlam79 commented on August 27, 2024

Phil had mentioned that this issue that i'm seeing with kitchen could be related.
When converging the backend recipe in test-kitchen the following error was observed. Reconverging with no changes resulted in a pass:

Manual run:

  • sudo chef-server-ctl user-list
  • ERROR: Server returned error 500 for https://127.0.0.1/users, retrying 1/5 in 3s
  • Pivotal

Test-Kitchen run:

* chef_user[nlam] action create

           ================================================================================
           Error executing action `create` on resource 'chef_user[nlam]'
           ================================================================================

           Net::HTTPFatalError
           -------------------
           500 "Internal Server Error"

           Resource Declaration:
           ---------------------
           # In /tmp/kitchen/cache/cookbooks/bb_chef_server_cluster/recipes/manage_rbac.rb

            43:   chef_user user do
            44:     display_name "#{values['display_name']}"
            45:     email "#{values['email']}"
            46:     password "#{values['password']}"
            47:     source_key "#{values['source_key']}"
            48:     chef_server url_root
            49:     action :nothing
            50:     not_if { values['source_key'].nil? }
            51:     subscribes :create, 'ruby_block[only modify rbac content on master backend]', :immediately
            52:   end
            53: end

           Compiled Resource:
           ------------------
           # Declared in /tmp/kitchen/cache/cookbooks/bb_chef_server_cluster/recipes/manage_rbac.rb:43:in `block in from_file'

           chef_user("nlam") do
             action [:nothing]
             retries 0
             retry_delay 2
             default_guard_interpreter :default
             chef_server {:chef_server_url=>"https://127.0.0.1:443", :options=>{:client_name=>"pivotal", :signing_key_filename=>"/etc/opscode/pivotal.pem", :api_version=>"0"}}
             declared_type :chef_user
             cookbook_name "bb_chef_server_cluster"
             recipe_name "manage_rbac"
             display_name "Nhid Lam"
             email "[email protected]"
             password "passw0rd"
             source_key "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDU+yPffx9TRlctRhja2hBi3780L+xhBlxxi6apkKN6UdlXgBiFNPVIXhkAgOUWRMpbigNOlF+tQ2se9ItG1uMkJkmArp4TvgCckiXMTro8ZD7cU4yvGwLuziBINdaCFXi9Xvjm8HYc3jXQh2oPAEbmheGd+KIVBMaC/9cWAtsddUpelVaaBHnLmm472sxcvfZFdwRlV5MorJeGvUfC0XUbg+sp1Qufdvpd6TBD4qM2TUDl0loUrjR/5AzUvzNulr+R2+EKFPetj8U/DS9v/5m0lxyRCBZORpGYhuVO5SY2ounSKORwvAtzdNE9/5LWpOEz3YD3/Deb0RbOhMMsmhVV nlam@nlam-chef-provisioning-ws"
             not_if { #code block }
           end


       Running handlers:
       [2015-11-02T20:01:37+00:00] ERROR: Running exception handlers
       Running handlers complete
       [2015-11-02T20:01:37+00:00] ERROR: Exception handlers complete
       Chef Client failed. 70 resources updated in 331.736216745 seconds
       [2015-11-02T20:01:37+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
       [2015-11-02T20:01:37+00:00] ERROR: chef_user[nlam] (bb_chef_server_cluster::manage_rbac line 43) had an error: Net::HTTPFatalError: 500 "Internal Server Error"
       [2015-11-02T20:01:38+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
>>>>>> Converge failed on instance <backend-ubuntu-1404>.
>>>>>> Please see .kitchen/logs/backend-ubuntu-1404.log for more details
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: SSH exited (1) for command: [sh -c '

sudo -E /opt/chef/bin/chef-client --local-mode --config /tmp/kitchen/client.rb --log_level auto --force-formatter --no-color --json-attributes /tmp/kitchen/dna.json --chef-zero-port 8889
']
>>>>>> ----------------------

cat /tmp/kitchen/cache/chef-stacktrace.out
Generated at 2015-11-02 20:01:37 +0000
Net::HTTPFatalError: chef_user[nlam] (bb_chef_server_cluster::manage_rbac line 43) had an error: Net::HTTPFatalError: 500 "Internal Server Error"
/opt/chef/embedded/lib/ruby/2.1.0/net/http/response.rb:119:in `error!'
/opt/chef/embedded/apps/chef/lib/chef/http.rb:145:in `request'
/opt/chef/embedded/apps/chef/lib/chef/http.rb:126:in `post'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/cheffish-1.5.0/lib/cheffish/actor_provider_base.rb:30:in `block in create_actor'
/opt/chef/embedded/apps/chef/lib/chef/mixin/why_run.rb:52:in `call'
/opt/chef/embedded/apps/chef/lib/chef/mixin/why_run.rb:52:in `add_action'
/opt/chef/embedded/apps/chef/lib/chef/provider.rb:175:in `converge_by'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/cheffish-1.5.0/lib/cheffish/actor_provider_base.rb:29:in `create_actor'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/cheffish-1.5.0/lib/chef/provider/chef_user.rb:15:in `block in <class:ChefUser>'
/opt/chef/embedded/apps/chef/lib/chef/provider/lwrp_base.rb:160:in `instance_eval'
/opt/chef/embedded/apps/chef/lib/chef/provider/lwrp_base.rb:160:in `block in action'
/opt/chef/embedded/apps/chef/lib/chef/provider.rb:140:in `run_action'
/opt/chef/embedded/apps/chef/lib/chef/resource.rb:584:in `run_action'
/opt/chef/embedded/apps/chef/lib/chef/runner.rb:49:in `run_action'
/opt/chef/embedded/apps/chef/lib/chef/runner.rb:57:in `block in run_action'
/opt/chef/embedded/apps/chef/lib/chef/runner.rb:55:in `each'
/opt/chef/embedded/apps/chef/lib/chef/runner.rb:55:in `run_action'
/opt/chef/embedded/apps/chef/lib/chef/runner.rb:81:in `block (2 levels) in converge'
/opt/chef/embedded/apps/chef/lib/chef/runner.rb:81:in `each'
/opt/chef/embedded/apps/chef/lib/chef/runner.rb:81:in `block in converge'
/opt/chef/embedded/apps/chef/lib/chef/resource_collection/resource_list.rb:83:in `block in execute_each_resource'
/opt/chef/embedded/apps/chef/lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
/opt/chef/embedded/apps/chef/lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
/opt/chef/embedded/apps/chef/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/opt/chef/embedded/apps/chef/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
/opt/chef/embedded/apps/chef/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/opt/chef/embedded/apps/chef/lib/chef/resource_collection/resource_list.rb:81:in `execute_each_resource'
/opt/chef/embedded/apps/chef/lib/chef/runner.rb:80:in `converge'
/opt/chef/embedded/apps/chef/lib/chef/client.rb:654:in `block in converge'
/opt/chef/embedded/apps/chef/lib/chef/client.rb:649:in `catch'
/opt/chef/embedded/apps/chef/lib/chef/client.rb:649:in `converge'
/opt/chef/embedded/apps/chef/lib/chef/client.rb:688:in `converge_and_save'
/opt/chef/embedded/apps/chef/lib/chef/client.rb:269:in `run'
/opt/chef/embedded/apps/chef/lib/chef/application.rb:270:in `block in fork_chef_client'
/opt/chef/embedded/apps/chef/lib/chef/application.rb:258:in `fork'
/opt/chef/embedded/apps/chef/lib/chef/application.rb:258:in `fork_chef_client'
/opt/chef/embedded/apps/chef/lib/chef/application.rb:224:in `block in run_chef_client'
/opt/chef/embedded/apps/chef/lib/chef/local_mode.rb:39:in `with_server_connectivity'
/opt/chef/embedded/apps/chef/lib/chef/application.rb:212:in `run_chef_client'
/opt/chef/embedded/apps/chef/lib/chef/application/client.rb:402:in `block in interval_run_chef_client'
/opt/chef/embedded/apps/chef/lib/chef/application/client.rb:392:in `loop'
/opt/chef/embedded/apps/chef/lib/chef/application/client.rb:392:in `interval_run_chef_client'
/opt/chef/embedded/apps/chef/lib/chef/application/client.rb:382:in `run_application'
/opt/chef/embedded/apps/chef/lib/chef/application.rb:60:in `run'
/opt/chef/embedded/apps/chef/bin/chef-client:26:in `<top (required)>'
/opt/chef/bin/chef-client:55:in `load'

from cheffish.

jkeiser avatar jkeiser commented on August 27, 2024

@poliva83 what Chef server are you using? I'm seeing things that make me wonder if perhaps the issue is server-side.

from cheffish.

poliva83 avatar poliva83 commented on August 27, 2024

@jkeiser We are seeing this on 12.2.0-1 from stable channel.

from cheffish.

poliva83 avatar poliva83 commented on August 27, 2024

@jkeiser Not sure this matters but worth mentioning its using a HA topology setup (BYOHA model).

from cheffish.

jkeiser avatar jkeiser commented on August 27, 2024

I see the above bug (chef/chef-server#605) on Hosted; not 100% sure if it's the same bug, because it would imply that both create and update were busted. Will investigate more.

from cheffish.

poliva83 avatar poliva83 commented on August 27, 2024

@jkeiser Did your investigation bear fruit? Any news on this issue?

from cheffish.

pburkholder avatar pburkholder commented on August 27, 2024

@poliva83 We're following up on this in chef/chef-server#605

from cheffish.

jkeiser avatar jkeiser commented on August 27, 2024

I can work around it in cheffish by having it create and then immediately update the group.

from cheffish.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.