F5Networks / f5-declarative-onboarding

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

"01071c3f:3: Cannot mix routing-protocol Legacy and TMOS mode for route-domain (/Common/0)." #287

Open luckymuk opened 2 years ago

luckymuk commented 2 years ago

Hello Team,

I am having trouble using DO for BGP configuration. I am using following DO version.

[ { "id": 0, "selfLink": "https://localhost/mgmt/shared/declarative-onboarding/info", "result": { "class": "Result", "code": 200, "status": "OK", "message": "", "errors": [] }, "version": "1.26.0", "release": "5", "schemaCurrent": "1.26.0", "schemaMinimum": "1.0.0" } ]

Here is my declaration { "$schema": "https://raw.githubusercontent.com/F5Networks/f5-declarative-onboarding/master/src/schema/1.23.0/remote.schema.json", "class": "DO", "declaration": { "schemaVersion": "1.26.0", "class": "Device", "async": true, "Common": { "class": "Tenant", "hostname": "bigip.example.com", "myRouteDomain": { "class": "RouteDomain", "id": 0, "routingProtocols": [ "BGP" ] }, "exampleRoutingBGP": { "class": "RoutingBGP", "localAS": 65010, "routerId": "10.1.1.1" } } } }

I am getting following error message _{ "class": "Result", "code": 202, "status": "ROLLINGBACK", "message": "invalid config - rolling back", "errors": [ "01071c3f:3: Cannot mix routing-protocol Legacy and TMOS mode for route-domain (/Common/0)." ] }

nickzxcv commented 8 months ago

I have a similar configuration, with schema version 1.42.0 and f5-declarative-onboarding-1.42.0-9.noarch.rpm installed in BIG-IP 17.1.1.1 build 0.0.2.

        "public-Internet": {
            "class": "RouteDomain",
            "vlans": [
                "external"
            ],
            "strict": false,
            "id": 100,
            "routingProtocols": [
                "BGP",
                "BFD"
            ]
        },
        "public-InternetBGP": {
            "class": "RoutingBGP",
            "routerId": "172.16.6.93",
            "localAS": 65010
        },

I get the error trying to create BGP:

