F5Networks / f5-appsvcs-extension

F5 BIG-IP Application Services 3 Extension
Apache License 2.0
163 stars 52 forks source link

[AS3 3.48] Observed 422 error with monitor reference #775

Closed nandakishorepeddi closed 7 months ago

nandakishorepeddi commented 8 months ago

Environment

Summary

Observed 422 error with monitor reference on AS3 v3.48 The same AS3 declaration works with the AS3 v3.47.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Submit the following declaration:

    {
    "test": {
        "Shared": {
            "class": "Application",
            "crd_10_8_128_1_1344": {
                "class": "Service_TCP",
                "virtualAddresses": [
                    "10.8.128.1"
                ],
                "virtualPort": 1344,
                "snat": "auto",
                "pool": {
                    "use": "/test/Shared/pytest_svc_1_1344_default"
                },
                "profileL4": "basic"
            },
            "pytest_svc_1_1344_default": {
                "class": "Pool",
                "members": [
                    {
                        "addressDiscovery": "static",
                        "serverAddresses": [
                            "10.129.1.215"
                        ],
                        "servicePort": 1344
                    }
                ],
                "monitors": [
                    {
                        "use": "/test/Shared/pytest_svc_1_default_tcp_1344"
                    }
                ],
                "minimumMonitors": 1
            },
            "pytest_svc_1_default_tcp_1344": {
                "class": "Monitor",
                "interval": 20,
                "monitorType": "tcp",
                "targetAddress": "",
                "timeout": 10,
                "adaptive": false,
                "receive": "",
                "send": ""
            },
            "template": "shared"
        },
        "class": "Tenant",
        "defaultRouteDomain": 0,
        "label": "test"
    },
    "class": "ADC",
    "controls": {
        "class": "Controls",
        "userAgent": "CIS/v2.15.0 OCP/v4.13.0",
        "archiveTimestamp": "2023-11-03T13:36:21.003Z"
    },
    "id": "urn:uuid:85626792-9ee7-46bb-8fc8-4ba708cfdc1d",
    "label": "CIS Declaration",
    "remark": "Auto-generated by CIS",
    "schemaVersion": "3.47.0",
    "updateMode": "selective"
    }
  2. Observe the following error response:

    {
    "code": 422,
    "errors": [
        "/test/Shared/pytest_svc_1_default_tcp_1344: should NOT have additional properties"
    ],
    "declarationFullId": "",
    "message": "declaration is invalid"
    }

Expected Behavior

The above-submitted AS3 declaration should work as is on the latest AS3 v3.48 or later

ghost commented 8 months ago

You'll need to place the shared objects in the Common tenant. You would have two tenants in this case, "Common" for shared objects and then a separate tenant for your application service that consumes those shared objects. A great example can be found here: https://clouddocs.f5.com/training/community/big-iq-cloud-edition/html/class1/module2/lab14.html.

nandakishorepeddi commented 8 months ago

@grf5 , May I know why the same AS3 declaration is working with AS3 v3.47 but not with AS3 v3.48. Are there any breaking changes in AS3 v3.48 like this?

ghost commented 8 months ago

@nandakishorepeddi, unfortunately I cannot myself. I don't see 3.48 on the releases page: https://github.com/F5Networks/f5-appsvcs-extension/releases. I'll defer to the dev team to address this, but if moving the shared objects to the Common tenant works, I believe that would be best practice.

RobCupples commented 8 months ago

v3.48 has not been released yet. Any copies of it are pre-release versions. We have been aware of this issue since very late last week and are actively pursuing a fix before v3.48 is officially released. Apologies for any inconvenience.

RobCupples commented 8 months ago

Application Services version 3.48.0-10 is available through internal channels and should have a fix for this issue. This is the current release candidate for v3.48.

nandakishorepeddi commented 8 months ago

This issue is not reproducible on latest AS3 build v3.48.0-10

Response from AS3 for the above declaration:

{
    "results": [
        {
            "code": 200,
            "message": "success",
            "lineCount": 25,
            "host": "localhost",
            "tenant": "test",
            "runTime": 1625
        }
    ],
    "declaration": {
        "test": {
            "Shared": {
                "class": "Application",
                "crd_10_8_128_1_1344": {
                    "class": "Service_TCP",
                    "virtualAddresses": [
                        "10.8.128.1"
                    ],
                    "virtualPort": 1344,
                    "snat": "auto",
                    "pool": {
                        "use": "/test/Shared/pytest_svc_1_1344_default"
                    },
                    "profileL4": "basic"
                },
                "pytest_svc_1_1344_default": {
                    "class": "Pool",
                    "members": [
                        {
                            "addressDiscovery": "static",
                            "serverAddresses": [
                                "10.129.1.215"
                            ],
                            "servicePort": 1344
                        }
                    ],
                    "monitors": [
                        {
                            "use": "/test/Shared/pytest_svc_1_default_tcp_1344"
                        }
                    ],
                    "minimumMonitors": 1
                },
                "pytest_svc_1_default_tcp_1344": {
                    "class": "Monitor",
                    "interval": 20,
                    "monitorType": "tcp",
                    "targetAddress": "",
                    "timeout": 10,
                    "adaptive": false,
                    "receive": "",
                    "send": ""
                },
                "template": "shared"
            },
            "class": "Tenant",
            "defaultRouteDomain": 0,
            "label": "test"
        },
        "class": "ADC",
        "controls": {
            "class": "Controls",
            "userAgent": "CIS/v2.15.0 OCP/v4.13.0",
            "archiveTimestamp": "2023-11-08T02:24:35.858Z"
        },
        "id": "urn:uuid:85626792-9ee7-46bb-8fc8-4ba708cfdc1d",
        "label": "CIS Declaration",
        "remark": "Auto-generated by CIS",
        "schemaVersion": "3.48.0",
        "updateMode": "selective"
    }
}
sunitharonan commented 7 months ago

As per Trinath's request, I have created a jira AUTOTOOL-4082 and added to the sprint.

mdditt2000 commented 7 months ago

@nandakishorepeddi can i close this issue out. Resolved

nandakishorepeddi commented 7 months ago

Yes @mdditt2000 , issue is resolved with latest AS3v3.48