F5Networks / f5-google-gdm-templates

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

experimental autoscale multizone failed config-sync #15

Closed Milbrab closed 1 year ago

Milbrab commented 5 years ago

Do you already have an issue opened with F5 support?

No

Description

I have modified the python script for the experimental\autoscale deployment to support multi-zone front and backends using a GCP HTTP(S) load balancer but there appears to be a java script file that needs to be modified to support a multi-zone deployment. The autoscale.js file that is pulled from F5 appears to only look in the existing zone for additional instances. If this .js file could be updated to look at the instanceGroup (deployment + '-igm) in the region instead of the zone, the autoscale.js file should be able to find all of the instances and complete the device-group creation to sync the devices. It not great having autoscale only use a single zone instead of the full region.

The sys db autoscale.samezoneonly is already set to "false", which I assume is a good start

admin@(f5-as-mz-bigip-b45k)(cfg-sync In Sync (Sync Only))(Active)(/Common)(tmos)# list sys db autoscale.samezoneonly sys db autoscale.samezoneonly { value "false" }

If you review the autoscale.log file you can see that the autoscale.js script can't find the other instances since is only looking within the zone.

2019-03-20T15:16:14.964Z info: [pid: 17121] [scripts/runScript.js] 2019-03-20T15:16:14.964Z info: [pid: 26730] [scripts/autoscale.js] Initializing autoscale provider 2019-03-20T15:16:14.967Z info: [pid: 17121] [scripts/runScript.js] 2019-03-20T15:16:14.967Z silly: [pid: 26730] [lib/gceCloudProvider.js] No provider credentials - assuming we are running in Google Cloud 2019-03-20T15:16:15.038Z info: [pid: 17121] [scripts/runScript.js] 2019-03-20T15:16:15.038Z silly: [pid: 26730] [lib/gceCloudProvider.js] region: us-central1 2019-03-20T15:16:15.043Z info: [pid: 17121] [scripts/runScript.js] 2019-03-20T15:16:15.042Z info: [pid: 26730] [scripts/autoscale.js] Getting this instance ID. 2019-03-20T15:16:15.057Z error: [pid: 17121] [scripts/runScript.js] 2019-03-20T15:16:15.056Z debug: [pid: 26730] [scripts/autoscale.js] This instance ID: f5-as-mz-bigip-b45k 2019-03-20T15:16:15.058Z info: [pid: 17121] [scripts/runScript.js] 2019-03-20T15:16:15.058Z info: [pid: 26730] [scripts/autoscale.js] Getting info on all instances. 2019-03-20T15:16:15.503Z info: [pid: 17121] [scripts/runScript.js] 2019-03-20T15:16:15.499Z info: [pid: 26730] [lib/gceCloudProvider.js] Error getting instances: The resource 'projects/*/zones/us-central1-b/instanceGroups/f5-as-mz-igm' was not found 2019-03-20T15:16:15.507Z error: [pid: 17121] [scripts/runScript.js] 2019-03-20T15:16:15.507Z error: [pid: 26730] [scripts/autoscale.js] autoscaling error code: 404 message: *The resource 'projects//zones/us-central1-b/instanceGroups/f5-as-mz-igm**' was not found 2019-03-20T15:16:15.509Z info: [pid: 17121] [scripts/runScript.js] 2019-03-20T15:16:15.508Z info: [pid: 26730] [lib/util.js] Autoscale finished.

I can manually enable sync between the devices once the instance group is created but since this autoscale feature fails it also causes the objects within the storage bucket to fail to be created and I am not certain if this is due to the custom_config script exiting or what is causing the additional failures.

Template

For bugs, enter the template with which you are experiencing issues below. https://github.com/F5Networks/f5-google-gdm-templates/tree/master/experimental/autoscale/waf/via-lb/existing-stack/payg

Severity Level

For bugs, enter the bug severity level. Do not set any labels.

Severity: 5

Severity level definitions:

  1. Severity 1 (Critical) : Defect is causing systems to be offline and/or nonfunctional. immediate attention is required.
  2. Severity 2 (High) : Defect is causing major obstruction of system operations.
  3. Severity 3 (Medium) : Defect is causing intermittent errors in system operations.
  4. Severity 4 (Low) : Defect is causing infrequent interuptions in system operations.
  5. Severity 5 (Trival) : Defect is not causing any interuptions to system operations, but none-the-less is a bug.
crosbygw commented 5 years ago

Looks like Google Cloud nodejs sdk (what big-ip autoscale.js is using to create google resources) still does not support regional instance groups.

https://cloud.google.com/nodejs/docs/reference/compute/0.11.x/InstanceGroup

We have an internal issue created to track google's progress with updating supported sdk. We will be able to add regional support once updated. Internal Issue # 1075

Milbrab commented 5 years ago

Thanks Crosby,

I reached out to Google on this as well since it was their SDK and they mentioned that the region can be defined in the zone variable.

==========================CODE SNIPPET======================= const Compute = require('@google-cloud/compute'); const compute = new Compute(); const zone = compute.zone('us-central1'); console.log('The region required represented as a zone object'); console.log(zone); const instanceGroup = zone.instanceGroup('web-servers'); console.log('The instanceGroup related to the region'); console.log(instanceGroup) ==========================CODE SNIPPET=======================

I am note certain if this information can be passed along. Thanks

shyawnkarim commented 1 year ago

Closing due to age. These legacy templates are now in maintenance mode and are being replaced by our next-generation templates available in the Cloud Templates 2.0 GitHub repo.