Open nitrocode opened 4 years ago
do you have the full traceback?
Yes. I modified the ticket to add it.
This came up in Gitter today also, courtesy of @cpitstick-argo :
We run a lot of spot instances that wink in and out constantly. So sometimes, Cloud Custodian will attempt to tag a resource that doesn't exist, because in between the time it discovered the resource and tried to tag it, the tagging operation fails, so we get a lot of these types of errors: An error occurred (InvalidVolume.NotFound) when calling the CreateTags operation: The volume 'vol-XXXXXXXXXXXXX' does not exist.
With a similar sample policy:
- name: ebs-tag-unattached-volume
resource: ebs
description: |
EBS volume is unattached
filters:
- Attachments: []
actions:
- type: tag
key: "cloud-custodian-flagged"
value: "ebs-volume-is-unattached"
- type: mark-for-op
tag: cloud-custodian-action
op: delete
hours: 0
I spoke with @ajkerrigan and he said it may be related to the last 2 lines in this block
Describe the bug
The following exception is thrown
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Background (please complete the following information):
policies:
custodian version --debug
outputAdditional context The workaround for now has been to pin down cloudcustodian to 0.9.1.0.
https://github.com/cloud-custodian/cloud-custodian/issues/5375 https://github.com/cloud-custodian/cloud-custodian/issues/3531