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

[Elastic Cache Parameter Group] Parameter group not creating resources if "external-name" is set (0.44) #1005

Open
WolfGanGeRTech opened this issue Dec 5, 2023 · 9 comments
Labels
bug Something isn't working is:triaged Indicates that an issue has been reviewed. stale

Comments

@WolfGanGeRTech
Copy link

What happened?

The ParameterGroup.elasticache.aws.upbound.io/v1beta1 is not able to create new resources if "external-name" annotation is set.

It should first check if the resource exists and if not, create it, but when "external-name" is set he only tries to check if it exists and fails if it doesn't. The error returned is:

 Warning  CannotObserveExternalResource  4s (x4 over 9s)  managed/elasticache.aws.upbound.io/v1beta1, kind=parametergroup  failed to observe the resource: [{0 unable to find ElastiCache Parameter Group (testingcachebug): couldn't find resource  []}]

How can we reproduce it?

apiVersion: elasticache.aws.upbound.io/v1beta1
kind: ParameterGroup
metadata:
  annotations:
    meta.upbound.io/example-id: elasticache/v1beta1/parametergroup
    crossplane.io/external-name: testingcachebug
  labels:
    testing.upbound.io/example-name: testingcachebug
  name: testingcachebug
spec:
  deletionPolicy: "Orphan"
  forProvider:
    family: redis2.8
    name: testingcachebug
    parameter:
      - name: min-slaves-to-write
        value: "2"
    region: eu-central-1

Just use this manifest and the error will occour.

What environment did it happen in?

  • Crossplane Version: 1.12.2
  • Provider Version: 0.44 (aws-provider-cache)
  • Kubernetes Version: 1.25
  • Kubernetes Distribution: AWS
@WolfGanGeRTech WolfGanGeRTech added bug Something isn't working needs:triage labels Dec 5, 2023
@WolfGanGeRTech
Copy link
Author

Any update?

@turkenf
Copy link
Collaborator

turkenf commented Jan 16, 2024

Hi @WolfGanGeRTech,

Could not reproduce with provider version 0.47.1, please try and let us know.

NAME                                                        READY   SYNCED   EXTERNAL-NAME     AGE
parametergroup.elasticache.aws.upbound.io/default           True    True     cache-params      10m
parametergroup.elasticache.aws.upbound.io/testingcachebug   True    True     testingcachebug   44s

@WolfGanGeRTech
Copy link
Author

Hello,

I have tested again with 0.47.1 and same issue.

The manifest I used was:

apiVersion: elasticache.aws.upbound.io/v1beta1
kind: ParameterGroup
metadata:
  annotations:
    crossplane.io/external-name: cache-params9
  name: cache-params9
spec:
  deletionPolicy: Orphan
  forProvider:
    family: redis7
    name: cache-params9
    region: eu-central-1

When I describe the resource I get:

Name:         cache-params9
Namespace:    
Labels:       <none>
Annotations:  crossplane.io/external-name: cache-params9
API Version:  elasticache.aws.upbound.io/v1beta1
Kind:         ParameterGroup
Metadata:
  Creation Timestamp:  2024-02-01T09:38:48Z
  Generation:          2
  Resource Version:    478050855
  UID:                 f52bfb23-bf2e-43e6-9d09-57a6aae1877e
Spec:
  Deletion Policy:  Orphan
  For Provider:
    Family:  redis7
    Name:    cache-params9
    Region:  eu-central-1
    Tags:
      Crossplane - Kind:            parametergroup.elasticache.aws.upbound.io
      Crossplane - Name:            cache-params9
      Crossplane - Providerconfig:  default
  Init Provider:
  Management Policies:
    *
  Provider Config Ref:
    Name:  default
Status:
  At Provider:
  Conditions:
    Last Transition Time:  2024-02-01T09:38:57Z
    Message:               observe failed: failed to observe the resource: [{0 unable to find ElastiCache Parameter Group (cache-params9): couldn't find resource  []}]
    Reason:                ReconcileError
    Status:                False
    Type:                  Synced
Events:
  Type     Reason                         Age                From                                                             Message
  ----     ------                         ----               ----                                                             -------
  Warning  CannotObserveExternalResource  11s (x2 over 13s)  managed/elasticache.aws.upbound.io/v1beta1, kind=parametergroup  failed to observe the resource: [{0 unable to find ElastiCache Parameter Group (cache-params9): couldn't find resource  []}]

Since he can't find the resource he should create one.

@WolfGanGeRTech
Copy link
Author

@turkenf could you let me know which crossplane version you used?

I am using:

Crossplane Version: 1.12.2
Provider Version: 0.47.1 (aws-provider-cache)
Kubernetes Version: 1.26
Kubernetes Distribution: AWS

@turkenf
Copy link
Collaborator

turkenf commented Feb 9, 2024

@WolfGanGeRTech, thank you for your patience and responses here. I think there was a misunderstanding here, I could not reproduce the issue since I tested it on the main branch on my first attempt. Currently, I can reproduce the issue in v0.40.0 and v0.47.1 regardless of crossplane version.

However, the issue could not be reproducible in provider version v1.0.0, but due to this issue, you should use crossplane version 1.14 or later.

@turkenf turkenf added is:triaged Indicates that an issue has been reviewed. and removed needs:information needs:triage labels Feb 9, 2024
@turkenf turkenf removed the community label May 11, 2024
Copy link

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 Aug 10, 2024
Copy link

This issue is being closed since there has been no activity for 14 days since marking it as stale. If you still need help, feel free to comment or reopen the issue!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 27, 2024
@WolfGanGeRTech
Copy link
Author

Bump

We upgraded to:

Crossplane: 1.16
AWS Provider: v1.8.0

But we are still facing the same issue, always need to add the "crossplane.io/external-name" after creating the ParameterGroup.

@mergenci mergenci reopened this Sep 17, 2024
@github-actions github-actions bot removed the stale label Sep 18, 2024
Copy link

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 Dec 17, 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. stale
Projects
None yet
Development

No branches or pull requests

4 participants