Sat, 27 Jan 2024 00:59:18 GMT - finest: [f5-declarative-onboarding: restWorker.js | ab02083e-0f70-43e9-aaa6-363661f44180] /tm/net/routing/bgp/~Common~public-InternetBGP does not exist, creating
Sat, 27 Jan 2024 00:59:18 GMT - fine: [f5-declarative-onboarding: restWorker.js | ab02083e-0f70-43e9-aaa6-363661f44180] create localhost undefined {"name":"public-InternetBGP","partition":"Common","addressFamily":[
{"name":"ipv4","redistribute":[]},{"name":"ipv6","redistribute":[]}],"gracefulRestart":{"gracefulReset":"disabled","restartTime":0,"stalepathTime":0},"keepAlive":30,"holdTime":90,"localAs":65010,"neighbor":[],"peer
Group":[],"routeDomain":"0","routerId":"172.16.6.93"}
Sat, 27 Jan 2024 00:59:18 GMT - finest: [f5-declarative-onboarding: restWorker.js | ab02083e-0f70-43e9-aaa6-363661f44180] tryUntil: got error {"code":400}
Sat, 27 Jan 2024 00:59:18 GMT - finest: [f5-declarative-onboarding: restWorker.js | ab02083e-0f70-43e9-aaa6-363661f44180] typeof err object
Sat, 27 Jan 2024 00:59:18 GMT - finer: [f5-declarative-onboarding: restWorker.js | ab02083e-0f70-43e9-aaa6-363661f44180] tryUntil error: 01071c3f:3: Cannot mix routing-protocol Legacy and TMOS mode for route-domain
 (/Common/0). tries left: 30
Sat, 27 Jan 2024 00:59:18 GMT - finest: [f5-declarative-onboarding: restWorker.js | ab02083e-0f70-43e9-aaa6-363661f44180] tryUntil: retryOrReject: numRemaining: 30 , code: 400 , message: 01071c3f:3: Cannot mix rout
ing-protocol Legacy and TMOS mode for route-domain (/Common/0).
Sat, 27 Jan 2024 00:59:18 GMT - finer: [f5-declarative-onboarding: restWorker.js | ab02083e-0f70-43e9-aaa6-363661f44180] Unrecoverable error from HTTP request. Not retrying.
Sat, 27 Jan 2024 00:59:18 GMT - severe: [f5-declarative-onboarding: networkHandler.js | ab02083e-0f70-43e9-aaa6-363661f44180] Error creating RoutingBGP: 01071c3f:3: Cannot mix routing-protocol Legacy and TMOS mode
for route-domain (/Common/0).
Sat, 27 Jan 2024 00:59:18 GMT - severe: [f5-declarative-onboarding: networkHandler.js | ab02083e-0f70-43e9-aaa6-363661f44180] Error processing network declaration: 01071c3f:3: Cannot mix routing-protocol Legacy and
 TMOS mode for route-domain (/Common/0).
Sat, 27 Jan 2024 00:59:18 GMT - severe: [f5-declarative-onboarding: declarationHandler.js | ab02083e-0f70-43e9-aaa6-363661f44180] Error processing declaration: 01071c3f:3: Cannot mix routing-protocol Legacy and TMO
S mode for route-domain (/Common/0).
Sat, 27 Jan 2024 00:59:18 GMT - severe: [f5-declarative-onboarding: restWorker.js | ab02083e-0f70-43e9-aaa6-363661f44180] Error onboarding: 01071c3f:3: Cannot mix routing-protocol Legacy and TMOS mode for route-dom
ain (/Common/0).

I also get the error when trying to create a prefix list, and no BGP:


Sat, 27 Jan 2024 00:21:59 GMT - fine: [f5-declarative-onboarding: restWorker.js | 5a17cf8a-4796-4ba5-a6e1-20fcf6380d01] create localhost undefined {"name":"public-Internet_PrefixList_IPv4","partition":"Common","rou
teDomain":"public-Internet","entries":{"10":{"action":"permit","prefix":"192.0.2.32/27","prefixLenRange":"0"}}}
Sat, 27 Jan 2024 00:21:59 GMT - finest: [f5-declarative-onboarding: restWorker.js | 5a17cf8a-4796-4ba5-a6e1-20fcf6380d01] /tm/net/routing/prefix-list/~Common~public-Internet_PrefixList_IPv6 does not exist, creating
Sat, 27 Jan 2024 00:21:59 GMT - fine: [f5-declarative-onboarding: restWorker.js | 5a17cf8a-4796-4ba5-a6e1-20fcf6380d01] create localhost undefined {"name":"public-Internet_PrefixList_IPv6","partition":"Common","rou
teDomain":"public-Internet","entries":{"10":{"action":"permit","prefix":"2001:db8::/64","prefixLenRange":"0"}}}
Sat, 27 Jan 2024 00:21:59 GMT - finest: [f5-declarative-onboarding: restWorker.js | 5a17cf8a-4796-4ba5-a6e1-20fcf6380d01] tryUntil: got error {"code":400}
Sat, 27 Jan 2024 00:21:59 GMT - finest: [f5-declarative-onboarding: restWorker.js | 5a17cf8a-4796-4ba5-a6e1-20fcf6380d01] typeof err object
Sat, 27 Jan 2024 00:21:59 GMT - finer: [f5-declarative-onboarding: restWorker.js | 5a17cf8a-4796-4ba5-a6e1-20fcf6380d01] tryUntil error: 01071c3f:3: Cannot mix routing-protocol Legacy and TMOS mode for route-domain
 (/Common/public-Internet). tries left: 30
Sat, 27 Jan 2024 00:21:59 GMT - finest: [f5-declarative-onboarding: restWorker.js | 5a17cf8a-4796-4ba5-a6e1-20fcf6380d01] tryUntil: retryOrReject: numRemaining: 30 , code: 400 , message: 01071c3f:3: Cannot mix rout
ing-protocol Legacy and TMOS mode for route-domain (/Common/public-Internet).
Sat, 27 Jan 2024 00:21:59 GMT - finer: [f5-declarative-onboarding: restWorker.js | 5a17cf8a-4796-4ba5-a6e1-20fcf6380d01] Unrecoverable error from HTTP request. Not retrying.
Sat, 27 Jan 2024 00:21:59 GMT - severe: [f5-declarative-onboarding: networkHandler.js | 5a17cf8a-4796-4ba5-a6e1-20fcf6380d01] Error creating RoutingPrefixList: 01071c3f:3: Cannot mix routing-protocol Legacy and TMO
S mode for route-domain (/Common/public-Internet).
Sat, 27 Jan 2024 00:21:59 GMT - severe: [f5-declarative-onboarding: networkHandler.js | 5a17cf8a-4796-4ba5-a6e1-20fcf6380d01] Error processing network declaration: 01071c3f:3: Cannot mix routing-protocol Legacy and
 TMOS mode for route-domain (/Common/public-Internet).
Sat, 27 Jan 2024 00:21:59 GMT - severe: [f5-declarative-onboarding: declarationHandler.js | 5a17cf8a-4796-4ba5-a6e1-20fcf6380d01] Error processing declaration: 01071c3f:3: Cannot mix routing-protocol Legacy and TMO
S mode for route-domain (/Common/public-Internet).
Sat, 27 Jan 2024 00:21:59 GMT - severe: [f5-declarative-onboarding: restWorker.js | 5a17cf8a-4796-4ba5-a6e1-20fcf6380d01] Error onboarding: 01071c3f:3: Cannot mix routing-protocol Legacy and TMOS mode for route-dom
ain (/Common/public-Internet).
Sat, 27 Jan 2024 00:21:59 GMT - info: [f5-declarative-onboarding: restWorker.js | 5a17cf8a-4796-4ba5-a6e1-20fcf6380d01] Rolling back configuration```
nickzxcv commented 8 months ago

The error is also discussed here https://community.f5.com/discussions/technicalforum/create-net-routing-bgp-issue-rci-for-bgp-and-bfd-zebos-to-tmsh-routing/199055

The last comment mentions "Since these approaches to provisioning are mutually exclusive, do not enable any routing protocol under Network >> Route Domains “Dynamic Routing Protocols”" and so in DO removing the routingProtocols list from the routeDomain defintion allows the other stuff to be created.

So there is still the question of how to enable BFD for BGP sessions, as mentioned also in https://github.com/F5Networks/f5-declarative-onboarding/issues/366