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

422 You specified an invalid image for Droplet creation #3394

Closed
finid opened this Issue Apr 28, 2016 · 27 comments

Comments

Projects
None yet
9 participants
@finid

finid commented Apr 28, 2016

When attempting to create a machine on DigitalOcean, specifying an OS type using --digitalocean-image centos-7-x86_64, I'm getting the following error.

Error creating machine: Error in driver during machine creation: POST https://api.digitalocean.com/v2/droplets: 422 You specified an invalid image for Droplet creation

I can specify almost any other Linux distribution supported on DigitalOcean, but not CentOS, and I've tried different ways of passing the image name to the command.

What is the recommended naming scheme for specifying a CentOS image to docker-machine create?

@nathanleclaire

This comment has been minimized.

Show comment
Hide comment
@nathanleclaire

nathanleclaire Apr 28, 2016

Contributor

Are you sure you have the slug right?

Is it centos-7-x64?

Contributor

nathanleclaire commented Apr 28, 2016

Are you sure you have the slug right?

Is it centos-7-x64?

@nathanleclaire

This comment has been minimized.

Show comment
Hide comment
@nathanleclaire

nathanleclaire Apr 29, 2016

Contributor

Please re-open if you have confirmed that the URL slug is 100% accurate and the issue persists

Contributor

nathanleclaire commented Apr 29, 2016

Please re-open if you have confirmed that the URL slug is 100% accurate and the issue persists

@nrvale0

This comment has been minimized.

Show comment
Hide comment
@nrvale0

nrvale0 Jul 25, 2016

But wasn't that precisely the question being asked: "What's the naming scheme?" or "Where's the list?"

nrvale0 commented Jul 25, 2016

But wasn't that precisely the question being asked: "What's the naming scheme?" or "Where's the list?"

@nathanleclaire

This comment has been minimized.

Show comment
Hide comment
@nathanleclaire

nathanleclaire Jul 25, 2016

Contributor

The list is available through the DigitalOcean API.

Contributor

nathanleclaire commented Jul 25, 2016

The list is available through the DigitalOcean API.

@nrvale0

This comment has been minimized.

Show comment
Hide comment
@nrvale0

nrvale0 Jul 25, 2016

It would be really nice if this info were in the docs. Or at least something like the command below was in the docs.

FYI, a bunch of them, including the Ubuntu ones which are often referenced in tutorials, appear to not/no longer have slugs and/or no longer exist(?!?). For instance, I don't see Ubuntu LTS releases below.

$ http get https://api.digitalocean.com/v2/images "Authorization: Bearer ${TOKEN}" | jq -r '.images[] | [.id, .slug, .name, .distribution] | @csv'
18539132,"coreos-beta","1081.5.0 (beta)","CoreOS"
6372321,"centos-5-8-x64","5.10 x64","CentOS"
6372425,"centos-5-8-x32","5.10 x32","CentOS"
10144573,"freebsd-10-1-x64","10.1","FreeBSD"
13321858,"freebsd-10-2-x64","10.2","FreeBSD"
14238961,"fedora-23-x64","23 x64","Fedora"
14782899,"centos-6-5-x32","6.7 x32","CentOS"
14782952,"centos-6-5-x64","6.7 x64","CentOS"
15621816,,"15.10 x64","Ubuntu"
15621817,,"15.10 x32","Ubuntu"
16071652,,"cloudbench-ycsb-on-1404.030216-1","Ubuntu"
16071743,,"cloudbench-hibench-on-1404.030216-1","Ubuntu"
16082940,,"cloudbench-nullworkload-on-1404.030316-6","Ubuntu"
16623283,"debian-7-0-x32","7.10 x32","Debian"
16623308,"debian-7-0-x64","7.10 x64","Debian"
17384153,,"7.2 x64","CentOS"
17550956,,"hadoop1","Ubuntu"
17551182,,"cassandra1","Ubuntu"
18027532,"fedora-24-x64","24 x64","Fedora"
18290419,,"7.11 x32","Debian"

nrvale0 commented Jul 25, 2016

It would be really nice if this info were in the docs. Or at least something like the command below was in the docs.

