EBS fault-tolerant filter doesn't filter as expected #7378
Replies: 2 comments 1 reply
-
the fault tolerant filter just uses trusted advisor (checkId H7IgTzjTYb), afaics this is because we don't expose the color mapping to days that the advisor does in the console ie quoting from that check
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick response! That checkId helps me understand better what's going on here. It seems to me this filter isn't filtering out fault tolerant EBS volumes as defined. Can you confirm I'm reading this correctly? When I run 'aws support describe-trusted-advisor-check-result --check-id H7IgTzjTYb', I see all 7 of my EBS volumes listed in "flaggedResources". Those with snapshots in the last 7 days have "status": "ok" and a metadata entry of "Green". Those without a snapshot have "status": "error" and a metadata entry of "Red". I suspect a volume with a snapshot 7-30 days old would have a different status and metadata entry of "Yellow", but I don't currently have a snapshot that age to verify. The Cloud Custodian class FaultTolerantSnapshots includes all volumes in "flaggedResources" in its list of flagged resources, so I'm either getting all of my EBS volumes returned or none of them depending on True/False setting of tolerant in the policy. I think there should be a check in there to look at either the status or the metadata color to properly filter for fault-tolerance. |
Beta Was this translation helpful? Give feedback.
-
I'm attempting to use a basic EBS fault-tolerant policy (policy included below) to identify EBS volumes that do not have a snapshot from the last 7 days. I have tried this with 'custodian run -s output --cache-period 0 getebsfaulttolerant.yml' as well as in a CloudTamer compliance check with the same results.
In my AWS account, I have 7 EBS volumes; 2 of them have snapshots taken in the last 3 days. AWS Trusted Advisor reports "5 of 7 volumes do not have a recent snapshot." However, the custodian policy below returns all 7 EBS volumes. When I ran the same policy with 'tolerant: True', I got 0 volumes returned, so custodian is responding consistently but not as I expected.
Do I have my policy written correctly? Is there something specific that must be done with the snapshots to have custodian recognize the volumes as fault-tolerant?
Please include any sample policy [sanitized ~ no sensitive info or account ids] to indicate
what you've tried so far.
policies:
resource: aws.ebs
filters:
tolerant: False
Beta Was this translation helpful? Give feedback.
All reactions