F5Networks / f5-appsvcs-extension

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

Pool member adminState update from enable to offline fails with 422 #777

Closed arzzon closed 4 months ago

arzzon commented 8 months ago

Environment

Summary

AS3 3.47/3.48 responds with 422 error code while posting declaration with VS pool member adminState: offline . However, it works well with AS3 3.45.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Submit the following declaration with pool member adminState: enable:

    {
    "$schema": "https://raw.githubusercontent.com/F5Networks/f5-appsvcs-extension/v3.47.0/schema/3.47.0/as3-schema-3.47.0-8.json",
    "class": "AS3",
    "declaration": {
        "class": "ADC",
        "controls": {
            "class": "Controls",
            "userAgent": "CIS/v2.15.0 OCP/v4.11.0"
        },
        "id": "urn:uuid:85626792-9ee7-46bb-8fc8-4ba708cfdc1d",
        "label": "CIS Declaration",
        "remark": "Auto-generated by CIS",
        "schemaVersion": "3.47.0",
        "test": {
            "Shared": {
                "class": "Application",
                "crd_10_8_3_11_80": {
                    "class": "Service_HTTP",
                    "snat": "auto",
                    "source": "0.0.0.0/0",
                    "translateServerAddress": true,
                    "translateServerPort": true,
                    "virtualAddresses": [
                        "10.8.3.11"
                    ],
                    "virtualPort": 80
                },
                "pytest_svc_1_80_default_foo_example_com": {
                    "class": "Pool",
                    "members": [
                        {
                            "addressDiscovery": "static",
                            "adminState": "enable",
                            "serverAddresses": [
                                "10.129.1.136"
                            ],
                            "servicePort": 80
                        }
                    ],
                    "monitors": [
                        {
                            "use": "/test/Shared/pytest_svc_1_default_foo_example_com_foo_http_80"
                        }
                    ]
                },
                "pytest_svc_1_default_foo_example_com_foo_http_80": {
                    "adaptive": false,
                    "class": "Monitor",
                    "dscp": 0,
                    "interval": 20,
                    "monitorType": "http",
                    "receive": "a",
                    "send": "/",
                    "targetAddress": "",
                    "timeout": 10
                },
                "template": "shared"
            },
            "class": "Tenant",
            "defaultRouteDomain": 0,
            "label": "test"
        }
    }
    }
  2. Submit the following declaration updating the pool member adminState: offline:

    {
    "$schema": "https://raw.githubusercontent.com/F5Networks/f5-appsvcs-extension/v3.47.0/schema/3.47.0/as3-schema-3.47.0-8.json",
    "class": "AS3",
    "declaration": {
        "class": "ADC",
        "controls": {
            "class": "Controls",
            "userAgent": "CIS/v2.15.0 OCP/v4.11.0"
        },
        "id": "urn:uuid:85626792-9ee7-46bb-8fc8-4ba708cfdc1d",
        "label": "CIS Declaration",
        "remark": "Auto-generated by CIS",
        "schemaVersion": "3.47.0",
        "test": {
            "Shared": {
                "class": "Application",
                "crd_10_8_3_11_80": {
                    "class": "Service_HTTP",
                    "snat": "auto",
                    "source": "0.0.0.0/0",
                    "translateServerAddress": true,
                    "translateServerPort": true,
                    "virtualAddresses": [
                        "10.8.3.11"
                    ],
                    "virtualPort": 80
                },
                "pytest_svc_1_80_default_foo_example_com": {
                    "class": "Pool",
                    "members": [
                        {
                            "addressDiscovery": "static",
                            "adminState": "offline",
                            "serverAddresses": [
                                "10.129.1.136"
                            ],
                            "servicePort": 80
                        }
                    ],
                    "monitors": [
                        {
                            "use": "/test/Shared/pytest_svc_1_default_foo_example_com_foo_http_80"
                        }
                    ]
                },
                "pytest_svc_1_default_foo_example_com_foo_http_80": {
                    "adaptive": false,
                    "class": "Monitor",
                    "dscp": 0,
                    "interval": 20,
                    "monitorType": "http",
                    "receive": "a",
                    "send": "/",
                    "targetAddress": "",
                    "timeout": 10
                },
                "template": "shared"
            },
            "class": "Tenant",
            "defaultRouteDomain": 0,
            "label": "test"
        }
    }
    }
  3. Observe the following error response:

    "results": [
        {
            "code": 422,
            "message": "declaration failed",
            "response": "01020036:3: The requested Pool Member (/test/Shared/pytest_svc_1_80_default_foo_example_com /test/10.129.1.136 80) was not found.",
            "host": "localhost",
            "tenant": "test",
            "runTime": 3296
        }
    ]

Expected Behavior

The above-submitted AS3 declaration should work.

Actual Behavior

AS3 responds with 422 error.

sunitharonan commented 7 months ago

Thank you @arzzon. In order to prioritize and understand the issue better, please reach out to us at automation_toolchain_pm@f5.com

mdditt2000 commented 7 months ago

AUTOTOOL-4052: (GitHub Issue 759) should have resolved this issue. Please validate with the released version of AS3-48 or AS3-48.1

github-actions[bot] commented 4 months ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.