scaleway / docker-machine-driver-scaleway

:whale: Scaleway driver for Docker Machine
MIT License
249 stars 34 forks source link

error provisioning machine #84

Closed gregossito closed 4 years ago

gregossito commented 6 years ago

hello, I can not create a machine on scaleway with docker-machine and the scaleway driver since yesterday at the end of the day. set up: docker for mac Version 18.03.1-ce-mac65 (24312) docker-machine version 0.14.0

with the following command: docker-machine create -d scaleway --scaleway-token=MYSCWTOKEN --scaleway-organization =MYSCWORG --scaleway-name="my-cloud" my-cloud I get as error response: Error creating machine: Error in driver during machine creation: Too many candidates for ubuntu-xenial (2)

I tried many thing, like with --scaleway-commercial-type, because VC1S by default seems to not be anymore in your commercials offers: --scaleway-commercial-type "START1-S" error response: Error creating machine: Error in driver during machine creation: START1-S wrong commercial type

Then I tried to call image by id from scaleway image hub: --scaleway-image=c7dd3987-4b40-48d7-9481-b7fd2e597737 error response: Error creating machine: Error in driver during machine creation: No such bootscript: docker

I've just tried with --scaleway-commercial-type "C2S" wich is still in your offers: error reponse: Error creating machine: Error in driver during machine creation: {"message": "Internal error", "type": "server_error"}

Can you help me and / or give me guidance on the subject? Thank you in advance and have a good day !

gregossito commented 6 years ago

this issue seems to be related to : https://status.online.net/index.php?do=details&task_id=1243

remyleone commented 6 years ago

Indeed but the comment about START1-S not being recognized comes from un-updated dependencies. Will work on it.

gregossito commented 6 years ago

@sieben cool !

gregossito commented 6 years ago

the issue at status.online.net is closed. So I tried to : docker-machine create -d scaleway --scaleway-token=MYSCWTOKEN --scaleway-organization =MYSCWORG --scaleway-name="my-cloud" my-cloud and got: Error creating machine: Error in driver during machine creation: Too many candidates for ubuntu-xenial (2)

remyleone commented 6 years ago

Could you try with an explicit UUID for the image? Like this for instance:

$ docker-machine create --driver scaleway --scaleway-name sample-scaleway.com --scaleway-image dec0cdd6-3ef5-47cf-a777-54a21f732b02 foobar

You can find such UUID (dec0cdd6-3ef5-47cf-a777-54a21f732b02) by using such command:

$ curl  -H "X-Auth-Token: $SCW_TOKEN" https://cp-par1.scaleway.com/images\?name\="ubuntu bionic" | jq
{
  "images": [
    {
      "default_bootscript": {
        "kernel": "http://169.254.42.24/kernel/x86_64-mainline-lts-4.9-4.9.93-rev1/vmlinuz-4.9.93",
        "initrd": "http://169.254.42.24/initrd/initrd-Linux-x86_64-v3.14.4.gz",
        "default": false,
        "bootcmdargs": "LINUX_COMMON scaleway boot=local nbd.max_part=16",
        "architecture": "x86_64",
        "title": "x86_64 mainline 4.9.93 rev1",
        "dtb": "",
        "organization": "11111111-1111-4111-8111-111111111111",
        "id": "15fbd2f7-a0f9-412b-8502-6a44da8d98b8",
        "public": true
      },
      "creation_date": "2018-05-03T08:47:50.759173+00:00",
      "name": "Ubuntu Bionic Beaver",
      "modification_date": "2018-05-03T13:19:33.303206+00:00",
      "organization": "51b656e3-4865-41e8-adbc-0c45bdd780db",
      "extra_volumes": "[]",
      "arch": "x86_64",
      "id": "dec0cdd6-3ef5-47cf-a777-54a21f732b02",
      "root_volume": {
        "size": 50000000000,
        "id": "f3d840bc-1bda-49aa-a9ba-9415d6668e44",
        "volume_type": "l_ssd",
        "name": "snapshot-6fb2e258-d4d8-41b9-bddb-32cd9fb9bd1d-2018-05-03_08:47"
      },
      "public": true
    }
  ]
}
gregossito commented 6 years ago