FYI, a bunch of them, including the Ubuntu ones which are often referenced in tutorials, appear to not/no longer have slugs and/or no longer exist(?!?). For instance, I don't see Ubuntu LTS releases below.

$ http get https://api.digitalocean.com/v2/images "Authorization: Bearer ${TOKEN}" | jq -r '.images[] | [.id, .slug, .name, .distribution] | @csv'
18539132,"coreos-beta","1081.5.0 (beta)","CoreOS"
6372321,"centos-5-8-x64","5.10 x64","CentOS"
6372425,"centos-5-8-x32","5.10 x32","CentOS"
10144573,"freebsd-10-1-x64","10.1","FreeBSD"
13321858,"freebsd-10-2-x64","10.2","FreeBSD"
14238961,"fedora-23-x64","23 x64","Fedora"
14782899,"centos-6-5-x32","6.7 x32","CentOS"
14782952,"centos-6-5-x64","6.7 x64","CentOS"
15621816,,"15.10 x64","Ubuntu"
15621817,,"15.10 x32","Ubuntu"
16071652,,"cloudbench-ycsb-on-1404.030216-1","Ubuntu"
16071743,,"cloudbench-hibench-on-1404.030216-1","Ubuntu"
16082940,,"cloudbench-nullworkload-on-1404.030316-6","Ubuntu"
16623283,"debian-7-0-x32","7.10 x32","Debian"
16623308,"debian-7-0-x64","7.10 x64","Debian"
17384153,,"7.2 x64","CentOS"
17550956,,"hadoop1","Ubuntu"
17551182,,"cassandra1","Ubuntu"
18027532,"fedora-24-x64","24 x64","Fedora"
18290419,,"7.11 x32","Debian"
@staxmanade

This comment has been minimized.

Show comment
Hide comment
@staxmanade

staxmanade Jul 26, 2016

Following this tutorial: https://www.digitalocean.com/community/tutorials/how-to-provision-and-manage-remote-docker-hosts-with-docker-machine-on-ubuntu-16-04

I get this:

$DOTOKEN=MY_TOKEN
docker-machine create --driver digitalocean --digitalocean-access-token $DOTOKEN docker-multi-environment

Running pre-create checks...
Creating machine...
(docker-multi-environment) Creating SSH key...
(docker-multi-environment) Creating Digital Ocean droplet...
Error creating machine: Error in driver during machine creation: POST https://api.digitalocean.com/v2/droplets: 422 You specified an invalid image for Droplet creation.

Not sure what I'm missing...

staxmanade commented Jul 26, 2016

Following this tutorial: https://www.digitalocean.com/community/tutorials/how-to-provision-and-manage-remote-docker-hosts-with-docker-machine-on-ubuntu-16-04

I get this:

$DOTOKEN=MY_TOKEN
docker-machine create --driver digitalocean --digitalocean-access-token $DOTOKEN docker-multi-environment

Running pre-create checks...
Creating machine...
(docker-multi-environment) Creating SSH key...
(docker-multi-environment) Creating Digital Ocean droplet...
Error creating machine: Error in driver during machine creation: POST https://api.digitalocean.com/v2/droplets: 422 You specified an invalid image for Droplet creation.

Not sure what I'm missing...

@nrvale0

This comment has been minimized.

Show comment
Hide comment
@nrvale0

nrvale0 Jul 26, 2016

@staxmanade That's almost identical scenario and error message which brought me here. I'm new to DO but from what I posted above it sure seems like the available set of images has changed and some of the images which are still there may be missing necessary metadata.

nrvale0 commented Jul 26, 2016

@staxmanade That's almost identical scenario and error message which brought me here. I'm new to DO but from what I posted above it sure seems like the available set of images has changed and some of the images which are still there may be missing necessary metadata.

@gfrivolt

This comment has been minimized.

Show comment
Hide comment
@gfrivolt

gfrivolt Jul 26, 2016

I'm facing the same issue, either I specify or not specify the image name, it fails with the same issue.

Could somebody reopen this issue? I don't have the button to Reopen.

gfrivolt commented Jul 26, 2016

I'm facing the same issue, either I specify or not specify the image name, it fails with the same issue.

