openshift / hypershift

Hyperscale OpenShift - clusters with hosted control planes
https://hypershift-docs.netlify.app
Apache License 2.0
434 stars 321 forks source link

RegionMap error when deploying hosted cluster to non-US region #157

Closed dciancio closed 3 years ago

dciancio commented 3 years ago

I get following error when trying to deploy a hosted cluster to a region other than us-east-1.

$ hypershift create cluster \
>   --pull-secret ~/pull-secret.txt \
>   --ssh-key ~/.ssh/id_rsa.pub \
>   --aws-creds ~/.aws/credentials \
>   --region ca-central-1 \
>   --name mycluster \
>   --base-domain mydomain
I0414 14:17:25.131112 1543354 request.go:655] Throttling request took 1.022221875s, request: GET:https://api.clustername.basedomain:6443/apis/packages.operators.coreos.com/v1?timeout=32s
INFO[0003] Creating infrastructure                       baseDomain=mydomain id=clusterid subdomain=clusters-mycluster.mydomain
INFO[0003] Discovered base domain zone                   baseDomain=mydomain id=ZONEID
Error: failed to create infra: failed to create stack: ValidationError: Template error: Unable to get mapping for RegionMap::ca-central-1::DHCPDomainName
    status code: 400, request id: e4d5c43b-3302-4bc2-8f7b-d056016c0eff
Usage:
  hypershift create cluster [flags]

Flags:
      --aws-creds string            Path to an AWS credentials file (required)
      --base-domain string          The base domain for the cluster
  -h, --help                        help for cluster
      --infra-id string             Infrastructure ID to use for AWS resources.
      --infra-json string           Path to file containing infrastructure information for the cluster. If not specified, infrastructure will be created
      --instance-type string        Instance type for AWS instances. (default "m4.large")
      --name string                 A name for the cluster (default "example")
      --namespace string            A namespace to contain the generated resources (default "clusters")
      --node-pool-replicas int      If >0, create a default NodePool with this many replicas (default 2)
      --overwrite                   If an existing cluster exists, overwrite it
      --preserve-infra-on-failure   Preserve infrastructure if creation fails and is rolled back
      --pull-secret string          Path to a pull secret (required)
      --region string               Region to use for AWS infrastructure. (default "us-east-1")
      --release-image string        The OCP release image for the cluster (default "quay.io/openshift-release-dev/ocp-release:4.7.7-x86_64")
      --render                      Render output as YAML to stdout instead of applying
      --ssh-key string              Path to an SSH key file

failed to create infra: failed to create stack: ValidationError: Template error: Unable to get mapping for RegionMap::ca-central-1::DHCPDomainName
    status code: 400, request id: e4d5c43b-3302-4bc2-8f7b-d056016c0eff
csrwng commented 3 years ago

/assign @ironcladlou

openshift-bot commented 3 years ago

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

ironcladlou commented 3 years ago

Please feel free to re-open with a reproducer if this is still an issue