Skip to content
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

Property key_size must be one of: Integer! You passed nil. #137

Open
KTM25 opened this issue Jun 14, 2023 · 1 comment
Open

Property key_size must be one of: Integer! You passed nil. #137

KTM25 opened this issue Jun 14, 2023 · 1 comment

Comments

@KTM25
Copy link

KTM25 commented Jun 14, 2023

Chef::Exceptions::ValidationFailed
----------------------------------
Property key_size must be one of: Integer! You passed nil.

Cookbook Trace: (most recent call first)
----------------------------------------
/var/chef/cache/cookbooks/acme/resources/selfsigned.rb:44:in `block (2 levels) in class_from_file'
/var/chef/cache/cookbooks/acme/resources/selfsigned.rb:39:in `block in class_from_file'    

acme_selfsigned("test.example.com") do
action [:create]
default_guard_interpreter :default
declared_type :acme_selfsigned
recipe_name "ssl"
crt "/etc/ssl/test.example.com.crt"
key "/etc/ssl/test.example.com.key"
cn "test.example.com"
owner "root"
group "root"
end

System Info:
------------
chef_version=18.2.7
platform=ubuntu
platform_version=18.04
ruby=ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]
program_name=/usr/bin/chef-client
executable=/opt/chef/bin/chef-client

Running handlers:
[2023-06-14T14:49:31-07:00] ERROR: Running exception handlers
Running handlers complete
[2023-06-14T14:49:31-07:00] ERROR: Exception handlers complete
Infra Phase failed. 0 resources updated in 04 seconds
[2023-06-14T14:49:31-07:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2023-06-14T14:49:31-07:00] FATAL: ---------------------------------------------------------------------------------------
[2023-06-14T14:49:31-07:00] FATAL: PLEASE PROVIDE THE CONTENTS OF THE stacktrace.out FILE (above) IF YOU FILE A BUG REPORT
[2023-06-14T14:49:31-07:00] FATAL: ---------------------------------------------------------------------------------------
[2023-06-14T14:49:31-07:00] FATAL: Chef::Exceptions::ValidationFailed: acme_selfsigned[test.example.com] had an error: Chef::Exceptions::ValidationFailed: Property key_size must be one of: Integer! You passed nil.

>>>> Caused by Chef::Exceptions::ValidationFailed: Property key_size must be one of: Integer!  You passed nil.
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/mixin/params_validate.rb:445:in `_pv_is'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/mixin/params_validate.rb:113:in `block (2 levels) in validate'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/mixin/params_validate.rb:110:in `each'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/mixin/params_validate.rb:110:in `block in validate'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/mixin/params_validate.rb:98:in `each'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/mixin/params_validate.rb:98:in `validate'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/property.rb:540:in `validate'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/property.rb:750:in `coerce_and_validate'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/property.rb:742:in `stored_value_to_output'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/property.rb:418:in `get'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/property.rb:371:in `call'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/property.rb:595:in `key_size'
/var/chef/cache/cookbooks/acme/resources/selfsigned.rb:44:in `block (2 levels) in class_from_file'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/resource_builder.rb:72:in `instance_exec'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/resource_builder.rb:72:in `build'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/dsl/declare_resource.rb:313:in `build_resource'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/dsl/declare_resource.rb:265:in `declare_resource'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/dsl/resources.rb:36:in `file'
/var/chef/cache/cookbooks/acme/resources/selfsigned.rb:39:in `block in class_from_file'
(eval):2:in `block in action_create'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/provider.rb:304:in `instance_eval'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/provider.rb:304:in `compile_and_converge_action'
(eval):2:in `action_create'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/provider.rb:245:in `run_action'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/resource.rb:601:in `block in run_action'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/resource.rb:628:in `with_umask'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/resource.rb:600:in `run_action'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/runner.rb:74:in `run_action'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/runner.rb:108:in `block in run_all_actions'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/runner.rb:108:in `each'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/runner.rb:108:in `run_all_actions'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/runner.rb:132:in `block in converge'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/resource_collection/resource_list.rb:96:in `block in execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/resource_collection/stepable_iterator.rb:114:in `call_iterator_block'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/resource_collection/stepable_iterator.rb:103:in `iterate'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/resource_collection/stepable_iterator.rb:54:in `each_with_index'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/resource_collection/resource_list.rb:94:in `execute_each_resource'
/opt/chef/embedded/lib/ruby/3.1.0/forwardable.rb:238:in `execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/runner.rb:130:in `converge'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/client.rb:869:in `block in converge'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/client.rb:864:in `catch'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/client.rb:864:in `converge'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/client.rb:888:in `converge_and_save'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/client.rb:298:in `run'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/application.rb:305:in `run_with_graceful_exit_option'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/application.rb:281:in `block in run_chef_client'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/local_mode.rb:42:in `with_server_connectivity'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/application.rb:264:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/application/base.rb:352:in `run_application'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib/chef/application.rb:67:in `run'
/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-bin-18.2.7/bin/chef-client:25:in `<top (required)>'
/usr/bin/chef-client:180:in `load'
/usr/bin/chef-client:180:in `<main>'
@thoutenbos
Copy link
Collaborator

Is the default attribute file loaded?
https://github.com/schubergphilis/chef-acme/blob/master/attributes/default.rb#L29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants