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:
@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user