community icon indicating copy to clipboard operation
community copied to clipboard

InvalidSubnet error when CIDR range is available in AWS

Open mattzech opened this issue 1 year ago • 10 comments

Describe the bug Creating a subnet with a confirmed available CIDR range results in the following error message in the status of the subnet manifest:

2023-09-12T15:20:36.885Z        ERROR   Reconciler error        {"controller": "subnet", "controllerGroup": "ec2.services.k8s.aws", "controllerKind": "Subnet", "Subnet": {"name":"test-vpc-public-eu-west-1b","namespace":"netgen-test"}, "namespace": "netgen-test", "name": "test-vpc-public-eu-west-1b", "reconcileID": "9c90fa2c-6503-4dd2-a222-e223422db5e2", "error": "InvalidSubnet.Conflict: The CIDR '30.0.0.64/26' conflicts with another subnet\n\tstatus code: 400, request id: 5c08f6eb-1ee1-4645-84ef-208c8edc36b8"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
        /go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:329
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
        /go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:274
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
        /go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:235
2023-09-12T15:20:36.889Z        DEBUG   exporter.field-export-reconciler        error did not need requeue      {"error": "the source resource is not synced yet"}

Despite this error message, the subnet was successfully created in AWS.

Steps to reproduce Happens randomly and with different subnet CIDR ranges each time

Expected outcome Expect all to be created successfully and with the subnet id in the status

Environment

  • Kubernetes version: 1.26
  • Using EKS (yes/no), if so version? No
  • AWS service targeted (S3, RDS, etc.) EC2

mattzech avatar Sep 12 '23 15:09 mattzech