Tried with --scaleway-image dec0cdd6-3ef5-47cf-a777-54a21f732b02, and got : Error creating machine: Error in driver during machine creation: No such bootscript: docker

I remember that I had a weird issue with another machine a few months ago, but machine was already created and I was able to change bootscript to x86_64 mainline 4.14.33 rev1, after creation, to solve the issue. Maybe it is related?

remyleone commented 6 years ago

I think @superseed and @halmartin are the persons to ask this.

twk3 commented 6 years ago

I am also encountering this error for C1 instances. We get the docker bootstrap error:

Error creating machine: Error in driver during machine creation: No such bootscript: docker

When running:

docker-machine create --driver scaleway --scaleway-commercial-type "C1" --scaleway-image "docker" --scaleway-token "<TOKEN>" --scaleway-organization "<ORG>"  machine-name

And also if I use the image id directly 9879158f-1774-4604-854c-aba08198e2c9

I can create a C1 server with the same image from the scaleway UI, but it's no longer working with docker-machine.

twk3 commented 6 years ago

It appears that scaleway no longer has 'docker' bootscripts. Even from the web UI I am only able to pick from the mainline and the rescue.

Perhaps leaving the bootscript field blank by default here in this driver would be ideal.

twk3 commented 6 years ago

I've created https://github.com/scaleway/docker-machine-driver-scaleway/pull/85 to help work around the missing 'docker' bootscript missing. Allowing us to set the bootscript setting.

gregossito commented 6 years ago

hello @sieben @superseed and @halmartin , have you took a look at @twk3 PR on #85 ? seems to be a good work around. And also, do you know when the --scaleway-commercial-type option will be up to date with the actual offers? have a nice day!

remyleone commented 6 years ago

Hello @gregossito #85 is now merged

remyleone commented 6 years ago

Related to the Scaleway-commercial-type we are currently working on it

gregossito commented 6 years ago

@sieben thanks a lot!

jhoogeboom commented 6 years ago

docker-machine create -d scaleway --scaleway-token=token --scaleway-organization=org-token --scaleway-name="cloud-scaleway-1" --scaleway-commercial-type="VC1S" --scaleway-bootscript="" --scaleway-image="dec0cdd6-3ef5-47cf-a777-54a21f732b02" --scaleway-region "ams1" cloud-scaleway

results in:

Error creating machine: Error in driver during machine creation: StatusCode: 404, Type: unknown_resource, APIMessage: "dec0cdd6-3ef5-47cf-a777-54a21f732b02" not found

remyleone commented 6 years ago

It means that the image UUID is not correct. I can reproduce this error and it is normal. You should find a correct image id. You can see the list of all valid images using https://cp-ams1.scaleway.com/images/

Le mer. 30 mai 2018 à 17:18, jhoogeboom notifications@github.com a écrit :

docker-machine create -d scaleway --scaleway-token=token --scaleway-organization=org-token --scaleway-name="cloud-scaleway-1" --scaleway-commercial-type="VC1S" --scaleway-bootscript="" --scaleway-image="dec0cdd6-3ef5-47cf-a777-54a21f732b02" --scaleway-region "ams1" cloud-scaleway

results in:

Error creating machine: Error in driver during machine creation: StatusCode: 404, Type: unknown_resource, APIMessage: "dec0cdd6-3ef5-47cf-a777-54a21f732b02" not found

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/scaleway/docker-machine-driver-scaleway/issues/84#issuecomment-393201461, or mute the thread https://github.com/notifications/unsubscribe-auth/AASXIvYzZSK4PFENl31KYCeZZV7F0Jijks5t3rg_gaJpZM4T0qu8 .

jhoogeboom commented 6 years ago

oops I mixed par1 and ams1 UUID's, thanks for pointing that out!

jhoogeboom commented 6 years ago

the ubuntu bionic seems to give some issues:

Running pre-create checks...
Creating machine...
(cloud-scaleway) Creating SSH key...
(cloud-scaleway) Creating server...
(cloud-scaleway) Starting server...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(systemd)...
Error creating machine: Error running provisioning: ssh command error:
command : sudo hostname cloud-scaleway && echo "cloud-scaleway" | sudo tee /etc/hostname
err     : exit status 127
output  : bash: sudo: command not found

but xenial works well.