presslabs / zinc

Route 53 zone manager.
https://www.presslabs.com/code/zinc/
Other
42 stars 2 forks source link

Healthchecks should be created synchronously #126

Closed calind closed 7 years ago

calind commented 7 years ago

When creating an IP object, the healthchecks should be created synchronously. If an IP doesn't have an healthcheck, the logic for creating policy records gets very complicated for no obvious gain. We should couple IP creation with the creation of healthchecks, and fail hard if we cannot create an healthcheck.

rciorba commented 7 years ago

The only problem that comes to mind is we don't actually know if a healthcheck failed to create with 100% certainty.

The correct behaviour is to retry the creation using the same CallerReference, or else we might end up with duplicate healthchecks. So my proposal is to trigger the creation on IP creation, then fallback to the reconciliation logic later on.

A unique string that identifies the request and that allows failed CreateHostedZone requests to be retried without the risk of executing the operation twice.

http://boto3.readthedocs.io/en/latest/reference/services/route53.html#Route53.Client.create_health_check