Could somebody reopen this issue? I don't have the button to Reopen.

@ringling

This comment has been minimized.

Show comment
Hide comment
@ringling

ringling Jul 26, 2016

I had the same issue, and specified an image like this --digitalocean-image ubuntu-14-04-x64
That solved it for me

Read step 4: https://www.digitalocean.com/community/tutorials/how-to-provision-and-manage-remote-docker-hosts-with-docker-machine-on-ubuntu-16-04

ringling commented Jul 26, 2016

I had the same issue, and specified an image like this --digitalocean-image ubuntu-14-04-x64
That solved it for me

Read step 4: https://www.digitalocean.com/community/tutorials/how-to-provision-and-manage-remote-docker-hosts-with-docker-machine-on-ubuntu-16-04

@nrvale0

This comment has been minimized.

Show comment
Hide comment
@nrvale0

nrvale0 Jul 26, 2016

@ringling Any chance you could run the httpie + jq query above and compare your results? I wasn't getting an Ubuntu 14.04 at all let alone an image referencable by slug.

nrvale0 commented Jul 26, 2016

@ringling Any chance you could run the httpie + jq query above and compare your results? I wasn't getting an Ubuntu 14.04 at all let alone an image referencable by slug.

@nathanleclaire

This comment has been minimized.

Show comment
Hide comment
@nathanleclaire

nathanleclaire Jul 26, 2016

Contributor

Odd, the defaults should work. Hopefully DO didn't just change their image slugs all of a sudden. I'll look into it. This is with Machine 0.7.0? Have you tried the 0.8.0-rc2?

Contributor

nathanleclaire commented Jul 26, 2016

Odd, the defaults should work. Hopefully DO didn't just change their image slugs all of a sudden. I'll look into it. This is with Machine 0.7.0? Have you tried the 0.8.0-rc2?

@gfrivolt

This comment has been minimized.

Show comment
Hide comment
@gfrivolt

gfrivolt Jul 26, 2016

@nathanleclaire docker-machine version 0.8.0-rc2, build 4ca1b85

gfrivolt commented Jul 26, 2016

@nathanleclaire docker-machine version 0.8.0-rc2, build 4ca1b85

@staxmanade

This comment has been minimized.

Show comment
Hide comment
@staxmanade

staxmanade Jul 26, 2016

@nathanleclaire docker-machine version 0.7.0, build a650a40

staxmanade commented Jul 26, 2016

@nathanleclaire docker-machine version 0.7.0, build a650a40

@ringling

This comment has been minimized.

Show comment
Hide comment
@ringling

ringling Jul 26, 2016

@nathanleclaire Works with --digitalocean-image on docker-machine version 0.6.0, build e27fb87, yesterday it worked without !

ringling commented Jul 26, 2016

@nathanleclaire Works with --digitalocean-image on docker-machine version 0.6.0, build e27fb87, yesterday it worked without !

@ringling

This comment has been minimized.

Show comment
Hide comment
@ringling

ringling Jul 26, 2016

@nrvale0

18539132,"coreos-beta","1081.5.0 (beta)","CoreOS"
6372321,"centos-5-8-x64","5.10 x64","CentOS"
6372425,"centos-5-8-x32","5.10 x32","CentOS"
10144573,"freebsd-10-1-x64","10.1","FreeBSD"
13321858,"freebsd-10-2-x64","10.2","FreeBSD"
14238961,"fedora-23-x64","23 x64","Fedora"
14782899,"centos-6-5-x32","6.7 x32","CentOS"
14782952,"centos-6-5-x64","6.7 x64","CentOS"
15621816,,"15.10 x64","Ubuntu"
15621817,,"15.10 x32","Ubuntu"
16071652,,"cloudbench-ycsb-on-1404.030216-1","Ubuntu"
16071743,,"cloudbench-hibench-on-1404.030216-1","Ubuntu"
16082940,,"cloudbench-nullworkload-on-1404.030316-6","Ubuntu"
16623283,"debian-7-0-x32","7.10 x32","Debian"
16623308,"debian-7-0-x64","7.10 x64","Debian"
17384153,,"7.2 x64","CentOS"
17550956,,"hadoop1","Ubuntu"
17551182,,"cassandra1","Ubuntu"
18027532,"fedora-24-x64","24 x64","Fedora"
18290419,,"7.11 x32","Debian"

