Power on after snapshot not working via API

Posted May 1, 2017 1.6k views

I am using tugboat to script a poweroff/snapshot of one of my droplets, and everything goes really well until the droplet snapshot completes… then the droplet never powers back on. Is this by design? Is there some state I can look for to indicate the droplet snapshot has completed to then issue the power on command?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Hi @GreymanIndustries

Yes, it’s by design. The “create snapshot” command doesn’t automatically send a “power on” command too.

When you run the create snapshot, in the response body you get an id of the action.
This id can be queried to get the status which returns in-progress, completed, errored.
Then you can loop that action query and trigger when it’s completed and send a “power on”.

Thanks, Hansen, that worked beautifully! I’m a little bit embarrassed by my inability to RTM, but I really appreciate your taking the time to respond!