Fixing an IAM syncing issue. Were duplicates were not properly sync'd… (#638)

* Fixing an IAM syncing issue. Were duplicates were not properly sync'd with Lemur. This resulted in a visibility gap. Even 'duplicates' need to sync'd to Lemur such that we can track rotation correctly. Failing on duplicates lead to missing those certificates and the endpoints onto which they were deployed. This commit removes the duplicate handling altogether.

* Fixing tests.
This commit is contained in:
kevgliss
2017-01-04 17:46:47 -08:00
committed by GitHub
parent e5dee2d7e6
commit 7aa5ba9c6b
6 changed files with 110 additions and 128 deletions

View File

@ -10,6 +10,7 @@ from flask import current_app
from retrying import retry
from lemur.extensions import metrics
from lemur.exceptions import InvalidListener
from lemur.plugins.lemur_aws.sts import sts_client
@ -22,11 +23,12 @@ def retry_throttled(exception):
"""
if isinstance(exception, botocore.exceptions.ClientError):
if exception.response['Error']['Code'] == 'LoadBalancerNotFound':
return
return False
if exception.response['Error']['Code'] == 'CertificateNotFound':
return
return False
metrics.send('ec2_retry', 'counter', 1)
return True