F5Networks / f5-appsvcs-extension

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

Endpoints posted using AS3 are not associated with the Common Route Domain 0 when the AS3 tenant has a non-zero default Route Domain. #751

Open selinaarokiaswamy-GSLAB opened 10 months ago

selinaarokiaswamy-GSLAB commented 10 months ago

Environment

Summary

I have setup an AS3 Service Discovery Application by posting the below configuration to the AS3 endpoint.

{
    "class": "ADC",
    "schemaVersion": "3.0.0",
    "PDTenant2": {
        "class": "Tenant",
        "PDTen2App2":  {
            "class": "Application",
            "template": "http",
            "serviceMain": {
                "class": "Service_HTTP",
                "virtualAddresses": [
                    "3.3.3.22"
                ],
                "pool": "web_pool"
            },
            "web_pool": {
                "class": "Pool",
                "monitors": [
                    "http"
                ],
                "members": [
                    {
                        "servicePort": 80,
                        "serverAddresses": []
                    },
                    {
                        "addressDiscovery": "event",
                        "servicePort": 80
                    }
                ]
            }
        },
        "defaultRouteDomain": 20
    }
}

This AS3 application is created for Common Route Domain 0, where 0 is not the default Route Domain of the partition "PDTenant2". This AS3 configuration, when posted, creates a SD task which can be viewed using this link https://[big-ip-address]/mgmt/shared/service-discovery/task/~PDTenant2~PDTen2App2~web_pool/. I tried posting Endpoints/Nodes to this pool using the below configuration and the Endpoints/Nodes were created on the BIG-IP pool.

[
    {
        "id": "192.168.3.100",
        "ip": "192.168.3.100"
    },
    {
        "id": "192.168.3.101",
        "ip": "192.168.3.101"
    }
]

However, these Endpoints/Nodes that are posted to the BIG-IP pool are associated with the default Route domain of partition "PDTenant2" instead of Common Route Domain 0. The below AS3 Declaration data on the Service Discovery Endpoint reflects the Common Route domain 0 but the Endpoints/Nodes are created under partition default Route Domain 20.

{
        "id": "~PDTenant2~PDTen2App2~web_pool",
        "updateInterval": 0,
        "provider": "event",
        "providerOptions": {
            "type": "event",
            "nodeList": [
                {
                    "id": "/PDTenant2/192.168.3.100",
                    "ip": "192.168.3.100"
                },
                {
                    "id": "/PDTenant2/192.168.3.101",
                    "ip": "192.168.3.101"
                }
            ]
        },
        "resources": [
            {
                "type": "pool",
                "path": "/PDTenant2/PDTen2App2/web_pool",
                "options": {
                    "servicePort": 80,
                    "connectionLimit": 0,
                    "rateLimit": "disabled",
                    "dynamicRatio": 1,
                    "ratio": 1,
                    "priorityGroup": 0,
                    "monitor": "default"
                },
                "requiresNodes": true
            }
        ],
        "kind": "shared:service-discovery:taskstate",
        "lastRun": "2023-08-30T10:54:31.215Z",
        "nodePrefix": "/PDTenant2/",
        "metadata": {
            "configuredBy": "AS3"
        },
        "lastDiscoveryResult": {
            "timestamp": "2023-08-30T10:54:31.215Z",
            "status": "Success",
            "message": "Task was successful"
        },
        "routeDomain": 0
    }

I tried to manually add the Endpoint/node from the BIG-IP GUI using the configuration in the below image, and the node is associated with the expected Route Domain.

Screenshot 2023-08-30 161946

Steps To Reproduce

Steps to reproduce the behavior:

  1. Create AS3 application with a Route domain mapping. (in my example I used non-default Common Route domain ID 0)
  2. Verify if the Virtual Server is created in that Partition on BIG-IP with Common Route domain ID 0
  3. Post the above Endpoints/nodes to the BIG-IP pool using the Service Discovery Endpoint.
  4. Verify if the Endpoints/nodes are synced to BIGIP pool (web_pool) with Common Route domain ID 0 (This case was Failed)

Expected Behavior

On posting the Endpoints/nodes to the AS3 Service Discovery Endpoint, the AS3 Endpoint is expected to detect the route domain of that application and push these endpoints/nodes in the selected Route domain.

Actual Behavior

On posting the Endpoints/nodes to the AS3 Service Discovery Endpoint, these Endpoints/Nodes are associated with the default Route domain of partition "PDTenant2" instead of Common Route Domain 0

sunitharonan commented 4 months ago

Thank you for reaching out. We have created a internal product backlog for this item, in order for us to prioritize please reach out to us at automation_toolchain_pm@f5.com