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

can't convert String into Integer for package 'pam-ccreds' #54

Closed
MrMMorris opened this Issue Sep 29, 2014 · 6 comments

Comments

Projects
None yet
2 participants
@MrMMorris

MrMMorris commented Sep 29, 2014

I added include_recipe 'os-hardening' to my base recipe and ran into this:

TypeError
  ---------
  can't convert String into Integer

  Cookbook Trace:
  ---------------
    /var/chef/cache/cookbooks/os-hardening/recipes/pam.rb:29:in `[]'
    /var/chef/cache/cookbooks/os-hardening/recipes/pam.rb:29:in `block in from_file'
    /var/chef/cache/cookbooks/os-hardening/recipes/pam.rb:28:in `from_file'
    /var/chef/cache/cookbooks/os-hardening/recipes/default.rb:26:in `from_file'
    /var/chef/cache/cookbooks/base/recipes/default.rb:21:in `from_file'
    /var/chef/cache/cookbooks/base/recipes/users.rb:10:in `from_file'
    /var/chef/cache/cookbooks/app_ruby/recipes/default.rb:10:in `from_file'
    /var/chef/cache/cookbooks/app_ruby/recipes/deploy.rb:11:in `from_file'

  Relevant File Content:
  ----------------------
  /var/chef/cache/cookbooks/os-hardening/recipes/pam.rb:

   22:  execute 'update-pam' do
   23:    command 'pam-auth-update --package'
   24:    action :nothing
   25:  end
   26:
   27:  # remove ccreds if not necessary
   28:  package 'pam-ccreds' do
   29>>   package_name node['packages']['pam_ccreds']
   30:    action :remove
   31:  end
   32:
   33:  case node['platform_family']
   34:  # do pam config for ubuntu
   35:  when 'debian'
   36:
   37:    passwdqc_path = '/usr/share/pam-configs/passwdqc'
   38:    tally2_path   = '/usr/share/pam-configs/tally2'


  Running handlers:
[2014-09-29T23:12:12+00:00] ERROR: Running exception handlers
[2014-09-29T23:12:12+00:00] ERROR: Report handler Chef::Handler::Datadog raised #<NoMethodError: undefined method `length' for nil:NilClass>
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-handler-datadog-0.6.0/lib/chef/handler/datadog.rb:196:in `emit_metrics_to_datadog'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-handler-datadog-0.6.0/lib/chef/handler/datadog.rb:27:in `report'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/handler.rb:226:in `run_report_unsafe'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/handler.rb:214:in `run_report_safely'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/handler.rb:118:in `block in run_exception_handlers'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/handler.rb:117:in `each'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/handler.rb:117:in `run_exception_handlers'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/handler.rb:127:in `block in <class:Handler>'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/client.rb:133:in `call'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/client.rb:133:in `block in run_failed'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/client.rb:132:in `each'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/client.rb:132:in `run_failed'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/client.rb:447:in `rescue in do_run'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/client.rb:459:in `do_run'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/client.rb:213:in `block in run'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/client.rb:207:in `fork'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/client.rb:207:in `run'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/application.rb:236:in `run_chef_client'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/application/client.rb:338:in `block in run_application'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/application/client.rb:327:in `loop'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/application/client.rb:327:in `run_application'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/application.rb:55:in `run'
[2014-09-29T23:12:12+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/bin/chef-client:26:in `<top (required)>'
[2014-09-29T23:12:12+00:00] ERROR: /usr/bin/chef-client:23:in `load'
[2014-09-29T23:12:12+00:00] ERROR: /usr/bin/chef-client:23:in `<main>'
    - Chef::Handler::Datadog
  Running handlers complete
[2014-09-29T23:12:12+00:00] ERROR: Exception handlers complete
[2014-09-29T23:12:12+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
  Chef Client failed. 1 resources updated in 11.471867911 seconds
[2014-09-29T23:12:13+00:00] ERROR: can't convert String into Integer
[2014-09-29T23:12:13+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1
@chris-rock

This comment has been minimized.

Show comment
Hide comment
@chris-rock

chris-rock Sep 30, 2014

Member

thanks @MrMMorris for reporting this. I need a little bit more details about the operating system you are using for deployment. Could you place some details please?

Member

chris-rock commented Sep 30, 2014

thanks @MrMMorris for reporting this. I need a little bit more details about the operating system you are using for deployment. Could you place some details please?

@MrMMorris

This comment has been minimized.

Show comment
Hide comment
@MrMMorris

MrMMorris Sep 30, 2014

Ubuntu 14.04

MrMMorris commented Sep 30, 2014

Ubuntu 14.04

@chris-rock

This comment has been minimized.

Show comment
Hide comment
@chris-rock

chris-rock Sep 30, 2014

Member

any special configuration? is it possible to place the run-list? just to be sure, which version are you using?

Member

chris-rock commented Sep 30, 2014

any special configuration? is it possible to place the run-list? just to be sure, which version are you using?

@chris-rock

This comment has been minimized.

Show comment
Hide comment
@chris-rock

chris-rock Sep 30, 2014

Member

I`ve just double-check a Ubuntu 14:04 run and it works fine on my Ubuntu 14:04. Can you place the complete run-list and attributes. It would be great if I would be able to reproduce the error on my side.

Member

chris-rock commented Sep 30, 2014

I`ve just double-check a Ubuntu 14:04 run and it works fine on my Ubuntu 14:04. Can you place the complete run-list and attributes. It would be great if I would be able to reproduce the error on my side.

@chris-rock

This comment has been minimized.

Show comment
Hide comment
@chris-rock

chris-rock Dec 4, 2014

Member

@MrMMorris is this still relevant. I was not able to reproduce this on my side

Member

chris-rock commented Dec 4, 2014

@MrMMorris is this still relevant. I was not able to reproduce this on my side

@MrMMorris

This comment has been minimized.

Show comment
Hide comment
@MrMMorris

MrMMorris Dec 4, 2014

@chris-rock thanks for looking into it. The issue no longer pertains to me so I will close it 👍

MrMMorris commented Dec 4, 2014

@chris-rock thanks for looking into it. The issue no longer pertains to me so I will close it 👍

@MrMMorris MrMMorris closed this Dec 4, 2014

rollbrettler pushed a commit to rollbrettler/chef-os-hardening that referenced this issue Sep 16, 2016

Merge pull request #54 from bkw/ignoreArtefacts
add coverage dir to gitignore, add chefignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment