F5Networks / f5-appsvcs-extension

F5 BIG-IP Application Services 3 Extension
Apache License 2.0
164 stars 53 forks source link

[AS3 3.47] Declaration fails with 422 Invalid Virtual Address ERROR , it works fine with AS3 3.45 #771

Closed lavanya-f5 closed 7 months ago

lavanya-f5 commented 11 months ago

Environment

Summary

As part of testing, we are creating a virtual server with service address which works fine. When we try to delete service address and just use virtualAddress AS3 3.47 throws 422 with Invalid Virtual Address error. The same declaration gets posted successfully with AS3 3.45

Steps To Reproduce

Steps to reproduce the behavior:

  1. Submit the following declaration:

    {"$schema":"https://raw.githubusercontent.com/F5Networks/f5-appsvcs-extension/master/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.12.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_0_4_1344":{"class":"Service_TCP","pool":{"use":"/test/Shared/pytest_svc_1_1344_default"},"profileL4":"basic","snat":"auto","virtualAddresses":["10.8.0.4"],"virtualPort":1344},"pytest_svc_1_1344_default":{"class":"Pool","members":[{"addressDiscovery":"static","serverAddresses":["10.4.1.117"],"servicePort":31504,"shareNodes":true},{"addressDiscovery":"static","serverAddresses":["10.4.1.116"],"servicePort":31504,"shareNodes":true},{"addressDiscovery":"static","serverAddresses":["10.4.1.115"],"servicePort":31504,"shareNodes":true}],"minimumMonitors":1,"monitors":[{"use":"/test/Shared/pytest_svc_1_default_tcp_1344"}]},"pytest_svc_1_default_tcp_1344":{"adaptive":false,"class":"Monitor","interval":20,"monitorType":"tcp","receive":"","send":"","targetAddress":"","timeout":10},"template":"shared"},"class":"Tenant","defaultRouteDomain":0,"label":"test"}}}
  2. Observe the following error response:

    {
    "code": 422,
    "message": "declaration failed",
    "response": "0107176c:3: Invalid Virtual Address, the IP address 10.8.0.4 already exists."
    }
nandakishorepeddi commented 11 months ago

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

Submitted Declaration:

{
    "$schema": "https://raw.githubusercontent.com/F5Networks/f5-appsvcs-extension/master/schema/3.48.0/as3-schema-3.48.0-10.json",
    "class": "AS3",
    "declaration": {
        "class": "ADC",
        "controls": {
            "class": "Controls",
            "userAgent": "CIS/v2.15.0 OCP/v4.12.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_0_4_1344": {
                    "class": "Service_TCP",
                    "pool": {
                        "use": "/test/Shared/pytest_svc_1_1344_default"
                    },
                    "profileL4": "basic",
                    "snat": "auto",
                    "virtualAddresses": [
                        "10.8.0.4"
                    ],
                    "virtualPort": 1344
                },
                "pytest_svc_1_1344_default": {
                    "class": "Pool",
                    "members": [
                        {
                            "addressDiscovery": "static",
                            "serverAddresses": [
                                "10.4.1.117"
                            ],
                            "servicePort": 31504,
                            "shareNodes": true
                        },
                        {
                            "addressDiscovery": "static",
                            "serverAddresses": [
                                "10.4.1.116"
                            ],
                            "servicePort": 31504,
                            "shareNodes": true
                        },
                        {
                            "addressDiscovery": "static",
                            "serverAddresses": [
                                "10.4.1.115"
                            ],
                            "servicePort": 31504,
                            "shareNodes": true
                        }
                    ],
                    "minimumMonitors": 1,
                    "monitors": [
                        {
                            "use": "/test/Shared/pytest_svc_1_default_tcp_1344"
                        }
                    ]
                },
                "pytest_svc_1_default_tcp_1344": {
                    "adaptive": false,
                    "class": "Monitor",
                    "interval": 20,
                    "monitorType": "tcp",
                    "receive": "",
                    "send": "",
                    "targetAddress": "",
                    "timeout": 10
                },
                "template": "shared"
            },
            "class": "Tenant",
            "defaultRouteDomain": 0,
            "label": "test"
        }
    }
}

Response from AS3:

{
    "results": [
        {
            "code": 200,
            "message": "success",
            "lineCount": 28,
            "host": "localhost",
            "tenant": "test",
            "runTime": 1466
        }
    ],
    "declaration": {
        "class": "ADC",
        "controls": {
            "class": "Controls",
            "userAgent": "CIS/v2.15.0 OCP/v4.12.0",
            "archiveTimestamp": "2023-11-08T02:20:16.944Z"
        },
        "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_0_4_1344": {
                    "class": "Service_TCP",
                    "pool": {
                        "use": "/test/Shared/pytest_svc_1_1344_default"
                    },
                    "profileL4": "basic",
                    "snat": "auto",
                    "virtualAddresses": [
                        "10.8.0.4"
                    ],
                    "virtualPort": 1344
                },
                "pytest_svc_1_1344_default": {
                    "class": "Pool",
                    "members": [
                        {
                            "addressDiscovery": "static",
                            "serverAddresses": [
                                "10.4.1.117"
                            ],
                            "servicePort": 31504,
                            "shareNodes": true
                        },
                        {
                            "addressDiscovery": "static",
                            "serverAddresses": [
                                "10.4.1.116"
                            ],
                            "servicePort": 31504,
                            "shareNodes": true
                        },
                        {
                            "addressDiscovery": "static",
                            "serverAddresses": [
                                "10.4.1.115"
                            ],
                            "servicePort": 31504,
                            "shareNodes": true
                        }
                    ],
                    "minimumMonitors": 1,
                    "monitors": [
                        {
                            "use": "/test/Shared/pytest_svc_1_default_tcp_1344"
                        }
                    ]
                },
                "pytest_svc_1_default_tcp_1344": {
                    "adaptive": false,
                    "class": "Monitor",
                    "interval": 20,
                    "monitorType": "tcp",
                    "receive": "",
                    "send": "",
                    "targetAddress": "",
                    "timeout": 10
                },
                "template": "shared"
            },
            "class": "Tenant",
            "defaultRouteDomain": 0,
            "label": "test"
        },
        "updateMode": "selective"
    }
}
dstokesf5 commented 8 months ago

@lavanya-f5 Can you confirm if you are still encountering this issue on the latest AS3 version?

github-actions[bot] commented 7 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.