chef-training / chef_classroom

Chef-provisioning cookbook for managing a Chef Training Classroom
Other
5 stars 6 forks source link

Sub-sequent runs to deploy the portal raises an error: #48

Open burtlo opened 9 years ago

burtlo commented 9 years ago

Running:

chef-client -z -r 'recipe[chef_classroom::deploy_portal]'

The output:

    - run 'bash -c ' bash /tmp/chef-install.sh -v 12.2.1'' on frank-2-portal[2015-10-12T13:50:16-07:00] INFO: Processing chef_node[frank-2-portal] action create (basic_chef_client::block line 57)
[2015-10-12T13:50:16-07:00] INFO: Converging frank-2-portal because 'converge true' is set ...
[2015-10-12T13:50:16-07:00] INFO: Port forwarded: local URL chefzero://localhost:8889 is available to 54.210.16.93 as chefzero://localhost:8889 for the duration of this SSH connection.
[2015-10-12T13:50:16-07:00] INFO: Executing chef-client -l info on root@54.210.16.93

    [frank-2-portal] [2015-10-12T20:50:09+00:00] INFO: Forking chef instance to converge...
                     Starting Chef Client, version 12.3.0
                     [2015-10-12T20:50:09+00:00] INFO: *** Chef 12.3.0 ***
                     [2015-10-12T20:50:09+00:00] INFO: Chef-client pid: 11471

                     ================================================================================
                     Chef encountered an error attempting to load the node data for "frank-2-portal"
                     ================================================================================

                     Unexpected Error:
                     -----------------
                     ChefZero::ServerNotFound: No socketless chef-zero server on given port 8889

                     [2015-10-12T20:50:10+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
                     Chef Client failed. 0 resources updated in 1.983800342 seconds
                     [2015-10-12T20:50:11+00:00] ERROR: No socketless chef-zero server on given port 8889
                     [2015-10-12T20:50:11+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
[2015-10-12T13:50:21-07:00] INFO: Completed chef-client -l info on root@54.210.16.93: exit status 1

    ================================================================================
    Error executing action `converge` on resource 'machine[frank-2-portal]'
    ================================================================================

    RuntimeError
    ------------
    Error: command 'chef-client -l info' exited with code 1.

    Resource Declaration:
    ---------------------
    # In /Users/franklinwebber/training/provisioners/chef_classroom/local-mode-cache/cache/cookbooks/chef_classroom/recipes/deploy_portal.rb

     44: machine "#{name}-portal" do
     45:   machine_options create_machine_options(region, 'centos', portal_size, workstation_key, 'portal')
     46:   recipe 'chef_portal::fundamentals_3x'
     47:   converge true
     48: end

    Compiled Resource:
    ------------------
    # Declared in /Users/franklinwebber/training/provisioners/chef_classroom/local-mode-cache/cache/cookbooks/chef_classroom/recipes/deploy_portal.rb:44:in `from_file'

    machine("frank-2-portal") do
      action :converge
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      chef_server {:chef_server_url=>"chefzero://localhost:8889", :options=>{:client_name=>"local_workstation", :signing_key_filename=>nil}}
      driver "aws::us-east-1"
      machine_options {:region=>"us-east-1", :ssh_username=>"root", :convergence_options=>{:ssl_verify_mode=>:verify_none, :chef_version=>"12.2.1"}, :bootstrap_options=>{:instance_type=>"m3.medium", :image_id=>"ami-c2a818aa", :key_name=>"frank-2-workstation_key", :security_group_ids=>"training-frank-2-portal", :iam_instance_profile=>"arn:aws:iam::404885260443:instance-profile/classroom"}}
      declared_type :machine
      cookbook_name "chef_classroom"
      recipe_name "deploy_portal"
      run_list_modifiers [#<Chef::RunList::RunListItem:0x007fb6e07aa028 @version=nil, @type=:recipe, @name="chef_portal::fundamentals_3x">]
      converge true
    end

[2015-10-12T13:50:21-07:00] INFO: Running queued delayed notifications before re-raising exception
burtlo commented 9 years ago

I ran into this before and then it simply went away after time.

burtlo commented 9 years ago

Alright using ChefDK 0.6.2 and it seems that is a chef provisioning issue.

https://github.com/chef/chef-provisioning-aws/issues/202

burtlo commented 9 years ago

This works with ChefDK 0.8.1. But I have not tested this from a fresh start.