F5Networks / terraform-gcp-bigip-module

Terraform module for Deploying BIG-IP in GCP
Apache License 2.0
9 stars 13 forks source link

BIG-IP provisioning errors despite allocating adequate disk space #2

Closed mjmenger closed 1 year ago

mjmenger commented 2 years ago

When provisioning a BIG-IP on GCP with the module in the following fashion

module bigip {
  count               = var.instance_count
  source              = "git::git@github.com:F5Networks/terraform-gcp-bigip-module.git?ref=v1.0.0"
  prefix              = format("%s-3nic", var.prefix)
  project_id          = var.project_id
  zone                = var.zone
  image               = var.image
  disk_size_gb        = 60
  service_account     = var.service_account
  mgmt_subnet_ids     = [{ "subnet_id" = google_compute_subnetwork.mgmt_subnetwork.id, "public_ip" = true, "private_ip_primary" = "" }]
  external_subnet_ids = [{ "subnet_id" = google_compute_subnetwork.external_subnetwork.id, "public_ip" = true, "private_ip_primary" = "", "private_ip_secondary" = "" }]
  internal_subnet_ids = [{ "subnet_id" = google_compute_subnetwork.internal_subnetwork.id, "public_ip" = false, "private_ip_primary" = "", "private_ip_secondary" = "" }]
  DO_URL              = "https://github.com/F5Networks/f5-declarative-onboarding/releases/download/v1.25.0/f5-declarative-onboarding-1.25.0-7.noarch.rpm"
  custom_user_data    = null
}

When sending a Declarative Onboarding declaration with the following provisioning stanza,

"myProvisioning": {
  "class": "Provision",
  "ltm": "nominal",
  "asm": "nominal"
},

the declaration fails with a 422 response code and the following error message

"transaction failed:01071008:3: Provisioning failed with error 1 - 'Disk limit exceeded. 20338 MB are required to provision these modules, but only 30 MB are available.'\n."

Note that the BIG-IP thinks there's only 30 MB of disk space available despite 60 GB or more (I tested with 100 GB as well) provisioned storage. I verified the provisioned storage on the GCP console.

when I adjusted the provisioning stanza to

"myProvisioning": {
  "class": "Provision",
  "ltm": "nominal"
},

the declaration was handled successfully.

trinaths commented 2 years ago

@mjmenger - Is any issue with the module you are trying? we see that when provisioning stanzas are adjusted, the issue is resolved. Please share more info to verify this issue.

trinaths commented 2 years ago

Created INFRAANO-595 for internal tracking.

nmenant commented 2 years ago

Hi,

Does your provisioning work if you try to enable ASM via the GUI ? What is the value of your var.image variable ?

When you allocate the specific disk size to a VM in GCP, it doesn't mean that the image will consume all of it by default. Usually you need to resize the disk space yourself following this KB: https://support.f5.com/csp/article/K14952

I believe this is the issue that you are facing and i'm not convinced it's related to DO. If it was DO related, we may need to move your issue to the relevant Github repo

mjmenger commented 2 years ago

Hi,

Does your provisioning work if you try to enable ASM via the GUI ? What is the value of your var.image variable ?

Provisioning of ASM fails via the GUI with the same error message as seen when using DO. "01071008:3: Provisioning failed with error 1 - 'Disk limit exceeded. 12288 MB are required to provision these modules, but only 30 MB are available.'"

The var.image value is 'projects/f5-7626-networks-public/global/images/f5-bigip-16-0-1-1-0-0-6-payg-good-25mbps-210129040032'

When you allocate the specific disk size to a VM in GCP, it doesn't mean that the image will consume all of it by default. Usually you need to resize the disk space yourself following this KB: https://support.f5.com/csp/article/K14952

I'll try a workaround based upon the KB article and see if that addresses the issue. I believe this is the issue that you are facing and i'm not convinced it's related to DO. If it was DO related, we may need to move your issue to the relevant Github repo

mjmenger commented 2 years ago

I was able to provision ASM after performing the steps described in the KB article.

This behavior is inconsistent with the AWS and Azure modules. At a minimum, I think there should be a declarative solution to this issue.

KrithikaChidambaram commented 1 year ago

Included in v1.1.0, closing this issue now.