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

Compile error w/ 1.0.3 and Chef Server 12 #379

Closed
mikelitka opened this issue Oct 2, 2015 · 10 comments

Comments

Projects
None yet
4 participants
@mikelitka
Copy link

commented Oct 2, 2015

We are getting the following error:

Recipe Compile Error in /var/chef/cache/cookbooks/elasticsearch/libraries/resource_configure.rb

ArgumentError

wrong number of arguments (1 for 0)

Cookbook Trace:

/var/chef/cache/cookbooks/elasticsearch/libraries/resource_configure.rb:6:in <class:ElasticsearchConfigure>' /var/chef/cache/cookbooks/elasticsearch/libraries/resource_configure.rb:5:inclass:Chef'
/var/chef/cache/cookbooks/elasticsearch/libraries/resource_configure.rb:2:in `<top (required)>'

Relevant File Content:

/var/chef/cache/cookbooks/elasticsearch/libraries/resource_configure.rb:

1:
2: class Chef
3: # Chef Resource for configuring an Elasticsearch node
4: #
5: class Resource::ElasticsearchConfigure < Chef::Resource::LWRPBase
6>> resource_name :elasticsearch_configure if respond_to?(:resource_name)
7:
8: actions(:manage, :remove)
9: default_action :manage
10:
11: # if you override one of these, you should probably override them all
12: attribute(:dir, kind_of: String, default: '/usr/local') # creates /usr/local/elasticsearch
13: attribute(:path_conf, kind_of: String, default: nil) # default "/usr/local/etc/elasticsearch"
14: attribute(:path_data, kind_of: String, default: nil) # default "/usr/local/var/data/elasticsearch"
15: attribute(:path_logs, kind_of: String, default: nil) # default "/usr/local/var/log/elasticsearch"

@martinb3

This comment has been minimized.

Copy link
Contributor

commented Oct 2, 2015

Hello! I'm not sure if chef-server is relevant here; could you let us know what specific version of chef-client are you using? Thanks!

@mikelitka

This comment has been minimized.

Copy link
Author

commented Oct 6, 2015

11.12.4

@mikelitka

This comment has been minimized.

Copy link
Author

commented Oct 6, 2015

Upgrading the client to 12.4.3 resolved the issue. Thanks for the insight.

@mikelitka mikelitka closed this Oct 6, 2015

@martinb3

This comment has been minimized.

Copy link
Contributor

commented Oct 6, 2015

Hi there -- indeed, we've seen some issues with chef 11 and have dropped support for it in the newer versions. Glad you found a solution!

@davidski

This comment has been minimized.

Copy link

commented Oct 6, 2015

Is the current 1.x cookbook train incompatible with Chef 11 even with the removal of the dependency on Poise? Us poor souls on AWS OpsWorks are stuck with 11.10 at the moment (still running the 0.3.x train there).

@martinb3

This comment has been minimized.

Copy link
Contributor

commented Oct 6, 2015

@davidski Technically, we actually are testing with the 1.x releases on the latest chef 11.x, but this bug was about an earlier version, so I'm guessing something was broken in the earlier release being used.

@martinb3

This comment has been minimized.

Copy link
Contributor

commented Oct 6, 2015

At some point I do want to bump the major version again and drop Chef 11.x support, as even within Chef 12 there are so many breaking changes between minor releases, that it's getting difficult to maintain and test so many different suites... :(

@phanhaiquang

This comment has been minimized.

Copy link

commented Oct 29, 2015

I am using chef-client version '12.4.3', but still get issue.

1:
2: class Chef
3: # Chef Resource for configuring an Elasticsearch node
4: #
5: class Resource::ElasticsearchConfigure < Chef::Resource::LWRPBase
6>> resource_name :elasticsearch_configure if respond_to?(:resource_name)
7:
8: actions(:manage, :remove)
9: default_action :manage
10:
11: # if you override one of these, you should probably override them all
12: attribute(:dir, kind_of: String, default: '/usr/local') # creates /usr/local/elasticsearch
13: attribute(:path_conf, kind_of: String, default: nil) # default "/usr/local/etc/elasticsearch"
14: attribute(:path_data, kind_of: String, default: nil) # default "/usr/local/var/data/elasticsearch"
15: attribute(:path_logs, kind_of: String, default: nil) # default "/usr/local/var/log/elasticsearch"

[2015-10-29T12:52:01-04:00] ERROR: Running exception handlers
[2015-10-29T12:52:01-04:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated
[2015-10-29T12:52:01-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2015-10-29T12:52:01-04:00] FATAL: ArgumentError: wrong number of arguments (1 for 0)
ERROR: RuntimeError: chef-solo failed. See output above.
➜ myapp git:(master) ✗ chef-client -version
Chef: 12.4.3

@martinb3

This comment has been minimized.

Copy link
Contributor

commented Oct 29, 2015

@phanhaiquang Could you open a separate issue for this one? resource_name was added in 12.4.0, so I'm thinking maybe you're on a different problem.

@phanhaiquang

This comment has been minimized.

Copy link

commented Oct 29, 2015

@martinb3 Thanks for your prompt response. I created another issue with more information
#386

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.