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

NoMethodError undefined method `platform_version' for #<Chef::Node::Attribute:0x0000000004678a00> #195

Open
smmnazar opened this issue Aug 25, 2022 · 0 comments

Comments

@smmnazar
Copy link

When I am doing kitchen converge I am getting following error. I am running this on Windows Docker Desktop and using dokken centos72 image.

================================================================================
Recipe Compile Error in /opt/kitchen/cache/cookbooks/rsyslog/attributes/default.rb

NoMethodError

undefined method `platform_version' for #Chef::Node::Attribute:0x0000000004678a00

Cookbook Trace:

/opt/kitchen/cache/cookbooks/rsyslog/attributes/default.rb:47:in `from_file'

Relevant File Content:

/opt/kitchen/cache/cookbooks/rsyslog/attributes/default.rb:

40: default['rsyslog']['enable_imklog'] = true
41: default['rsyslog']['config_prefix'] = '/etc'
42: default['rsyslog']['default_file_template'] = nil
43: default['rsyslog']['default_remote_template'] = nil
44: default['rsyslog']['rate_limit_interval'] = nil
45: default['rsyslog']['rate_limit_burst'] = nil
46: default['rsyslog']['enable_tls'] = false
47>> default['rsyslog']['tls_driver'] = if platform_family?('rhel') && platform_version.to_i == 7
48: 'gtls'
49: else
50: 'ossl'
51: end
52: default['rsyslog']['action_queue_max_disk_space'] = '1G'
53: default['rsyslog']['tls_ca_file'] = nil
54: default['rsyslog']['tls_certificate_file'] = nil
55: default['rsyslog']['tls_key_file'] = nil
56: default['rsyslog']['tls_auth_mode'] = 'anon'

System Info:

chef_version=15.7.32
platform=centos
platform_version=7.9.2009
ruby=ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]
program_name=/opt/chef/embedded/bin/chef-client
executable=/opt/chef/embedded/bin/chef-client

Running handlers:
[2022-08-25T06:34:50+00:00] ERROR: Running exception handlers
Running handlers complete
[2022-08-25T06:34:50+00:00] ERROR: Exception handlers complete
Chef Infra Client failed. 0 resources updated in 01 seconds
[2022-08-25T06:34:50+00:00] FATAL: Stacktrace dumped to /opt/kitchen/cache/chef-stacktrace.out
[2022-08-25T06:34:50+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2022-08-25T06:34:50+00:00] FATAL: NoMethodError: undefined method `platform_version' for #Chef::Node::Attribute:0x0000000004678a00

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

1 participant