Skip to content

Cookbook fails when 'bootstrap true' added to config #133

@simoninkin

Description

@simoninkin

Cookbook version

5.0.1

Platform Details

DigitalOcean

Steps to Reproduce:

Put the 'bootstrap true' in default['chef-server']['configuration'] and run the cookbook

For example:

default['chef-server']['configuration'] = <<-EOS bootstrap true ip_version "ipv4" notification_email "dev@company.com" nginx['cache_max_size'] = "3500m" EOS

Actual Result:

The cookbook fails to start with an error:

`

   ================================================================================
   Recipe Compile Error in /var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/default.rb
   ================================================================================
   
   NoMethodError
   -------------
   undefined method `[]' for true:TrueClass
   
   Cookbook Trace:
   ---------------
     /var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/oc_id.rb:156:in `from_file'
     /var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/default.rb:148:in `block in from_file'
     /var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/default.rb:131:in `each'
     /var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/default.rb:131:in `from_file'
   
   Relevant File Content:
   ----------------------
   /var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/oc_id.rb:
   
   149:    only_if { is_data_master? }
   150:  end
   151:
   152:  component_runit_service "oc_id" do
   153:    package 'private_chef'
   154:  end
   155:
   156>> if node['private_chef']['bootstrap']['enable']
   157:    execute "/opt/opscode/bin/private-chef-ctl start oc_id" do
   158:      retries 20
   159:    end
   160:  end
   161:
   162:  # Take the existing oc_id.applications (with only a redirect_uri), ensure they
   163:  # exist in the database, and dump their data to /etc/opscode/oc-id-applications.
   164:  node['private_chef']['oc_id']['applications'].each do |name, app|
   165:    oc_id_application name do
   
   Platform:
   ---------
   x86_64-linux
   
   [2017-03-08T15:51:45+00:00] ERROR: Running exception handlers
   [2017-03-08T15:51:45+00:00] ERROR: Exception handlers complete
   [2017-03-08T15:51:45+00:00] FATAL: Stacktrace dumped to /var/opt/opscode/local-mode-cache/chef-stacktrace.out
   [2017-03-08T15:51:45+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
   [2017-03-08T15:51:45+00:00] FATAL: NoMethodError: undefined method `[]' for true:TrueClass
   STDERR: 
   ---- End output of chef-server-ctl reconfigure ----
   Ran chef-server-ctl reconfigure returned 1
   [2017-03-08T15:51:45+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)`

I've been trying to get this working and it only works without this option set in the config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Triage: Needs InformationIndicates an issue needs more information in order to work on it.Triage: SupportIndicates an issue that is a support question and will be redirected to other mediums.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions