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]: MQ Configuration resource enters an update loop with a wrong data #1449

Open
1 task done
turkenf opened this issue Aug 7, 2024 · 1 comment
Open
1 task done
Labels
bug Something isn't working needs:triage stale

Comments

@turkenf
Copy link
Collaborator

turkenf commented Aug 7, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Affected Resource(s)

mq.aws.upbound.io/v1beta1 - Configuration

Resource MRs required to reproduce the bug

First yaml:

apiVersion: mq.aws.upbound.io/v1beta1
kind: Configuration
metadata:
  name: example
spec:
  forProvider:
    # Due to an existing Terrajet limitation, we cannot use "metadata.name" for "name"
    # Details can be found in https://github.com/crossplane/terrajet/issues/280
    name: example-config
    region: us-west-1
    data: |
      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <broker xmlns="http://activemq.apache.org/schema/core">
        <plugins>
          <forcePersistencyModeBrokerPlugin persistenceFlag="true"/>
          <statisticsBrokerPlugin/>
          <timeStampingBrokerPlugin ttlCeiling="86400000" zeroExpirationOverride="86400000"/>
        </plugins>
      </broker>
    description: Example Configuration
    engineType: ActiveMQ
    engineVersion: 5.16.7

Second yaml:

apiVersion: mq.aws.upbound.io/v1beta1
kind: Configuration
metadata:
  name: example
spec:
  forProvider:
    # Due to an existing Terrajet limitation, we cannot use "metadata.name" for "name"
    # Details can be found in https://github.com/crossplane/terrajet/issues/280
    name: example-config
    region: us-west-1
    data: |
      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <broker xmlns="http://activemq.apache.org/schema/core">
        <plugins>
          <forcePersistencyModeBrokerPlugin persistenceFlg="true"/>
          <statisticsBrokerPlugin/>
          <timeStampingBrokerPlugin ttlCeiling="86400000" zeroExpirationOverride="86400000"/>
        </plugins>
      </broker>
    description: Example Configuration
    engineType: ActiveMQ
    engineVersion: 5.16.7

Steps to Reproduce

  1. Install the provider-aws-mq
  2. Apply the first yaml file
  3. Wait until the resource is created successfully
  4. Apply the second yaml file (diff: persistenceFlag => persistenceFlg)

What happened?

When we try to update the data field with an incorrect attribute, the resource enters the update cycle and produces new revisions. It gives an error after reaching 300 revisions (SYNCED=False, READY=True).

    message: 'update failed: async update failed: failed to update the resource: [{0
      updating MQ Configuration (c-508ec4bf-4637-48a8-826e-c2217cac66b4): operation
      error mq: UpdateConfiguration, https response error StatusCode: 400, RequestID:
      6be15a7b-d1c3-48ac-863b-7a77c562f2ef, BadRequestException: Maximum number of
      configuration revisions [300] has been reached. Create a new configuration.  []}]'

When I try to edit it in the AWS console with the wrong attribute, it removes the relevant line and creates a new revision and gives the following warning:

Screenshot 2024-08-07 at 17 52 37

Relevant Error Output Snippet

2024-08-07T14:37:01Z	DEBUG	provider-aws	Diff detected	{"uid": "04a6d542-653a-4448-bfd0-5c3dbcb7d11e", "name": "example", "gvk": "mq.aws.upbound.io/v1beta1, Kind=Configuration", "instanceDiff": "*terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{\"data\":*terraform.ResourceAttrDiff{Old:\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\n<broker xmlns=\\\"http://activemq.apache.org/schema/core\\\">\\n  <plugins>\\n    <forcePersistencyModeBrokerPlugin/>\\n    <statisticsBrokerPlugin/>\\n    <timeStampingBrokerPlugin ttlCeiling=\\\"86400000\\\" zeroExpirationOverride=\\\"86400000\\\"/>\\n  </plugins>\\n</broker>\\n\", New:\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\n<broker xmlns=\\\"http://activemq.apache.org/schema/core\\\">\\n  <plugins>\\n    <forcePersistencyModeBrokerPlugin persistenceFlg=\\\"true\\\"/>\\n    <statisticsBrokerPlugin/>\\n    <timeStampingBrokerPlugin ttlCeiling=\\\"86400000\\\" zeroExpirationOverride=\\\"86400000\\\"/>\\n  </plugins>\\n</broker>\\n\", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, \"latest_revision\":*terraform.ResourceAttrDiff{Old:\"300\", New:\"0\", NewComputed:true, NewRemoved:false, 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)}"}

Crossplane Version

1.16.0

Provider Version

1.10.0

Kubernetes Version

No response

Kubernetes Distribution

No response

Additional Info

Terraform behaves similarly to AWS here and removes the wrong attribute and updates the XML file. It does not give any errors or warnings. But in this case, the terraform plan always shows diff.

@turkenf turkenf added bug Something isn't working needs:triage labels Aug 7, 2024
Copy link

github-actions bot commented Nov 7, 2024

This provider repo does not have enough maintainers to address every issue. Since there has been no activity in the last 90 days it is now marked as stale. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

@github-actions github-actions bot added the stale label Nov 7, 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 needs:triage stale
Projects
None yet
Development

No branches or pull requests

1 participant