New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Issue 301 #301

Merged
merged 2 commits into from Sep 8, 2015

Conversation

Projects
None yet
4 participants
@jjasghar
Collaborator

jjasghar commented Sep 4, 2015

Fix for Issue 301

JJ Asghar
Fix for Issue 300
- Added a template for forceyes for Debian based repos
- bumped per x.y.Z per a patch/fix

@jjasghar jjasghar added the in progress label Sep 4, 2015

@jjasghar jjasghar changed the title from Inital enforcement of Gemfile.lock to Fix for Issue 301 Sep 4, 2015

@michaelklishin

This comment has been minimized.

Show comment
Hide comment
@michaelklishin
Member

michaelklishin commented Sep 4, 2015

👍

@jjasghar jjasghar added the needs tests label Sep 5, 2015

JJ Asghar

@jjasghar jjasghar removed the needs tests label Sep 5, 2015

jjasghar pushed a commit that referenced this pull request Sep 8, 2015

@jjasghar jjasghar merged commit e557128 into master Sep 8, 2015

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@jjasghar jjasghar removed the in progress label Sep 8, 2015

@jjasghar jjasghar deleted the issue_300 branch Sep 8, 2015

@Kaelten

This comment has been minimized.

Show comment
Hide comment
@Kaelten

Kaelten Sep 8, 2015

This fix creates a new bug. It uses those fields but doesn't provide default values for them. Results in nil does not have a [] operator errors.

Kaelten commented Sep 8, 2015

This fix creates a new bug. It uses those fields but doesn't provide default values for them. Results in nil does not have a [] operator errors.

@jjasghar

This comment has been minimized.

Show comment
Hide comment
@jjasghar

jjasghar Sep 8, 2015

Collaborator

I admit it's not ideal, but it does work. If seems apt is smart enough to just not do anything if there is a nil in the quotes.

Have you seen this fail some place? I haven't able to make it fail.

Collaborator

jjasghar commented Sep 8, 2015

I admit it's not ideal, but it does work. If seems apt is smart enough to just not do anything if there is a nil in the quotes.

Have you seen this fail some place? I haven't able to make it fail.

@solarkennedy

This comment has been minimized.

Show comment
Hide comment
@solarkennedy

solarkennedy Sep 8, 2015

Yes, I don't have any confd attributes available to use. Here is my stacktrace if it helps:

Generated at 2015-09-08 04:28:41 +0000
Chef::Mixin::Template::TemplateError: 

Chef::Mixin::Template::TemplateError (undefined method `[]' for nil:NilClass) on line #1:

  1: APT::Get::Assume-Yes "<%= node['apt']['confd']['assume_yes'] ? 1 : 0 %>";
  2: APT::Get::force-yes "<%= node['apt']['confd']['force-yes'] ? 1 : 0 %>";

  (erubis):1:in `block in evaluate'
  /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/erubis-2.7.0/lib/erubis/evaluator.rb:74:in `instance_eval'
  /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/erubis-2.7.0/lib/erubis/evaluator.rb:74:in `evaluate'
  /opt/chef/embedded/apps/chef/lib/chef/mixin/template.rb:114:in `_render_template'
  /opt/chef/embedded/apps/chef/lib/chef/mixin/template.rb:100:in `render_template'
  /opt/chef/embedded/apps/chef/lib/chef/provider/template/content.rb:43:in `file_for_provider'
  /opt/chef/embedded/apps/chef/lib/chef/file_content_management/content_base.rb:40:in `tempfile'
  /opt/chef/embedded/apps/chef/lib/chef/provider/file.rb:462:in `tempfile'
  /opt/chef/embedded/apps/chef/lib/chef/provider/file.rb:339:in `do_generate_content'
  /opt/chef/embedded/apps/chef/lib/chef/provider/file.rb:150:in `action_create'
  /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: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/lib/ruby/2.1.0/forwardable.rb:183: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/solo.rb:280:in `block in interval_run_chef_client'
  /opt/chef/embedded/apps/chef/lib/chef/application/solo.rb:269:in `loop'
  /opt/chef/embedded/apps/chef/lib/chef/application/solo.rb:269:in `interval_run_chef_client'
  /opt/chef/embedded/apps/chef/lib/chef/application/solo.rb:247:in `run_application'
  /opt/chef/embedded/apps/chef/lib/chef/application.rb:60:in `run'
  /opt/chef/embedded/apps/chef/bin/chef-solo:25:in `<top (required)>'
  /usr/bin/chef-solo:55:in `load'
  /usr/bin/chef-solo:55:in `<main>'

solarkennedy commented Sep 8, 2015

Yes, I don't have any confd attributes available to use. Here is my stacktrace if it helps:

Generated at 2015-09-08 04:28:41 +0000
Chef::Mixin::Template::TemplateError: 

Chef::Mixin::Template::TemplateError (undefined method `[]' for nil:NilClass) on line #1:

  1: APT::Get::Assume-Yes "<%= node['apt']['confd']['assume_yes'] ? 1 : 0 %>";
  2: APT::Get::force-yes "<%= node['apt']['confd']['force-yes'] ? 1 : 0 %>";

  (erubis):1:in `block in evaluate'
  /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/erubis-2.7.0/lib/erubis/evaluator.rb:74:in `instance_eval'
  /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/erubis-2.7.0/lib/erubis/evaluator.rb:74:in `evaluate'
  /opt/chef/embedded/apps/chef/lib/chef/mixin/template.rb:114:in `_render_template'
  /opt/chef/embedded/apps/chef/lib/chef/mixin/template.rb:100:in `render_template'
  /opt/chef/embedded/apps/chef/lib/chef/provider/template/content.rb:43:in `file_for_provider'
  /opt/chef/embedded/apps/chef/lib/chef/file_content_management/content_base.rb:40:in `tempfile'
  /opt/chef/embedded/apps/chef/lib/chef/provider/file.rb:462:in `tempfile'
  /opt/chef/embedded/apps/chef/lib/chef/provider/file.rb:339:in `do_generate_content'
  /opt/chef/embedded/apps/chef/lib/chef/provider/file.rb:150:in `action_create'
  /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: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/lib/ruby/2.1.0/forwardable.rb:183: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/solo.rb:280:in `block in interval_run_chef_client'
  /opt/chef/embedded/apps/chef/lib/chef/application/solo.rb:269:in `loop'
  /opt/chef/embedded/apps/chef/lib/chef/application/solo.rb:269:in `interval_run_chef_client'
  /opt/chef/embedded/apps/chef/lib/chef/application/solo.rb:247:in `run_application'
  /opt/chef/embedded/apps/chef/lib/chef/application.rb:60:in `run'
  /opt/chef/embedded/apps/chef/bin/chef-solo:25:in `<top (required)>'
  /usr/bin/chef-solo:55:in `load'
  /usr/bin/chef-solo:55:in `<main>'
@jjasghar

This comment has been minimized.

Show comment
Hide comment
@jjasghar

jjasghar Sep 8, 2015

Collaborator

Well, that's a problem. I'll try to get a fix out ASAP, i'm open to suggestions if you have any good ideas.

Collaborator

jjasghar commented Sep 8, 2015

Well, that's a problem. I'll try to get a fix out ASAP, i'm open to suggestions if you have any good ideas.

@jjasghar

This comment has been minimized.

Show comment
Hide comment
@jjasghar

jjasghar Sep 8, 2015

Collaborator

ok, bumped to 4.2.2 with 4fd6a85 to resolve this. I put in kitchen tests for both false and true, and also leveraged the default for the default run. I believe this is fixed now, and i've pushed this out to the supermarket already too.

Collaborator

jjasghar commented Sep 8, 2015

ok, bumped to 4.2.2 with 4fd6a85 to resolve this. I put in kitchen tests for both false and true, and also leveraged the default for the default run. I believe this is fixed now, and i've pushed this out to the supermarket already too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment