Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Provisioning spot instance can leave dangling spot request #3555

Closed
jimfleming opened this issue Jun 29, 2016 · 5 comments
Closed

Provisioning spot instance can leave dangling spot request #3555

jimfleming opened this issue Jun 29, 2016 · 5 comments
Milestone

Comments

@jimfleming
Copy link

jimfleming commented Jun 29, 2016

Using docker-machine to provision a spot instance opens a spot request and waits for it to be fulfilled. If this fails, docker-machine exits but the spot request remains open and may be fulfilled later. This results in a dangling spot request with an active instance.

@alexanderkjeldaas
Copy link

This seems to happen in many other cases as well.

$ ./docker-machine-setup.sh  # Run docker-machine create with spot instance..
Running pre-create checks...
Creating machine...
(aws01) Launching instance...
(aws01) Waiting for spot instance...
^C
[0]  ~$ docker-machine rm aws01
About to remove aws01
Are you sure? (y/n): y
Error removing host "aws01": unknown instance
MissingParameter: The request must contain the parameter KeyName
        status code: 400, request id:

Similarly if the spot request is canceled in the console. Same thing happens.

@alexanderkjeldaas
Copy link

alexanderkjeldaas commented Sep 8, 2016

Also:

$ docker-machine ls
NAME    ACTIVE   DRIVER      STATE   URL   SWARM   DOCKER    ERRORS
aws01   -        amazonec2   Error                 Unknown   MissingParameter: The request must contain the parameter InstanceId
        status code: 400, request id:

It seems like the docker-machine state machine is completely missing a state - the fact that this machine has not been allocated yet?!! Not having allocated a spot instance is not an 'Error' state.

@chillosu
Copy link

This plagues our CI runners constantly with spot instances.

@peternijssen
Copy link

Same issue here. Someone figured a work-around?

@nolith
Copy link
Contributor

nolith commented Nov 23, 2017

I did a patch for a proper cleanup of dangling resource in case of AWS machine creation failure. #4317

@shin- shin- added this to the 0.14.0 milestone Feb 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants