F5Networks / f5-google-gdm-templates

Google Deployment Templates for quickly deploying BIG-IP services in Google Cloud Platform
28 stars 45 forks source link

Documentation Update: provide guidance around max deployment name length #38

Closed JeffGiroux closed 4 years ago

JeffGiroux commented 4 years ago

Do you already have an issue opened with F5 support?

No

Description

Two things are affected by deployment names being too long: storage bucket names and VM names of the BIG-IP instances. GDM deployments create a storage bucket and add a suffix to the name. The template also creates VM instances with instance names that contain the deployment name with additional prefix and suffix. As a result, this makes the limit greater than Google's max bucket and VM instance names of 63.

https://cloud.google.com/compute/docs/instances/custom-hostname-vm https://cloud.google.com/storage/docs/naming

  1. Bucket/Storage issue: If you do a GDM deployment with a deployment name that is too long, then you will receive a Google deployment error that storage bucket name too long.

Google error related to bucket name = {"ResourceType":"storage.v1.bucket","ResourceErrorCode":"400","ResourceErrorMessage":{"code":400,"errors":[{"domain":"global","message":"Use of this bucket name is restricted: 'f5-bigip-jg-f5-api-ha-asdfadfasdfadsfadsfadsfadsf-adsfadsf-62271'","reason":"invalid"}],"message":"Use of this bucket name is restricted: 'f5-bigip-jg-f5-api-ha-asdfadfasdfadsfadsfadsfadsf-adsfadsf-62271'","statusMessage":"Bad Request","requestPath":"https://www.googleapis.com/storage/v1/b","httpMethod":"POST"}}

In the above example, my deployment name is f5-bigip-jg-f5-api-ha-asdfadfasdfadsfadsfadsfadsf-adsfadsf (58 characters already) but then it appends a suffix which then makes it greater than 63 characters. Deployment fails.

Ran this deployment command... gcloud deployment-manager deployments create f5-bigip-jg-f5-api-ha-asdfadfasdfadsfadsfadsfadsf-adsfadsf --config /Users/giroux/Documents/_vLab/Demos/Google/f5-existing-stack-same-net-cluster-payg-3nic-bigip.yaml

  1. VM hostname issue: If the deployment name is short enough to satisfy the limit of bucket name length (see above) but still too long for VM name, then the deployment will continue, create the VM BIG-IPs, but the BIG-IP onboard.log file will have an error and fail the entire onboard process. As a result, BIG-IP instances are created but do not get configured/onboarded.

BIG-IP onboard.log error = 2020-01-17T15:27:17.141Z error: [pid: 11922] [lib/util.js] Onboard failed: 01070903:3: Constraint 'hostname must contain less than 65 characters' failed for '/Common/system'

In the above example, my deployment name is jg-f5-api-ha-asdfadfasdfadsfadsfadsfadsf-1 (42 characters) . It was short enough to get past the bucket name length error, but it was not short enough to be a valid hostname for onboarding. Once "bigip1" was added as prefix as well as project ID as suffix, fail due to hostname being too long.

Ran this deployment command... gcloud deployment-manager deployments create jg-f5-api-ha-asdfadfasdfadsfadsfadsfadsf-1 --config /Users/giroux/Documents/_vLab/Demos/Google/f5-existing-stack-same-net-cluster-payg-3nic-bigip.yaml

Suggestion

Suggest to update docs and state that deployment name will be affected by bucket name+suffix as well as VM prefix+name+suffix. The combined character length should fit within Google's max expected name length. See previously supplied google links above for bucket and computer naming.

I would place a bullet item in the "Important configuration notes" section as well as make a note of the length in the "Deploy the BIG-IP VE" of the README.

Template

Using following template but this applies to all template README files.

https://github.com/F5Networks/f5-google-gdm-templates/tree/master/supported/failover/same-net/via-api/3nic/existing-stack/payg

Severity Level

3

shyawnkarim commented 4 years ago

Thanks for reporting this issue to us. I've gone ahead and created Jira Issue #1801 to add additional documentation around this.

shyawnkarim commented 4 years ago

Closing. This issue was fixed in release 3.4.0.