f5-appsvcs-extension icon indicating copy to clipboard operation
f5-appsvcs-extension copied to clipboard

Unable to delete tenant with shared IP address node

Open erjac77 opened this issue 4 years ago • 5 comments
trafficstars

Environment

  • Application Services Version: 3.30.0
  • BIG-IP Version: BIG-IP 13.1.3.6 Build 0.0.4 Point Release 6

Summary

A node shared between two tenants using the shareNodes property prevents the deletion of the tenants.

Very similar to issue #416, but with an IP address node.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Submit the following declaration:
{
    "action": "deploy",
    "class": "AS3",
    "declaration": {
        "TENANT_01": {
            "APP": {
                "POOL_01": {
                    "class": "Pool",
                    "members": [
                        {
                            "serverAddresses": [
                                "10.6.3.123%0"
                            ],
                            "servicePort": 80,
                            "shareNodes": true
                        }
                    ]
                },
                "VIRTUAL_01": {
                    "class": "Service_HTTP",
                    "pool": "POOL_01",
                    "virtualAddresses": [
                        "10.6.1.11%0"
                    ],
                    "virtualPort": 80
                },
                "class": "Application"
            },
            "class": "Tenant"
        },
        "TENANT_02": {
            "APP": {
                "POOL_01": {
                    "class": "Pool",
                    "members": [
                        {
                            "serverAddresses": [
                                "10.6.3.123%0"
                            ],
                            "servicePort": 80,
                            "shareNodes": true
                        }
                    ]
                },
                "VIRTUAL_01": {
                    "class": "Service_HTTP",
                    "pool": "POOL_01",
                    "virtualAddresses": [
                        "10.6.1.12%0"
                    ],
                    "virtualPort": 80
                },
                "class": "Application"
            },
            "class": "Tenant"
        },
        "class": "ADC",
        "label": "AS3 Declaration",
        "schemaVersion": "3.0.0"
    }
}
  1. Delete TENANT_02 by submitting an empty tenant:
{
    "action": "deploy",
    "class": "AS3",
    "declaration": {
        "TENANT_02": {
            "class": "Tenant"
        },
        "class": "ADC",
        "label": "AS3 Declaration",
        "schemaVersion": "3.0.0"
    }
}
  1. Observe the following error response:
        {
            "code": 422,
            "message": "declaration failed",
            "response": "01070110:3: Node address '/Common/10.6.3.123%0' is referenced by a member of pool '/TENANT_01/APP/POOL_01'.",
            "host": "localhost",
            "tenant": "TENANT_02",
            "runTime": 1575
        }

Expected Behavior

The DELETE request should succeed and remove TENANT_02 without affecting TENANT_01.

Actual Behavior

An error message is received saying the node is referenced by another tenant even if shareNodes property is set to true on the pool member in both tenants.

erjac77 avatar Aug 30 '21 15:08 erjac77

Thank you for reporting this. I was able to reproduce this with version 3.30, but not with a recent development build. It looks like this issue was already resolved and the fix will be available in the next release (3.31.0).

dstokesf5 avatar Aug 31 '21 18:08 dstokesf5

Hi, 3.31.0 was released 2 days ago, but this bug is not mentioned in the release note. We tried it anyway, and we have the same problem. Can you confirm?

erjac77 avatar Sep 22 '21 17:09 erjac77

Strange. I am unable to reproduce the issue with 3.31.0. I wonder if the node /Common/10.6.3.123%0 has some bad metadata leftover on it. Can you provide the output of tmsh list /Common/10.6.3.123%0?

dstokesf5 avatar Sep 22 '21 17:09 dstokesf5

tmsh list ltm node /Common/10.6.3.123%0

ltm node 10.6.3.123%0 {
    address 10.6.3.123
    metadata {
        references {
            value 2
        }
    }
}

erjac77 avatar Sep 22 '21 18:09 erjac77

You're right. It seems the node has some metadata leftover. If I remove the tenants and the node, and redo the steps, everything is working fine.

erjac77 avatar Sep 22 '21 18:09 erjac77