F5Networks / f5-declarative-onboarding

F5 BIG-IP Declarative Onboarding
Apache License 2.0
58 stars 22 forks source link

Setting ConfigSync does not handle device name / hostname mismatch #104

Closed jgruberf5 closed 4 years ago

jgruberf5 commented 4 years ago

Environment

Summary

Notice the VE device name is bigip1, DO thinks it should be looking for the FQDN.

We MUST force the device name to be equal to the FQDN BEFORE we start anything in DO that is dependent on the device name. There an MANY reason the device name might default back to 'bigip1'.

DO does not complete:

[root@adc3nic:Active:Standalone] opt # tmsh list cm device
cm device **bigip1** {
    active-modules { "BIG-IP, VE, LAB|CWLPXKJ-JAJZBHN|Rate Shaping|External Interface and Network HSM, VE|SSL, Forward Proxy, VE|BIG-IP VE, Multicast Routing|Routing Bundle, VE|ASM, VE|SSL, VE|DNS VE Lab  (10K QPS)|Max Compression, VE|Advanced Protocols, VE|SSL Orchestrator, VE|Advanced Web Application Firewall, VE Lab|AFM, VE (LAB ONLY - NO ROUTING)|DNSSEC|VE, Carrier Grade NAT (AFM ONLY)|PSM, VE|APM, Lab, VE" }
    base-mac fa:16:3e:d6:53:8c
    build 0.0.37
    cert dtdi.crt
    chassis-id 98f98868-1092-9b4b-7a4a39ed04a7
    edition Final
    failover-state active
    **hostname adc3nic.openstack.grubernet.org**
    key dtdi.key
    management-ip 192.168.245.117
    marketing-name "BIG-IP Virtual Edition"
    optional-modules { "Anti-Bot Mobile, VE 25 Mbps" "App Mode (TMSH Only, No Root/Bash)" "FIPS 140-2 Level 1, BIG-IP VE-200M" "IP Intelligence, 1Yr, VE-200M/VE-25M" "IP Intelligence, 3Yr, VE-200M/VE-25M" ONAP "Threat Campaigns, 1Yr, VE-200M/VE-25M" "URL Filtering, 1Yr, VE" "URL Filtering, 3Yr, VE" "URL Filtering, VE-25M-1G, 500 Sessions, 1Yr" "URL Filtering, VE-25M-1G, 500 Sessions, 3Yr" }
    platform-id Z100
    product BIG-IP
    self-device true
    time-zone America/Los_Angeles
    version 14.1.2
}

restnoded log hanging: ..... Sun, 02 Feb 2020 16:04:35 GMT - finest: [f5-declarative-onboarding: systemHandler.js] tryUntil: retryOrReject: numRemaining: 11 , code: 404 , message: 01020036:3: The requested system device (/Common/adc3nic.openstack.grubernet.org) was not found. ....

Steps To Reproduce

Steps to reproduce the behavior:

  1. Submit the following declaration:

    {
    "async": true,
    "schemaVersion": "1.0.0",
    "label": "Cloudinit Onboarding",
    "class": "Device",
    "Common": {
        "poolLicense": {
            "licensePool": "BIGIPVEREGKEYS",
            "licenseType": "licensePool",
            "bigIqHost": "172.13.1.108",
            "bigIqUsername": "admin",
            "bigIpPassword": "f5c0nfig",
            "bigIpUsername": "admin",
            "bigIqPassword": "admin",
            "reachable": true,
            "class": "License"
        },
        "provisioningLevels": {
            "class": "Provision",
            "ltm": "nominal"
        },
        "HA-self": {
            "trafficGroup": "traffic-group-local-only",
            "vlan": "HA",
            "allowService": "all",
            "class": "SelfIp",
            "address": "1.1.1.117/24"
        },
        "external-self": {
            "trafficGroup": "traffic-group-local-only",
            "vlan": "external",
            "allowService": "none",
            "class": "SelfIp",
            "address": "192.168.80.115/24"
        },
        "default": {
            "gw": "192.168.80.1",
            "class": "Route",
            "network": "default",
            "mtu": 1450
        },
        "dnsServers": {
            "nameServers": ["192.168.0.2"],
            "search": ["example.openstack.com"],
            "class": "DNS"
        },
        "ntpServers": {
            "class": "NTP",
            "servers": ["0.pool.ntp.org", "1.pool.ntp.org", "2.pool.ntp.org"]
        },
        "dbvars": {
            "ui.advisory.enabled": true,
            "ui.advisory.text": "This device is under centralized management.",
            "class": "DbVariables",
            "ui.advisory.color": "orange"
        },
        "external": {
            "interfaces": [{
                "tagged": false,
                "name": 1.2
            }],
            "class": "VLAN",
            "mtu": 1450
        },
        "failoverAddress": {
            "class": "FailoverUnicast",
            "address": "/Common/HA-self/address"
        },
        "HA": {
            "interfaces": [{
                "tagged": false,
                "name": 1.1
            }],
            "class": "VLAN",
            "mtu": 1450
        },
        "class": "Tenant",
        "configsync": {
            "configsyncIp": "/Common/HA-self/address",
            "class": "ConfigSync"
        }
    }
    }
  2. Observe the following error response:

DO just continues to retry... gave up watching after 30+ mins.

[root@adc3nic:Active:Standalone] opt # curl -s http://127.0.0.1:8105/shared/declarative-onboarding | json_pp

{
   "declaration" : {
      "schemaVersion" : "1.0.0",
      "async" : true,
      "Common" : {
         "HA-self" : {
            "address" : "1.1.1.117/24",
            "class" : "SelfIp",
            "trafficGroup" : "traffic-group-local-only",
            "allowService" : "all",
            "vlan" : "HA"
         },
         "poolLicense" : {
            "bigIpUsername" : "admin",
            "reachable" : true,
            "licensePool" : "BIGIPVEREGKEYS",
            "unitOfMeasure" : "monthly",
            "bigIqHost" : "172.13.1.108",
            "licenseType" : "licensePool",
            "bigIqUsername" : "admin",
            "overwrite" : false,
            "class" : "License"
         },
         "configsync" : {
            "configsyncIp" : "/Common/HA-self/address",
            "class" : "ConfigSync"
         },
         "HA" : {
            "interfaces" : [
               {
                  "tagged" : false,
                  "name" : "1.1"
               }
            ],
            "cmpHash" : "default",
            "class" : "VLAN",
            "mtu" : 1450
         },
         "failoverAddress" : {
            "address" : "/Common/HA-self/address",
            "class" : "FailoverUnicast",
            "port" : 1026
         },
         "external" : {
            "interfaces" : [
               {
                  "tagged" : false,
                  "name" : "1.2"
               }
            ],
            "cmpHash" : "default",
            "class" : "VLAN",
            "mtu" : 1450
         },
         "default" : {
            "network" : "default",
            "gw" : "192.168.80.1",
            "class" : "Route",
            "mtu" : 1450
         },
         "ntpServers" : {
            "servers" : [
               "0.pool.ntp.org",
               "1.pool.ntp.org",
               "2.pool.ntp.org"
            ],
            "class" : "NTP"
         },
         "dbvars" : {
            "ui.advisory.enabled" : true,
            "ui.advisory.color" : "orange",
            "class" : "DbVariables",
            "ui.advisory.text" : "This device is under centralized management."
         },
         "dnsServers" : {
            "search" : [
               "example.openstack.com"
            ],
            "class" : "DNS",
            "nameServers" : [
               "192.168.0.2"
            ]
         },
         "class" : "Tenant",
         "provisioningLevels" : {
            "ltm" : "nominal",
            "class" : "Provision"
         },
         "external-self" : {
            "address" : "192.168.80.115/24",
            "class" : "SelfIp",
            "trafficGroup" : "traffic-group-local-only",
            "allowService" : "none",
            "vlan" : "external"
         }
      },
      "class" : "Device",
      "label" : "Cloudinit Onboarding"
   },
   "selfLink" : "https://localhost/mgmt/shared/declarative-onboarding/task/f8b71086-6f97-4281-87b8-4aae504b9b6e",
   "id" : "f8b71086-6f97-4281-87b8-4aae504b9b6e",
   "result" : {
      "status" : "RUNNING",
      "class" : "Result",
      "message" : "processing",
      "code" : 202
   }
}

Expected Behavior

Set the ConfigSync IP address on the local device.

Actual Behavior

timeout because the device name doesn't match the FQDN which DO resolved as the device name.

jgruberf5 commented 4 years ago

Finally errored:

"result" : {
      "errors" : [
         "tryUntil: max tries reached: tryUntil: max tries reached: 01020036:3: The requested system device (/Common/adc3nic.openstack.grubernet.org) was not found.",
         "Cannot read property 'includes' of undefined"
      ],
      "status" : "ERROR",
      "class" : "Result",
      "message" : "rollback failed",
      "code" : 500
   }
dstokesf5 commented 4 years ago

This is in our internal product backlog as AUTOTOOL-1125.

dstokesf5 commented 4 years ago

This issue has been resolved as part of the 1.11.0 release.