crossplane-contrib / provider-upjet-aws

Official AWS Provider for Crossplane by Upbound.
https://marketplace.upbound.io/providers/upbound/provider-aws
Apache License 2.0
137 stars 112 forks source link

create error: `subnet` CRD is not working... #194

Open zerunhu opened 1 year ago

zerunhu commented 1 year ago

What happened?

When I create a subnet resource I get an error

kubectl get subnet
NAME                            READY   SYNCED   EXTERNAL-NAME   AGE
pracing-test-private-subnet-1           False                    13m

kubectl describe subnet
Events:
  Type     Reason                           Age                  From                                             Message
  ----     ------                           ----                 ----                                             -------
  Warning  CannotObserveExternalResource    9m28s                managed/ec2.aws.upbound.io/v1beta1, kind=subnet  cannot run refresh: refresh failed:
  Warning  CannotInitializeManagedResource  7m34s                managed/ec2.aws.upbound.io/v1beta1, kind=subnet  Operation cannot be fulfilled on subnets.ec2.aws.upbound.io "pracing-test-private-subnet-1": the object has been modified; please apply your changes to the latest version and try again
  Warning  CannotObserveExternalResource    41s (x4 over 7m35s)  managed/ec2.aws.upbound.io/v1beta1, kind=subnet  cannot run refresh: refresh failed: failed to read schema for aws_subnet.pracing-test-private-subnet-1 in registry.terraform.io/hashicorp/aws: failed to instantiate provider "registry.terraform.io/hashicorp/aws" to obtain schema: timeout while waiting for plugin to start:

How can we reproduce it?

I got a quick start with this document https://marketplace.upbound.io/providers/upbound/provider-aws/v0.21.0 Install the up command in order, then run up uxp install, then install provider and providerconfig, but I didn't create the s3 bucket, I created vpc and subnet directly, then I got the above error

What environment did it happen in?

zerunhu commented 1 year ago

I tried a large number of resources with the same error, and I saw the error log in the aws-provider's pod.

W1125 06:11:43.796552       1 reflector.go:347] k8s.io/client-go@v0.25.0/tools/cache/reflector.go:169: watch of *v1beta1.CertificateValidation ended with: an error on the server ("unable to decode an event from the watch stream: http2: client connection lost") has prevented the request from succeeding
W1125 06:11:43.796642       1 reflector.go:347] k8s.io/client-go@v0.25.0/tools/cache/reflector.go:169: watch of *v1beta1.Dashboard ended with: an error on the server ("unable to decode an event from the watch stream: http2: client connection lost") has prevented the request from succeeding
W1125 06:11:43.794631       1 reflector.go:347] k8s.io/client-go@v0.25.0/tools/cache/reflector.go:169: watch of *v1beta1.DataCatalog ended with: an error on the server ("unable to decode an event from the watch stream: http2: client connection lost") has prevented the request from succeeding
W1125 06:11:43.796848       1 reflector.go:347] k8s.io/client-go@v0.25.0/tools/cache/reflector.go:169: watch of *v1beta1.Queue ended with: an error on the server ("unable to decode an event from the watch stream: http2: client connection lost") has prevented the request from succeeding
W1125 06:11:43.796552       1 reflector.go:347] k8s.io/client-go@v0.25.0/tools/cache/reflector.go:169: watch of *v1beta1.Repository ended with: an error on the server ("unable to decode an event from the watch stream: http2: client connection lost") has prevented the request from succeeding
W1125 06:11:43.497855       1 reflector.go:347] k8s.io/client-go@v0.25.0/tools/cache/reflector.go:169: watch of *v1beta1.BucketRequestPaymentConfiguration ended with: an error on the server ("unable to decode an event from the watch stream: http2: client connection lost") has prevented the request from succeeding
turkenh commented 1 year ago

Just double-checked on my side and things subnet & vpc working fine with provider-aws:v0.21.0.

@zerunhu I would suspect from the environment you're running the provider not having enough resources:

Not sure how much control you've over these parameters in a Fargate environment, but please consider giving more power somehow.