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

Unable to remove a stopped machine #99

Open
mjrider opened this issue Apr 17, 2019 · 4 comments
Open

Unable to remove a stopped machine #99

mjrider opened this issue Apr 17, 2019 · 4 comments

Comments

@mjrider
Copy link

mjrider commented Apr 17, 2019

I get the following error when trying to delete a stopped machine. Not sure if it is a machine driver or a api issue. But not being able to delete an stopped instance sound like a bug to me

$docker-machine create --driver=scaleway --scaleway-commercial-type=DEV1-S --scaleway-image=debian_stretch --scaleway-region=par1 --scaleway-name="testing-docker-machine" testing-docker-machine
....
$ docker-machine stop testing-docker-machine
Stopping "testing-docker-machine"...
Machine "testing-docker-machine" was stopped.
$ docker-machine rm testing-docker-machine
About to remove testing-docker-machine
WARNING: This action will delete both local reference and remote instance.
Are you sure? (y/n): y
Error removing host "testing-docker-machine": StatusCode: 400, Type: invalid_request_error, APIMessage: server should be running

after starting i'm able to delete the machine

$ docker-machine start testing-docker-machine
Starting "testing-docker-machine"...
Machine "testing-docker-machine" was started.
Waiting for SSH to be available...
Detecting the provisioner...
Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
$ docker-machine rm testing-docker-machine
About to remove testing-docker-machine
WARNING: This action will delete both local reference and remote instance.
Are you sure? (y/n): y
Successfully removed testing-docker-machine
@mjrider
Copy link
Author

mjrider commented Apr 17, 2019

i found this issue when i was trying to use scaleway as gitlab-runner with the docker+machine autoscaling feature. This prevents the gitlab-runner from functioning correctly because it could not delete instances

@pierredittgen
Copy link

I've got similar issues using a 'docker+machine' gitlab runner. Gitlab runner can't remove archived machines. Errors found in /var/log/syslog:

ERROR: Error removing host "runner-7iqb95xu-dbnomics-autoscale-runner-1569232922-eb14a01e": StatusCode: 400, Type: invalid_request_error, APIMessage: server should be running  name=runner-7iqb95xu-dbnomics-autoscale-runner-1569232922-eb14a01e operation=remove

@anthonybriand
Copy link

Same problem here cannot remove archived machines

@xorti
Copy link

xorti commented Apr 24, 2020

Same problem here.
It really needs to delete the instance instead of archiving it.

Apr 24 15:50:02 orion gitlab-runner[31566]: About to remove runner-yjcsa7c4-gitlab-runner-autoscale-1587738586-0b2e29ff  name=runner-yjcsa7c4-gitlab-runner-autoscale-1587738586-0b2e29ff operation=remove
Apr 24 15:50:02 orion gitlab-runner[31566]: WARNING: This action will delete both local reference and remote instance.  name=runner-yjcsa7c4-gitlab-runner-autoscale-1587738586-0b2e29ff operation=remove

Screenshot 2020-04-24 at 4 08 54 PM

P.S.: I also have an issue where the MachineName is not reflected on Scaleway instances name.

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

4 participants