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

[Bug]: RDS Parameter Group updates parameter in loop #1286

Open
1 task done
WolfGanGeRTech opened this issue Apr 23, 2024 · 2 comments
Open
1 task done

[Bug]: RDS Parameter Group updates parameter in loop #1286

WolfGanGeRTech opened this issue Apr 23, 2024 · 2 comments
Labels
bug Something isn't working is:triaged Indicates that an issue has been reviewed.

Comments

@WolfGanGeRTech
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Affected Resource(s)

ParameterGroup.rds.aws.upbound.io

Resource MRs required to reproduce the bug

ParameterGroup.rds.aws.upbound.io

Steps to Reproduce

Create a new ParameterGroup for mysql 8.0 and set the property "innodb_file_per_table": 1

apiVersion: rds.aws.upbound.io/v1beta1
kind: ParameterGroup
metadata:
  name: example-parametergroup
spec:
  forProvider:
    description: example
    family: mysql8.0
    parameter:
      - applyMethod: immediate
        name: innodb_file_per_table
        value: "1"
    region: eu-central-1

Crossplane will start updating AWS in loop, this increases a lot the Cloudtrail costs.

image

What happened?

When a new RDS parameter group is created with property "innodb_file_per_table": 1, crossplane tries to apply this config in loop increasing a lot the cloudtrail costs.

image

I have used a few properties and this is the only one that is returning this problem, however I can not guarantee this is the only property that causes problems.

When I look at cloudtrail:

image

The request shows "isModifiable": false, however this parameter shows as modifiable in the parameter group table:

image

So I am not sure this is the issue.

Relevant Error Output Snippet

No errors seen in Crossplane.

Crossplane Version

12.2.2

Provider Version

0.46

Kubernetes Version

1.27

Kubernetes Distribution

EKS

Additional Info

No response

@WolfGanGeRTech WolfGanGeRTech added the bug Something isn't working label Apr 23, 2024
@WolfGanGeRTech
Copy link
Author

I was able to find the issue, basically this property doesn't allow setting the applyMethod to "immediate" (which is the default on Crossplane). So Crossplane tries to apply it and AWS gives an Ok, however doesn't really change the value, so Crossplane tries again and again.

In these cases it would be good if we could define a retry interval cause a small error in the configs can lead to huge costs.

@turkenf
Copy link
Collaborator

turkenf commented May 9, 2024

Hi @WolfGanGeRTech,

Thank you for raising this issue it can be reproducible with the provider version 1.4.0:

2024-05-09T12:21:34+03:00	DEBUG	provider-aws	Diff detected	{"uid": "f57f26a5-4e88-4fcb-bef0-74d8dd0d0719", "name": "fatih-example-parametergroup", "gvk": "rds.aws.upbound.io/v1beta1, Kind=ParameterGroup", "instanceDiff": "*terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{\"parameter.178632114.apply_method\":*terraform.ResourceAttrDiff{Old:\"\", New:\"immediate\", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"parameter.178632114.name\":*terraform.ResourceAttrDiff{Old:\"\", New:\"innodb_file_per_table\", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"parameter.178632114.value\":*terraform.ResourceAttrDiff{Old:\"\", New:\"1\", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"parameter.2584704414.apply_method\":*terraform.ResourceAttrDiff{Old:\"pending-reboot\", New:\"\", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"parameter.2584704414.name\":*terraform.ResourceAttrDiff{Old:\"innodb_file_per_table\", New:\"\", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"parameter.2584704414.value\":*terraform.ResourceAttrDiff{Old:\"1\", New:\"\", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}}, Destroy:false, DestroyDeposed:false, DestroyTainted:false, RawConfig:cty.NilVal, RawState:cty.NilVal, RawPlan:cty.NilVal, Meta:map[string]interface {}(nil)}"}

@turkenf turkenf added the is:triaged Indicates that an issue has been reviewed. label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working is:triaged Indicates that an issue has been reviewed.
Projects
None yet
Development

No branches or pull requests

2 participants