ringling commented Jul 26, 2016

@nrvale0

18539132,"coreos-beta","1081.5.0 (beta)","CoreOS"
6372321,"centos-5-8-x64","5.10 x64","CentOS"
6372425,"centos-5-8-x32","5.10 x32","CentOS"
10144573,"freebsd-10-1-x64","10.1","FreeBSD"
13321858,"freebsd-10-2-x64","10.2","FreeBSD"
14238961,"fedora-23-x64","23 x64","Fedora"
14782899,"centos-6-5-x32","6.7 x32","CentOS"
14782952,"centos-6-5-x64","6.7 x64","CentOS"
15621816,,"15.10 x64","Ubuntu"
15621817,,"15.10 x32","Ubuntu"
16071652,,"cloudbench-ycsb-on-1404.030216-1","Ubuntu"
16071743,,"cloudbench-hibench-on-1404.030216-1","Ubuntu"
16082940,,"cloudbench-nullworkload-on-1404.030316-6","Ubuntu"
16623283,"debian-7-0-x32","7.10 x32","Debian"
16623308,"debian-7-0-x64","7.10 x64","Debian"
17384153,,"7.2 x64","CentOS"
17550956,,"hadoop1","Ubuntu"
17551182,,"cassandra1","Ubuntu"
18027532,"fedora-24-x64","24 x64","Fedora"
18290419,,"7.11 x32","Debian"
@staxmanade

This comment has been minimized.

Show comment
Hide comment
@staxmanade

staxmanade Jul 26, 2016

