F5Networks / f5-azure-arm-templates-v2

Azure Resource Manager Templates for quickly deploying BIG-IP services in Azure
22 stars 45 forks source link

autoscale example hostname needs to be FQDN in DO declaration #3

Closed JeffGiroux closed 3 years ago

JeffGiroux commented 3 years ago

Describe the bug

The recent update to the bigip configuration files, specifically the DO file, removed the .local from the HOST_NAME field. In testing Azure, the metadata only retrieves the hostname (no domain). When posting to DO, it complains because BIG-IP expects to have a FQDN as hostname.

https://github.com/F5Networks/f5-azure-arm-templates-v2/blob/master/examples/autoscale/bigip-configurations/autoscale-do-payg.json

Expected behavior

Example successfully deploys with proper hostname. Previous release of autoscale example config files had .local in hostname.

Current behavior

Hostname retrieved from metadata cloud provider does not contain domain. DO errors. Receive error and onboarding fails to complete...

DO code snippet

        "mySystem": {
            "autoPhonehome": false,
            "class": "System",
            "hostname": "{{ HOST_NAME }}"
        }

Error logs restnoded

Fri, 02 Oct 2020 20:45:48 GMT - fine: [f5-declarative-onboarding: restWorker.js] modify localhost /tm/sys/global-settings {"hostname":"giroux14-vm"}
Fri, 02 Oct 2020 20:45:48 GMT - finest: [f5-declarative-onboarding: restWorker.js] tryUntil: got error {"code":400}
Fri, 02 Oct 2020 20:45:48 GMT - finest: [f5-declarative-onboarding: restWorker.js] typeof err object
Fri, 02 Oct 2020 20:45:48 GMT - finer: [f5-declarative-onboarding: restWorker.js] tryUntil error: 01070903:3: Constraint 'hostname must be a fully qualified DNS name' failed for '/Common/system' tries left: 0

Logs for bigipruntimeinit

[azureuser@localhost:Active:Standalone] ~ # cat /var/log/cloud/bigIpRuntimeInit.log 
2020-10-02T20:44:56.191Z [20041]: info: Configuration file: /config/cloud/onboard_config.yaml
2020-10-02T20:44:56.201Z [20041]: info: Validating provided declaration
2020-10-02T20:44:56.287Z [20041]: info: Successfully validated declaration
2020-10-02T20:45:06.403Z [20041]: info: Resolving parameters
2020-10-02T20:45:06.552Z [20041]: info: Start working with pre-onboard commands
2020-10-02T20:45:06.552Z [20041]: info: Executing install operations.
2020-10-02T20:45:06.558Z [20041]: info: Installing - do 1.13.0
2020-10-02T20:45:10.004Z [20041]: info: Installing - as3 3.20.0
2020-10-02T20:45:15.168Z [20041]: info: Installing - ts 1.12.0
2020-10-02T20:45:22.639Z [20041]: info: Executing service operations.
2020-10-02T20:45:22.695Z [20041]: info: Creating - do unknown {"Common":{"class":"Tenant","dbvars":{"class":"DbVariables","provision.extramb":500,"restjavad.useextramb":true},"myDns":{"class":"DNS","nameServers":["8.8.8.8"]},"myNtp":{"class":"NTP","servers":["0.pool.ntp.org"],"timezone":"UTC"},"myProvisioning":{"asm":"nominal","class":"Provision","ltm":"nominal"},"mySystem":{"autoPhonehome":false,"class":"System","hostname":"giroux14-vm"}},"async":true,"class":"Device","label":"my BIG-IP declaration for declarative onboarding","schemaVersion":"1.0.0"}
2020-10-02T21:02:05.098Z [20041]: info: Task state has not passed: 422
2020-10-02T21:02:05.099Z [20041]: info: Sending F5 Teem report for failure case.
2020-10-02T21:02:06.045Z [20041]: info: {"id":"b89667a9-00e6-3f47-ad1be7265ec2","product":"BIG-IP","cpuCount":4,"diskSize":108544,"memoryInMb":14033,"version":"15.1.0.4","nicCount":2,"regKey":"KVKMY-TGVEZ-FXDLU-ZBKMY-FMAYERM","platformId":"Z100","hostname":"bigip1","management":"10.0.0.4/24","provisionedModules":{"ltm":"nominal"},"installedPackages":{"f5-service-discovery-1.2.9-2.noarch":"1.2.9","f5-declarative-onboarding-1.13.0-5.noarch":"1.13.0","f5-appsvcs-3.20.0-3.noarch":"3.20.0","f5-telemetry-1.12.0-3.noarch":"1.12.0"},"environment":{"pythonVersion":"Python 2.7.5","pythonVersionDetailed":"2.7.5 (default, Jun 18 2020, 19:39:50) \n[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]","nodeVersion":"v6.9.1","libraries":{"ssh":"OpenSSH_7.4p1, OpenSSL 1.0.2s-fips  28 May 2019"}}}
2020-10-02T21:02:06.049Z [20041]: warn: AWS did not work. Trying another cloud
2020-10-02T21:02:06.049Z [20041]: error: Cannot find module 'aws-sdk'
2020-10-02T21:02:13.716Z [20041]: info: F5 Teem report was successfully sent for failure case.
2020-10-02T21:02:13.717Z [20041]: error: Task state has not passed: 422

Possible solution

Place .local as FQDN to force proper hostname.

Or...fix metadata retrieval to obtain full FQDN hostname.

Steps to reproduce

Deploy autoscale template as-is

Screenshots

n/a

mikeshimkus commented 3 years ago

Hi Jeff, we're tracking this with issue #2259. We'll need to add ".local" back, the metadata service doesn't return a hostname.

JeffGiroux commented 3 years ago

applies to big-iq sample do file too

shyawnkarim commented 3 years ago

Closing.

This issue was resolved with Release 1.1.