F5Networks / f5-declarative-onboarding

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

DO - Declaration referencing unresolvable NTP FQDN after it has been removed from LTM configuration. #337

Open Ronnie110755 opened 1 year ago

Ronnie110755 commented 1 year ago

Environment

Summary

The LTM in question has already been configured via DO as a Stand alone. This DO Job is to add the device into a Device Group. It is being done in this manner as a test due to inconsistencies uncovered in establishing an HA cfg between two devices.

The issue here is - The LTM was using an FQDN in the NTP configuration for a time server. The error that is occurring:

{         "id": "0ebe6770-9124-4bdc-8b34-3836b93df22d",         "selfLink": "https://localhost/mgmt/shared/declarative-onboarding/task/0ebe6770-9124-4bdc-8b34-3836b93df22d",         "code": 500,         "status": "ERROR",         "message": "invalid config - rolled back",         "errors": [             "tryUntil: max tries reached: Unable to resolve host time.google.com",             "tryUntil: max tries reached: Unable to resolve host time.google.com"         ],         "result": {             "class": "Result",             "code": 500,             "status": "ERROR",             "dryRun": false,             "message": "invalid config - rolled back",             "errors": [                 "tryUntil: max tries reached: Unable to resolve host time.google.com",                 "tryUntil: max tries reached: Unable to resolve host time.google.com"             ]         },

After the FQDN was removed and replaced with an ip address the same error was still occurring.

Here is the JSON script that is being run when the error occurs:

{     "schemaVersion": "1.34.0",     "class": "Device",     "async": true,     "label": "DO Deploy Lab",         "controls": {         "trace": true,         "traceResponse": true,         "dryRun": false     },     "Common": {         "class": "Tenant",         "mySystem": {             "class": "System",             "hostname": "xxxxxxxxx",             "cliInactivityTimeout": 600,             "consoleInactivityTimeout": 600,             "autoPhonehome": false         },         "ManagementIp": {             "class": "ManagementIp",             "address": "xxxxxxxxx",             "remark": "management ip"         },         "myLicense": {             "class": "License",             "licenseType": "regKey",             "regKey": "xxxxxxxxxxx",             "overwrite": false         },         "failoverUnicastAddress": {             "class": "FailoverUnicast",             "addressPorts": [                 {                     "address": "10.18.4.72"                 },                 {                     "address": "192.168.0.4"                 }             ]             },         "Mirroring": {             "class": "MirrorIp",             "primaryIp": "192.168.0.4",             "secondaryIp": "10.18.4.72"         },         "sync": {             "class": "ConfigSync",             "configsyncIp": "192.168.0.4"         },         "float_10.18.4.73": {             "class": "SelfIp",             "address": "10.18.4.73/26",             "vlan": "vlan_121",             "allowService": "default",             "trafficGroup": "traffic-group-1"         },         "float_10.18.4.137": {             "class": "SelfIp",             "address": "10.18.4.137/26",             "vlan": "vlan_122",             "allowService": "default",             "trafficGroup": "traffic-group-1"         },         "float_10.18.4.200": {             "class": "SelfIp",             "address": "10.18.4.200/26",             "vlan": "vlan_123",             "allowService": "default",             "trafficGroup": "traffic-group-1"         },         "trust": {             "class": "DeviceTrust",             "localPassword": "xxxxxxx",             "localUsername": "admin",             "remoteHost": "10.18.4.6",             "remotePassword": "xxxxxxx!",             "remoteUsername": "admin"                     },         "Z-lab-sby": {             "class": "DeviceGroup",             "type": "sync-failover",             "members": [                 "10.18.4.6",                 "10.18.4.7"             ],             "owner": "/Common/Z-lab-sby/members/0",             "autoSync": true,             "saveOnAutoSync": false,             "networkFailover": true,             "fullLoadOnSync": false,             "asmSync": false         }             } }

Expected Behavior

Reference the ip address not the fqdn that was removed

Actual Behavior

See error output

mdditt2000 commented 1 year ago

thanks @Ronnie110755 will review and prioritize for our next sprint starting Tuesday.

sunitharonan commented 1 year ago

Added to our internal product backlog as AUTOTOOL-3635

Ronnie110755 commented 1 year ago

Sunitha,

Quick question. I encountered this message in vscode while executing a json script on a very slow to respond ltm: 251 [2023-01-16T22:15:28.529Z] [INFO]: authToken expired -> will refresh with next HTTPS call

When I connect to the LTM using f5 extensions I see the following: 256 [2023-01-18T16:56:59.430Z] [INFO]: HTTPS-RESP [92rz]: 200 - OK 257 [2023-01-18T16:56:59.431Z] [INFO]: Starting token timer: 1200

That is 20 minutes. I know in the real world that is more than enough time to run a JSON DO script. BUT! you never know.

I have been looking for a way in VSCODE to set that token timeout value. I can't a way to do that.

Is there a quick answer that someone may have for this?

Or a forum I can post this into that is not a an Issue or a Bug area?

Thanks! Ronnie Cusmano.

------ Original Message ------ From: "Suntiha Ronanki" @.> To: "F5Networks/f5-declarative-onboarding" @.> Cc: "Ronnie110755" @.>; "Mention" @.> Sent: 1/18/2023 11:48:47 AM Subject: Re: [F5Networks/f5-declarative-onboarding] DO - Declaration referencing unresolvable NTP FQDN after it has been removed from LTM configuration. (Issue #337)

Added to our internal product backlog as AUTOTOOL-3635

— Reply to this email directly, view it on GitHub https://github.com/F5Networks/f5-declarative-onboarding/issues/337#issuecomment-1387378118, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZBWEOIRXFO7OJK5R5IM2ATWTANG7ANCNFSM6AAAAAAT2V3KBQ. You are receiving this because you were mentioned.Message ID: @.***>

mdditt2000 commented 1 year ago

Cannot modify the NTP configuration from IP to FQDN.

Before

     "myNtp": {
            "class": "NTP",
            "servers": [
                "172.23.241.134"
            ],
            "timezone": "UTC"
        },

to

"myNtp": {
            "class": "NTP",
            "servers": [
                "time.f5.com"
            ],
            "timezone": "UTC"
        },

Failed with Error

{
        "id": "2449777e-2760-4c41-a719-6e43858c5bb0",
        "selfLink": "https://localhost/mgmt/shared/declarative-onboarding/task/2449777e-2760-4c41-a719-6e43858c5bb0",
        "code": 422,
        "status": "ERROR",
        "message": "invalid config - rolled back",
        "errors": [
            "01070276:3: The requested device (/Common/bigip1.f5demo.com) already exists.",
            "01070276:3: The requested device (/Common/bigip1.f5demo.com) already exists."
        ],
        "result": {
            "class": "Result",
            "code": 422,
            "status": "ERROR",
            "dryRun": false,
            "message": "invalid config - rolled back",
            "errors": [
                "01070276:3: The requested device (/Common/bigip1.f5demo.com) already exists.",
                "01070276:3: The requested device (/Common/bigip1.f5demo.com) already exists."
            ]
        },