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

invalid image error #4

Open
stephenamsel opened this issue May 3, 2016 · 2 comments
Open

invalid image error #4

stephenamsel opened this issue May 3, 2016 · 2 comments

Comments

@stephenamsel
Copy link

Hello,

I have successfully tested DOProxy and generated a default Ubuntu server under my load balancer. However, when I try to switch images to one in my account, I receive the following error:
(DropletKit::FailedCreate)
from /usr/share/rvm/gems/ruby-2.1.5/gems/droplet_kit-1.4.1/lib/droplet_kit/resources/droplet_resource.rb:18:in block (3 levels) in <class:DropletResource>' from /usr/share/rvm/gems/ruby-2.1.5/gems/resource_kit-0.1.5/lib/resource_kit/action_invoker.rb:19:ininstance_exec'
from /usr/share/rvm/gems/ruby-2.1.5/gems/resource_kit-0.1.5/lib/resource_kit/action_invoker.rb:19:in handle_response' from /usr/share/rvm/gems/ruby-2.1.5/gems/resource_kit-0.1.5/lib/resource_kit/action_invoker.rb:14:incall'
from /usr/share/rvm/gems/ruby-2.1.5/gems/resource_kit-0.1.5/lib/resource_kit/method_factory.rb:16:in block in method_for_action' from doproxy.rb:64:increate_server'
from doproxy.rb:146:in `

'

The only change I made was in the DOProxy YML file, switching the "image" line to "image: test-server". The size of the server being opened is the same as that of the droplet from which I took the snapshot, a DO standard 1gb server. Do I need to add any further information because the image is a snapshot within my account rather than one of the DO defaults? What can I do to fix this?

@andrewsomething
Copy link

image should be the ID for the image. Only publicly available images have "slugs" like ubuntu-14-04-x64 You can find the ID of an image using:

curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $DO_TOKEN" "https://api.digitalocean.com/v2/images?private=true"

This will return only your images. The response will contain the ID and look like:

{ "images": [
  {
    "id": 5812587,
    "name": "foobar",
    "distribution": "Ubuntu",
    "slug": null,
    "public": false,
    "regions": [
      "nyc3"
    ],
    "created_at": "2014-08-27T04:00:47Z",
    "min_disk_size": 30,
    "type": "snapshot"
  }
]}

So if that is the snapshot you want to use, then you'd put image: 5812587 in the yaml file.

@stephenamsel
Copy link
Author

Thanks! It worked perfectly.

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