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

Bucket: Cannot create AWS S3 in us-east-1 region #316

Closed
WarheadsSE opened this issue Feb 13, 2019 · 1 comment · Fixed by #467
Closed

Bucket: Cannot create AWS S3 in us-east-1 region #316

WarheadsSE opened this issue Feb 13, 2019 · 1 comment · Fixed by #467
Milestone

Comments

@WarheadsSE
Copy link

Is this a bug report or feature request?

  • Bug Report

Deviation from expected behavior:
Attempting to create a Bucket backed by ResourceClass in region: us-east-1 will result in no bucket being created, and a constant loop of reconcile.

2019/02/13 19:44:16 reconciling bucket.storage.crossplane.io/v1alpha1: crossplane-system/crossplane-east-bucket-2
2019/02/13 19:44:16 reconciling s3bucket.storage.aws.crossplane.io/v1alpha1: crossplane-system/bucket-93a66228-2fc7-11e9-842f-42010a80016e
2019/02/13 19:44:16 reconciling s3bucket.storage.aws.crossplane.io/v1alpha1: crossplane-system/bucket-93a66228-2fc7-11e9-842f-42010a80016e
2019/02/13 19:44:16 reconciling s3bucket.storage.aws.crossplane.io/v1alpha1: crossplane-system/bucket-93a66228-2fc7-11e9-842f-42010a80016e
2019/02/13 19:44:16 reconciling s3bucket.storage.aws.crossplane.io/v1alpha1: crossplane-system/bucket-93a66228-2fc7-11e9-842f-42010a80016e
...

Underlying S3Bucket shows

Conditions:
    Last Transition Time:  2019-02-13T19:43:44Z
    Message:               InvalidLocationConstraint: The specified location-constraint is not valid
                           status code: 400, request id: E1123A57BFC745E8, host id: 7m/WCehj5bIvKYtJEkeOV6xqS5tMuD4iqCoUUezrUtAR20D8knqzJOb52WZV6QRlKlAeozlCsFE=
    Reason:                Failed to create resource
    Status:                True
    Type:                  Failed

Expected behavior:

Bucket is eventually created, and accessible.

How to reproduce it (minimal and precise):

kubectl create secret generic aws-provider-creds --from-file=credentials=~/.aws/credentials

---
# AWS provider that references the secrete credentials
apiVersion: aws.crossplane.io/v1alpha1
kind: Provider
metadata:
  name: aws-provider
  namespace: crossplane-system
spec:
  credentialsSecretRef:
    key: credentials
    name: aws-provider-creds
  region: us-east-1
---
# ResourceClass for AWS S3 Buckets
apiVersion: core.crossplane.io/v1alpha1
kind: ResourceClass
metadata:
  name: s3-bucket-east
  namespace: crossplane-system
parameters:
  versioning: "false"
  predefinedACL: private
  region: us-east-1
provisioner: s3bucket.storage.aws.crossplane.io/v1alpha1
providerRef:
  name: aws-provider
reclaimPolicy: Delete
---
# bucket resource
apiVersion: storage.crossplane.io/v1alpha1
kind: Bucket
metadata:
  name: crossplane-east-bucket-2
spec:
  name: crossplane-east-bucket-2
  predefinedACL: Private
  localPermission: ReadWrite
  classReference:
    name: s3-bucket-east
    namespace: crossplane-system

Environment:

  • OS (e.g. from /etc/os-release): Container-Optimized OS from Google
  • Kernel (e.g. uname -a): 4.14.65+
  • Cloud provider or hardware configuration: beta.kubernetes.io/instance-type=n1-standard-4
  • Crossplane version (tag, release, helm chart version): 0.0.0-350.ae6ef1a
  • Kubernetes version (use kubectl version): client v1.10.12, server 1.11.6-gke.2
  • Kubernetes cluster type (e.g. Tectonic, GKE, OpenShift): GKE
@lukeweber
Copy link
Member

I've noticed in the docs, https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region it indicates that no location constraint is required for us-east-1.

We set a location constraint here:
https://github.com/crossplaneio/crossplane/blob/ae6ef1a7ca0df035e4097441be7c5eecd4743f24/pkg/clients/aws/s3/s3.go#L183

As a starting point, I might test if removing the location constraint if it's us-east-1 resolves this.

@negz negz added the gitlab label Mar 15, 2019
lukeweber added a commit to lukeweber/crossplane that referenced this issue May 15, 2019
Signed-off-by: Luke Weber <luke.weber@gmail.com>
lukeweber added a commit to lukeweber/crossplane that referenced this issue May 16, 2019
locationConstraint per the api definiton.
- Resolves crossplane#316

Signed-off-by: Luke Weber <luke.weber@gmail.com>
@jbw976 jbw976 added this to the v0.3 milestone May 16, 2019
jbw976 pushed a commit to jbw976/crossplane that referenced this issue Aug 20, 2019
locationConstraint per the api definiton.
- Resolves crossplane#316

Signed-off-by: Luke Weber <luke.weber@gmail.com>
luebken pushed a commit to luebken/crossplane that referenced this issue Aug 3, 2021
locationConstraint per the api definiton.
- Resolves crossplane#316

Signed-off-by: Luke Weber <luke.weber@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants