api-v2
api-v2 copied to clipboard
NYC2 shutdown/snapshot race issue
I think this is a bit of a compound problem, I use packer to build base snapshots on digital ocean On LON1, NYC3 I have no problems, however on NYC2 after the build process completes I seem to run into a shutdown/snapshot race issue
NYC2
==> digitalocean: Gracefully shutting down droplet...
==> digitalocean: Creating snapshot: staging-14.10-snap
==> digitalocean: Error creating snapshot: digitalocean request error: map[id:unprocessable_entity message:Droplet already has a pending event.]
==> digitalocean: Destroying droplet...
==> digitalocean: Error destroying droplet. Please destroy it manually: curl 'https://api.digitalocean.com/droplets/[droplet_id_redacted]/destroy?client_id=&api_key='
==> digitalocean: Deleting temporary ssh key...
Build 'digitalocean' errored: Error creating snapshot: digitalocean request error: map[id:unprocessable_entity message:Droplet already has a pending event.]
NYC3
==> digitalocean: Gracefully shutting down droplet...
==> digitalocean: Creating snapshot: staging-14.10-snap
==> digitalocean: Waiting for snapshot to complete...
==> digitalocean: Destroying droplet...
==> digitalocean: Deleting temporary ssh key...
Build 'digitalocean' finished.
Seems like this would be worth bringing up to packer. We only allow certain events to process serially. The completion of the shutdown should be verified before the snapshot is issued.
From curl 'https://api.digitalocean.com/droplets/[droplet_id_redacted]/destroy?client_id=&api_key='
it looks to be using the V1 api, but to echo what @macb said it looks like the shutdown event is still pending when the snapshot event is issued.
OK I'll bump it over to packer see what they say, thanks @macb @brookemckim