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]: Elasticache ReplicationGroup is not returning any Errors on wrong Manifest #1492

Closed
1 task done
Hounddog opened this issue Sep 13, 2024 · 2 comments · Fixed by #1490
Closed
1 task done

[Bug]: Elasticache ReplicationGroup is not returning any Errors on wrong Manifest #1492

Hounddog opened this issue Sep 13, 2024 · 2 comments · Fixed by #1490
Labels
bug Something isn't working needs:triage

Comments

@Hounddog
Copy link

Hounddog commented Sep 13, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Affected Resource(s)

elasticache.aws.upbound.io/v1beta2 - ReplicationGroup

Resource MRs required to reproduce the bug

apiVersion: elasticache.aws.upbound.io/v1beta1
kind: SubnetGroup
metadata:
  annotations:
    meta.upbound.io/example-id: elasticache/v1beta2/replicationgroup
  labels:
    testing.upbound.io/example-name: replicationgroup
  name: subnet-group
spec:
  forProvider:
    region: eu-central-1
    subnetIds:
      - subnet-0436eb926351b53d1
      - subnet-00840c8ad78e15340
---
apiVersion: elasticache.aws.upbound.io/v1beta2
kind: ReplicationGroup
metadata:
  annotations:
    meta.upbound.io/example-id: elasticache/v1beta2/replicationgroup
    uptest.upbound.io/timeout: "3600"
  labels:
    testing.upbound.io/example-name: example
  name: example-replication
spec:
  forProvider:
    automaticFailoverEnabled: true
    multiAzEnabled: true
    description: example description
    engineVersion: "7.1"
    nodeType: cache.t2.micro
    numCacheClusters: 1
    parameterGroupName: default.redis7
    port: 6379
    region: eu-central-1
    subnetGroupNameSelector:
      matchLabels:
        testing.upbound.io/example-name: replicationgroup
    preferredCacheClusterAzs: 
      - eu-central-1a
      - eu-central-1b
  writeConnectionSecretToRef:
    name: example-replication
    namespace: infra-system-crossplane

Steps to Reproduce

Upload the Manifest using kubectl.

kubectl apply -f mr.yaml

What happened?

$ kubectl get managed
NAME                                                                             SYNCED   READY   EXTERNAL-NAME                        AGE
replicationgroup.elasticache.aws.upbound.io/example-replication                  True     False   example-replication                  22h
$ kubectl describe ReplicationGroup example-replication
Name:         example-replication
Namespace:    
Labels:       k8slens-edit-resource-version=v1beta2
              testing.upbound.io/example-name=example
Annotations:  crossplane.io/external-create-pending: 2024-09-13T07:00:42Z
              crossplane.io/external-create-succeeded: 2024-09-13T07:00:42Z
              crossplane.io/external-name: example-replication
              meta.upbound.io/example-id: elasticache/v1beta2/replicationgroup
              uptest.upbound.io/timeout: 3600
API Version:  elasticache.aws.upbound.io/v1beta2
Kind:         ReplicationGroup
Metadata:
  Creation Timestamp:  2024-09-12T08:46:19Z
  Finalizers:
    finalizer.managedresource.crossplane.io
  Generation:        4
  Resource Version:  67013658
  UID:               f3379c6a-6583-495a-9bb9-a07d864587ea
Spec:
  Deletion Policy:  Delete
  For Provider:
    Automatic Failover Enabled:  true
    Description:                 example description
    Engine Version:              7.1
    Multi Az Enabled:            true
    Node Type:                   cache.t2.micro
    Num Cache Clusters:          3
    Parameter Group Name:        default.redis7
    Port:                        6379
    Preferred Cache Cluster Azs:
      eu-central-1a
      eu-central-1b
    Region:             eu-central-1
    Subnet Group Name:  subnet-group
    Subnet Group Name Ref:
      Name:  subnet-group
    Subnet Group Name Selector:
      Match Labels:
        testing.upbound.io/example-name:  replicationgroup
    Tags:
      Crossplane - Kind:            replicationgroup.elasticache.aws.upbound.io
      Crossplane - Name:            example-replication
      Crossplane - Providerconfig:  default
  Init Provider:
  Management Policies:
    *
  Provider Config Ref:
    Name:  default
  Write Connection Secret To Ref:
    Name:       example-replication
    Namespace:  infra-system-crossplane
Status:
  At Provider:
  Conditions:
    Last Transition Time:  2024-09-12T08:46:55Z
    Reason:                ReconcileSuccess
    Status:                True
    Type:                  Synced
    Last Transition Time:  2024-09-12T08:46:55Z
    Reason:                Creating
    Status:                False
    Type:                  Ready
    Last Transition Time:  2024-09-12T08:46:55Z
    Reason:                Success
    Status:                True
    Type:                  LastAsyncOperation
Events:
  Type    Reason                   Age                      From                                                               Message
  ----    ------                   ----                     ----                                                               -------
  Normal  PendingExternalResource  9m39s (x12450 over 22h)  managed/elasticache.aws.upbound.io/v1beta2, kind=replicationgroup  Waiting for external resource existence to be confirmed
  Normal  CreatedExternalResource  4m36s (x2501 over 22h)   managed/elasticache.aws.upbound.io/v1beta2, kind=replicationgroup  Successfully requested creation of external resource

I would have expected to see an Error as the Manifest for the Replicationgroup is Wrong.
The numCacheClusters have to be equal to the preferredCacheClusterAzs.
This and various other mistakes on my side made it a lot of guesswork to figure out my mistakes as the resources stated "Successfully requested creation of requested resource" I could also not find any other logs with errors in any provider nor crossplane controller itself

Relevant Error Output Snippet

No response

Crossplane Version

v1.17.0

Provider Version

1.13.0

Kubernetes Version

Client Version: v1.28.2 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: v1.29.7-eks-2f46c53

Kubernetes Distribution

EKS

Additional Info

No response

@Hounddog Hounddog added bug Something isn't working needs:triage labels Sep 13, 2024
@turkenf
Copy link
Collaborator

turkenf commented Sep 13, 2024

Thank you for the issue report, @Hounddog, it will be fixed after this PR.

@Hounddog
Copy link
Author

@turkenf Thank you for notifying me on the mentioned issue. I looked for anything about replicationgroup or elasticache but failed to search for hidden errors...

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants