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

Fixed issue where an unexisting instance could not be destroyed. #50

Merged
merged 1 commit into from
Sep 7, 2019

Conversation

jlesage
Copy link
Contributor

@jlesage jlesage commented Sep 6, 2019

I'm using the autoscaler with DigitalOcean. The autoscaler went into a state where the server count was not reflecting the reality. For example, when no Droplet existed on my account, the autoscaler was reporting something different:

9:12AM DBG check capacity id=Bjc93TuZjLNlUqoc max-pool=4 min-pool=0 pending-builds=0 running-builds=0 server-buffer=0 server-capacity=4 server-count=2

Attempting to remove these servers with the cli via server destroy command results with the following error on the autoscaler:

11:03AM DBG destroying server server=agent-p8clg4bK
11:03AM WRN cannot stop the agent error="Cannot connect to the Docker daemon at https://134.209.214.159:2376. Is the docker daemon running?" server=agent-p8clg4bK
11:03AM WRN droplet does not exist error="GET https://api.digitalocean.com/v2/droplets/141608491: 404 The resource you were accessing could not be found." image=docker-18-04 name=agent-p8clg4bK region=nyc1 size=s-4vcpu-8gb
11:03AM ERR failed to destroy server server=agent-p8clg4bK

This PR fixes the removal of these servers by looking at the error, similarily to what is done in engine/reaper.go.

@bradrydzewski
Copy link
Member

thanks!

@bradrydzewski bradrydzewski merged commit 76a3845 into drone:master Sep 7, 2019
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

Successfully merging this pull request may close these issues.

2 participants