F5Networks / f5-declarative-onboarding

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

Why must I set a RouteMap for RoutingBGP instance creation #363

Closed zongzw closed 8 months ago

zongzw commented 11 months ago

Environment

Summary

When I post the following JSON body to declare API. It runs into a timeout state after 30s., The response is

<html>

<head>
    <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />
    <title>Error 500 AsyncContext timeout</title>
</head>

<body>
    <h2>HTTP ERROR 500 AsyncContext timeout</h2>
    <table>
        <tr>
            <th>URI:</th>
            <td>/mgmt/shared/declarative-onboarding/declare</td>
        </tr>
        <tr>
            <th>STATUS:</th>
            <td>500</td>
        </tr>
        <tr>
            <th>MESSAGE:</th>
            <td>AsyncContext timeout</td>
        </tr>
        <tr>
            <th>SERVLET:</th>
            <td>com.f5.rest.app.RestServerServlet-11f39f9</td>
        </tr>
    </table>
    <hr /><a href="https://eclipse.org/jetty">Powered by Jetty:// 9.4.49.v20220914</a>
    <hr />

</body>

</html>

Steps To Reproduce

Steps to reproduce the behavior:

POST /mgmt/shared/declarative-onboarding/declare HTTP/1.1
Host: 10.250.11.xxx
Content-Type: application/json
Authorization: Basic xxxxxxxxx=

{
    "schemaVersion": "1.40.0",
    "class": "Device",
    "async": true,
    "Common": {
        "class": "Tenant",
        "hostname": "bigip.example.com",
        "exampleVlan": {
            "class": "VLAN",
            "interfaces": [
                {
                    "name": "1.1",
                    "tagged": false
                }
            ]
        },

        // "exampleRouteMap1": {
        //     "class": "RouteMap",
        //     "routeDomain": "0"
        // },

        "exampleRoutingBGP": {
            "class": "RoutingBGP",
            "localAS": 65010,
            "addressFamilies": [
                {
                    "internetProtocol": "ipv4"
                }
            ],
            "gracefulRestart": {
                "gracefulResetEnabled": true,
                "restartTime": 120,
                "stalePathTime": 60
            },
            "holdTime": 35,
            "keepAlive": 10,
            "neighbors": [
                {
                    "address": "192.0.2.1",
                    "ebgpMultihop": 2,
                    "peerGroup": "Neighbor"
                },
                {
                    "address": "192.0.2.2",
                    "ebgpMultihop": 3,
                    "peerGroup": "Neighbor"
                }
            ],
            "peerGroups": [
                {
                    "name": "Neighbor",
                    "addressFamilies": [],
                    "remoteAS": 65020
                }
            ],
            "routeDomain": "0"
        }
    }
}

If I uncomment the RouteMap part, it turns to work.

I have 2 questions here,

  1. why must I set a RouteMap here for no use?
  2. Why it run into a timeout state, the response code is 500.. The log from /var/log/restnoded/restnoded.log seems to me no help to issue locating:
Wed, 18 Oct 2023 12:02:07 GMT - info: [f5-declarative-onboarding: restWorker.js | 7d2250a9-e22f-4fa7-8d1f-e917b48cf113] Bad declaration: [{"keyword":"additionalProperties","dataPath":".declaration","schemaPath":"#/additionalProperties","params":{"additionalProperty":"code"},"message":"should NOT have additional properties"},{"keyword":"if","dataPath":"","schemaPath":"#/allOf/1/if","params":{"failingKeyword":"then"},"message":"should match \"then\" schema"}]
RobCupples commented 11 months ago

This is a duplicate of Issue 329.

This has been labeled internally as AUTOTOOL-4058.

I have found the source of this error and will have it fixed this week. Unfortunately the cutoff for the 1.41 release has passed and it will be in the following release.

mdditt2000 commented 8 months ago

Resolved in DO 1.42.0 Please review the release notes for this update.