Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter_aws: fixed group metadata fetch issue and addressed (CID 507941) #9220

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions plugins/filter_aws/aws.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ static int get_ec2_tag_keys(struct flb_filter_aws *ctx)
flb_sds_destroy(tags_list);
return -1;
}
ctx->tag_keys_len = flb_calloc(ctx->tags_count, sizeof(size_t*));
ctx->tag_keys_len = flb_calloc(ctx->tags_count, sizeof(size_t));
if (!ctx->tag_keys_len) {
flb_errno();
flb_sds_destroy(tags_list);
Expand Down Expand Up @@ -804,7 +804,8 @@ static int ec2_metadata_group_should_fetch(struct flb_filter_aws *ctx,

interval = now - group->last_fetch_attempt;

if (interval < required_interval) {
if (group->last_fetch_attempt > 0 &&
interval < required_interval) {
return FLB_FALSE;
}
return FLB_TRUE;
Expand Down
Loading