I got it working with: (the id for the --digitalocean-image 15621816 - I just picked out the id from list from above...

docker-machine create --driver digitalocean --digitalocean-access-token $DOTOKEN --digitalocean-image 15621816 docker-multi-environment

staxmanade commented Jul 26, 2016

I got it working with: (the id for the --digitalocean-image 15621816 - I just picked out the id from list from above...

docker-machine create --driver digitalocean --digitalocean-access-token $DOTOKEN --digitalocean-image 15621816 docker-multi-environment
@staxmanade

This comment has been minimized.

Show comment
Hide comment
@staxmanade

staxmanade Jul 26, 2016

Would be ideal to get the default working as it used to...

staxmanade commented Jul 26, 2016

Would be ideal to get the default working as it used to...

@nathanleclaire

This comment has been minimized.

Show comment
Hide comment
@nathanleclaire

nathanleclaire Jul 26, 2016

Contributor

I have no idea why but it looks like they pulled the slugs for several images including the Ubuntu one that was our default.

Contributor

nathanleclaire commented Jul 26, 2016

I have no idea why but it looks like they pulled the slugs for several images including the Ubuntu one that was our default.

@nathanleclaire

This comment has been minimized.

Show comment
Hide comment
@nathanleclaire

nathanleclaire Jul 26, 2016

Contributor

Please consider filing a ticket with DigitalOcean support. In the interim I'll also continue investigating whether or not this is intentional behavior on their end, and what we should do about it for Machine.

$ curl -s -X GET "https://api.digitalocean.com/v2/images" -H "Authorization: Bearer $DIGITALOCEAN_ACCESS_TOKEN" | jq . | grep slug
      "slug": "coreos-beta",
      "slug": "centos-5-8-x64",
      "slug": "centos-5-8-x32",
      "slug": "freebsd-10-1-x64",
      "slug": "freebsd-10-2-x64",
      "slug": "fedora-23-x64",
      "slug": "centos-6-5-x32",
      "slug": "centos-6-5-x64",
      "slug": null,
      "slug": null,
      "slug": null,
      "slug": null,
      "slug": null,
      "slug": "debian-7-0-x32",
      "slug": "debian-7-0-x64",
      "slug": null,
      "slug": null,
      "slug": null,
      "slug": "fedora-24-x64",
      "slug": null,
Contributor

nathanleclaire commented Jul 26, 2016

Please consider filing a ticket with DigitalOcean support. In the interim I'll also continue investigating whether or not this is intentional behavior on their end, and what we should do about it for Machine.

$ curl -s -X GET "https://api.digitalocean.com/v2/images" -H "Authorization: Bearer $DIGITALOCEAN_ACCESS_TOKEN" | jq . | grep slug
      "slug": "coreos-beta",
      "slug": "centos-5-8-x64",
      "slug": "centos-5-8-x32",
      "slug": "freebsd-10-1-x64",
      "slug": "freebsd-10-2-x64",
      "slug": "fedora-23-x64",
      "slug": "centos-6-5-x32",
      "slug": "centos-6-5-x64",
      "slug": null,
      "slug": null,
      "slug": null,
      "slug": null,
      "slug": null,
      "slug": "debian-7-0-x32",
      "slug": "debian-7-0-x64",
      "slug": null,
      "slug": null,
      "slug": null,
      "slug": "fedora-24-x64",
      "slug": null,
@nathanleclaire

This comment has been minimized.

Show comment
Hide comment
@nathanleclaire

nathanleclaire Jul 26, 2016

Contributor

Maybe we can switch to using the ID instead like you suggest @staxmanade

Contributor

nathanleclaire commented Jul 26, 2016

Maybe we can switch to using the ID instead like you suggest @staxmanade

@nathanleclaire

This comment has been minimized.

Show comment
Hide comment
@nathanleclaire

nathanleclaire Jul 26, 2016

Contributor

Yeah ID seems to work so I will probably switch to that for the quick fix.

Contributor

nathanleclaire commented Jul 26, 2016

Yeah ID seems to work so I will probably switch to that for the quick fix.

@nathanleclaire

This comment has been minimized.

Show comment
Hide comment
@nathanleclaire

nathanleclaire Jul 26, 2016

Contributor

I filed a ticket w/ DO support as well.

Contributor

nathanleclaire commented Jul 26, 2016

I filed a ticket w/ DO support as well.

@kevinkga

This comment has been minimized.

Show comment
Hide comment
@kevinkga

kevinkga Jul 27, 2016

I've been having this for the past couple of days and figured that it must be something to do with the image it was trying to use.

I'm using it with docker-machine, and it seems from the documentation that the default image is ubuntu-15-10-x64, if not explicitly provided (see https://docs.docker.com/machine/drivers/digital-ocean/).

Having changed that to DIGITALOCEAN_IMAGE="ubuntu-16-04-x64" solves the issue for me.

kevinkga commented Jul 27, 2016

I've been having this for the past couple of days and figured that it must be something to do with the image it was trying to use.

I'm using it with docker-machine, and it seems from the documentation that the default image is ubuntu-15-10-x64, if not explicitly provided (see https://docs.docker.com/machine/drivers/digital-ocean/).

Having changed that to DIGITALOCEAN_IMAGE="ubuntu-16-04-x64" solves the issue for me.

@staxmanade

This comment has been minimized.

Show comment
Hide comment
@staxmanade

staxmanade commented Jul 27, 2016

👍

@wscherphof

This comment has been minimized.

Show comment
Hide comment
@wscherphof

wscherphof Jul 29, 2016

Had the same issue, docker-machine create --driver digitalocean --digitalocean-access-token <token> --digitalocean-image ubuntu-16-04-x64 do-manager-1 worked for me.

wscherphof commented Jul 29, 2016

Had the same issue, docker-machine create --driver digitalocean --digitalocean-access-token <token> --digitalocean-image ubuntu-16-04-x64 do-manager-1 worked for me.

@nathanleclaire

This comment has been minimized.

Show comment
Hide comment
@nathanleclaire

nathanleclaire Jul 29, 2016

Contributor

This should be fixed with 0.8.0 which was just released.

Contributor

nathanleclaire commented Jul 29, 2016

This should be fixed with 0.8.0 which was just released.

@tomtruitt

This comment has been minimized.

Show comment
Hide comment
@tomtruitt

tomtruitt Aug 2, 2016

yes it is ^

tomtruitt commented Aug 2, 2016

yes it is ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment