cloud-gov / cf-cdn-service-broker

A Cloud Foundry service broker for CloudFront and Let's Encrypt
Other
10 stars 13 forks source link

Async actions should time out #6

Open jmcarp opened 8 years ago

jmcarp commented 8 years ago

Cloud foundry will happily retry async actions like provision and deprovision indefinitely. Since pending actions can't be canceled via the cli (as far as I can tell, anyway), we should probably flag them as failed if they haven't resolved after some interval. This will prevent us from accumulating unused services that users can't delete.

jmcarp commented 8 years ago

What do you think about this @dlapiduz? If a user runs create-service and then never CNAMEs over their domain, we'll never delete the distribution, and the service can't be deleted, which is bad. How about a configurable timeout (which we can set to a few hours), and if the CNAME doesn't propagate by then, we fail the provision and clean up the distribution.

If we don't have time to prioritize this during work hours, I might take this on as my open-source weekend persona.

jmcarp commented 8 years ago

@dlapiduz also suggested adding a route that we can hit to cancel a pending distribution. If I understand correctly, this would work, but could be a pain to use. We could add the route to the pending message, so that users could look it up with cf service, but how would users authenticate--secureauth?