Skip to content

Cannot find a resource for create_ebs on amazon version 2012.09 #44

@jonathanq

Description

@jonathanq

I've been trying to get this cookbook working on an Amazon Linux EC2 instance. I'm hitting an error that seems to indicate the files in the extensions folder aren't being loaded.

[2013-01-08T00:47:53+00:00] INFO: HTTP Request Returned 404 Not Found: Cannot load data bag elasticsearch item users

================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/elasticsearch/recipes/ebs.rb
================================================================================

NameError
---------
Cannot find a resource for create_ebs on amazon version 2012.09

Cookbook Trace:
---------------
  /var/chef/cache/cookbooks/elasticsearch/recipes/ebs.rb:12:in `block in from_file'
  /var/chef/cache/cookbooks/elasticsearch/recipes/ebs.rb:7:in `each'
  /var/chef/cache/cookbooks/elasticsearch/recipes/ebs.rb:7:in `from_file'

Relevant File Content:
----------------------
/var/chef/cache/cookbooks/elasticsearch/recipes/ebs.rb:

  5:  # See the `attributes/data` file for instructions.
  6:  #
  7:  node.elasticsearch[:data][:devices].
  8:    reject do |device, params|
  9:      params[:ebs].keys.empty?
 10:    end.
 11:    each do |device, params|
 12>>     create_ebs device, params
 13:  end
 14:  

[2013-01-08T00:47:53+00:00] ERROR: Running exception handlers
[2013-01-08T00:47:53+00:00] FATAL: Saving node information to /var/chef/cache/failed-run-data.json
[2013-01-08T00:47:53+00:00] ERROR: Exception handlers complete
[2013-01-08T00:47:53+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2013-01-08T00:47:53+00:00] FATAL: NameError: Cannot find a resource for create_ebs on amazon version 2012.09

When I look on my chef-server in the cookbook - it doesn't seem to show either of the files in elasticsearch/libraries/extensions/

The UI shows the libraries directory with a single file under it (extensions.rb). No sub-folder called "extensions" containing the 2 files. On my local disk the files are there. I've even removed the cookbook from the server and re-uploaded it to be sure.

I am using version 0.0.5 of the cookbook, version 1.10.0 of cloud aws plugin - and my runlist for the node is:

run_list(
  "recipe[elasticsearch]", 
  "recipe[elasticsearch::plugins]",
  "recipe[elasticsearch::ebs]",
  "recipe[elasticsearch::data]",
  "recipe[elasticsearch::aws]"
)

I had some problems getting the data.json data bag formatted correctly - but this is what I have (that seems to work, although I haven't had a successful run yet to know for sure)

{
  "id": "data",
  "_default" : {
      "devices" : {
        "/dev/sda2" : {
        "file_system"      : "ext3",
          "mount_options"    : "rw,user",
          "mount_path"       : "/usr/local/var/data/elasticsearch/disk1",
          "format_command"   : "mkfs.ext3",
          "fs_check_command" : "dumpe2fs",
          "ebs"            : {
            "region"                : "us-west-2", // Optional: instance region is used by default
            "size"                  : 100,         // In GB
            "delete_on_termination" : true,
            "type"                  : "io1",
            "iops"                  : 2000
          }
        }
      }
    }
}

Any ideas what the problem is?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions