RavinderReddyF5 / terraform-provider-bigip-version0.12

Terraform resources that can configure F5 BIGIP products
Mozilla Public License 2.0
0 stars 0 forks source link

[CLOSED] Error while Sending/Posting http request with DO json :{"code":404 #274

Open RavinderReddyF5 opened 3 years ago

RavinderReddyF5 commented 3 years ago

Issue by amolari Wednesday Feb 12, 2020 at 21:24 GMT Originally opened as https://github.com/terraform-providers/terraform-provider-bigip/issues/243


Launching a bigip-do, when my AWS instance is running (DO ready), I get this error:

module.bigip-do.bigip_do.do-example: Creating...
module.bigip-do.bigip_do.do-example: Still creating... [10s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [20s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [30s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [40s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [50s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [1m0s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [1m10s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [1m20s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [1m30s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [1m40s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [1m50s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [2m0s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [2m10s elapsed]
Error: Error while Sending/Posting http request with DO json :{"code":404,"message":"URI path /mgmt/shared/declarative-onboarding not registered.  Please verify URI is supported and wait for /available suffix to be responsive.","restOperationId":1963979,"kind":":resterrorresponse"}  <nil>

  on bigip-do/main.tf line 18, in resource "bigip_do" "do-example":
  18: resource "bigip_do" "do-example" {

That happens after the licensing, which restarts the services on the bigip. The bigip gets licensed/configured as expected.

Terraform v0.12.17

RavinderReddyF5 commented 3 years ago

Comment by papineni87 Thursday Feb 13, 2020 at 09:28 GMT


@amolari What other config you are trying in DO json apart from license ? Can you paste the DO json which you have tried to configure ?

RavinderReddyF5 commented 3 years ago

Comment by amolari Thursday Feb 13, 2020 at 13:59 GMT


@papineni87 basic configuration, which gets configured properly.

{
    "schemaVersion": "1.9.0",
    "class": "Device",
    "async": true,
    "label": "my BIG-IP declaration for declarative onboarding",
    "Common": {
        "class": "Tenant",
        "mySystem": {
            "class": "System",
            "hostname": "${bigip_hostname}",
            "cliInactivityTimeout": 1200,
            "consoleInactivityTimeout": 1200,
            "autoPhonehome": false
        },
        "myLicence": {
            "class": "License",
            "licenseType": "licensePool",
            "licensePool": "my_msp_pool",
            "bigIqHost":"${bigiq_hostname}",
            "bigIqUsername":"${bigiq_username}",
            "bigIqPassword":"${bigiq_password}",
            "skuKeyword1": "${sku_kw1}",
            "skuKeyword2": "${sku_kw2}",
            "unitOfMeasure": "yearly",
            "reachable": false,
            "hypervisor": "aws"
        },
        "myDns": {
            "class": "DNS",
            "nameServers": [
                "8.8.8.8"
            ],
            "search": [
                "f5.com"
            ]
        },
        "myNtp": {
            "class": "NTP",
            "servers": [
                "ch.pool.ntp.org"
            ],
            "timezone": "${timezone}"
        },
        "myProvisioning": {
            "class": "Provision",
            "ltm": "nominal",
            "asm": "nominal"
        },
        "dbvars": {
            "class": "DbVariables",
            "ui.advisory.enabled": "true",
            "ui.advisory.color": "orange",
            "ui.advisory.text": "${bigip_hostname} - ${sku_kw1} - ${sku_kw2}"
        }
    }
}
RavinderReddyF5 commented 3 years ago

Comment by papineni87 Tuesday Feb 18, 2020 at 09:20 GMT


Just to make sure is DO RPM installed in bigip ? because "URI Path: /mgmt/shared/declarative-onboarding not registered" message is observed when DO RPM is not installed in bigip.

RavinderReddyF5 commented 3 years ago

Comment by amolari Tuesday Feb 18, 2020 at 09:49 GMT


As indicated, the device gets properly licensed and configured by the DO call (Terraform), so the DO RPM is properly installed. I think it's when the device restarts its services, the rest api goes through various states until it's fully operational, and the Terraform resource config just give up on Error: Error while Sending/Posting http request with DO json :{"code":404. If it would retry a few more times, the rest service would deliver a valid answer. Any log of interest I could provide on the bigip side?

RavinderReddyF5 commented 3 years ago

Comment by papineni87 Tuesday Feb 18, 2020 at 09:59 GMT


Can you give us the restnoded failure log at /var/log/restnoded/restnoded.log in bigip (this is where DO records error messages)

RavinderReddyF5 commented 3 years ago

Comment by amolari Tuesday Feb 18, 2020 at 14:15 GMT


Here the log. restnoded.log

On the terraform side:

module.bigip-do.bigip_do.do-example: Creating...
module.bigip-do.bigip_do.do-example: Still creating... [10s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [20s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [30s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [40s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [50s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [1m0s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [1m10s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [1m20s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [1m30s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [1m40s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [1m50s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [2m0s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [2m10s elapsed]
module.bigip-do.bigip_do.do-example: Still creating... [2m20s elapsed]

Error: Error while Sending/Posting http request with DO json :{"code":404,"message":"URI path /mgmt/shared/declarative-onboarding not registered.  Please verify URI is supported and wait for /available suffix to be responsive.","restOperationId":2898188,"kind":":resterrorresponse"}  <nil>

on bigip-do/main.tf line 46, in resource "bigip_do" "do-example": 46: resource "bigip_do" "do-example" {

Deployment is 1-NIC, so the tmm restart (twice during the DO onboarding) brings the management interface down.

RavinderReddyF5 commented 3 years ago

Comment by focrensh Tuesday Apr 07, 2020 at 15:17 GMT


Thanks for the @amolari . You are correct that the resource needs to handle the many states BIG-IP enters when provisioning modules and restarting services.

Tracking with TER-275

RavinderReddyF5 commented 3 years ago

Comment by RavinderReddyF5 Tuesday May 12, 2020 at 16:08 GMT


Fixed in v1.2.0