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

AS3 failed to delete/redeploy with FQDN node in Common/Shared

Open zongzw opened this issue 3 years ago • 4 comments

I deployed the pool/node resources to Common as:

image

The AS3 declaration is:

{
    "class": "AS3",
    "action": "deploy",
    "persist": true,
    "declaration": {
        "class": "ADC",
        "schemaVersion": "3.0.0",
        "Common": {
            "class": "Tenant",
            "Shared": {
                "class": "Application",
                "template": "shared",
                "web_pool-1640761559": {
                    "class": "Pool",
                    "monitors": [
                        {
                            "use": "http_ex-1640761559-for-web_pool"
                        }
                    ],
                    "members": [
                        {
                            "servicePort": 80,
                            "serverAddresses": [
                                "10.250.11.116"
                            ],
                            "shareNodes": true
                        },
                        {
                            "servicePort": 80,
                            "hostname": "server.com",
                            "addressDiscovery": "fqdn",
                            "monitors": [
                                {
                                    "use": "http_ex-1640761559-for-web_pool-server.com"
                                }
                            ]
                        },
                        {
                            "servicePort": 80,
                            "hostname": "www.example.org",
                            "addressDiscovery": "fqdn",
                            "monitors": [
                                {
                                    "use": "http_ex-1640761559-for-web_pool-www.example.org"
                                }
                            ]
                        },
                        {
                            "servicePort": 80,
                            "hostname": "www.example.com",
                            "addressDiscovery": "fqdn",
                            "monitors": [
                                {
                                    "use": "http_ex-1640761559-for-web_pool-www.example.com"
                                }
                            ]
                        }
                    ]
                },
                "http_ex-1640761559-for-web_pool": {
                    "class": "Monitor",
                    "monitorType": "external",
                    "pathname": "/Common/http_ex",
                    "interval": 15,
                    "timeout": 16,
                    "arguments": "/",
                    "environmentVariables": {
                        "ts_host": "127.0.0.1",
                        "ts_port": "6514",
                        "logging_file": "/var/log/monitors/ex_monitors.log",
                        "logging_level": "DEBUG",
                        "probing_timeout": "3",
                        "pool_name": "web_pool"
                    }
                },
                "http_ex-1640761559-for-web_pool-server.com": {
                    "class": "Monitor",
                    "monitorType": "external",
                    "pathname": "/Common/http_ex",
                    "interval": 15,
                    "timeout": 16,
                    "arguments": "/",
                    "environmentVariables": {
                        "ts_host": "127.0.0.1",
                        "ts_port": "6514",
                        "logging_file": "/var/log/monitors/ex_monitors.log",
                        "logging_level": "DEBUG",
                        "probing_timeout": "3",
                        "pool_name": "web_pool",
                        "fqdn": "server.com"
                    }
                },
                "http_ex-1640761559-for-web_pool-www.example.org": {
                    "class": "Monitor",
                    "monitorType": "external",
                    "pathname": "/Common/http_ex",
                    "interval": 15,
                    "timeout": 16,
                    "arguments": "/",
                    "environmentVariables": {
                        "ts_host": "127.0.0.1",
                        "ts_port": "6514",
                        "logging_file": "/var/log/monitors/ex_monitors.log",
                        "logging_level": "DEBUG",
                        "probing_timeout": "3",
                        "pool_name": "web_pool",
                        "fqdn": "www.example.org"
                    }
                },
                "http_ex-1640761559-for-web_pool-www.example.com": {
                    "class": "Monitor",
                    "monitorType": "external",
                    "pathname": "/Common/http_ex",
                    "interval": 15,
                    "timeout": 16,
                    "arguments": "/",
                    "environmentVariables": {
                        "ts_host": "127.0.0.1",
                        "ts_port": "6514",
                        "logging_file": "/var/log/monitors/ex_monitors.log",
                        "logging_level": "DEBUG",
                        "probing_timeout": "3",
                        "pool_name": "web_pool",
                        "fqdn": "www.example.com"
                    }
                }
            }
        }
    }
}

The first time, it is successful. But it would be failed when do it again when I try to replace 1640761559 to 1640761559xx(a timestamp in fact).

Is it an issue that AS3 doesn't handle well Common and Common/Shared

When I try to use the following body to delete, it fails as well.

{"class": "AS3", "action": "remove"}

It says:

"message": "declaration failed", "response": "01070083:3: Monitor /Common/Shared/http_ex-1640761559-for-web_pool-www.example.com is in use."

I have to remove the pool and node under Common/Shared with f5networks.f5_modules.bigip_* ansible module.

But after the manual removal, it stil says the monitor is in use.!!!

OK... use the big operation:

rm -f bigip.conf && tmsh load sys config

Everything turns back OK.

zongzw avatar Dec 29 '21 07:12 zongzw

Any update to this?

zongzw avatar Jan 20 '22 07:01 zongzw

What version of AS3 are you using? In the title, you mentioned FQDN nodes. Do you see this issue when you are not using FQDN nodes?

I believe the DELETE issue, and possibly the monitor rename issue, are related to this known issue: https://github.com/F5Networks/f5-appsvcs-extension/issues/2. I believe there were some tmsh limitations that made resolving this at the time difficult.

dstokesf5 avatar Jan 28 '22 20:01 dstokesf5

Thanks for the response. I'm using 3.31.0. This issue can be reproduced with FQDN node. None-fqdn node seems OK. You may notice the www.example.com and www.example.org, they are resolved to the same IPv4. And only when I use these 2 fqdn together in my declaration body, this issue can be reproduced.

zongzw avatar Jan 29 '22 01:01 zongzw

Thank you for your feedback. I have added this to our internal product backlog as AUTOTOOL-2934.

dstokesf5 avatar Feb 01 '22 21:02 dstokesf5

Please reach out to us at [email protected] in order for us to get more information and prioritize. Thanks.

sunitharonan avatar Nov 07 '22 19:11 sunitharonan

Thanks for reaching out, we will prioritize Autotool-2934 and update the github issue accordingly.

sunitharonan avatar Nov 10 '22 16:11 sunitharonan

For FQDN nodes, AS3 relies on BIG-IP to create the node. Unfortunately, this shared management of the node between BIG-IP and AS3 leads to ambiguity that cannot be resolved safely when the FQDN node is in /Common/Shared. For this reason, FQDN nodes in /Common/Shared need to be deleted manually. There is now a note about this here: https://clouddocs.f5.com/products/extensions/f5-appsvcs-extension/latest/declarations/miscellaneous.html?highlight=shared%20fqdn%20nodes%20must%20deleted%20manually#using-sharenodes-to-reuse-nodes-across-tenants

dstokesf5 avatar Jan 09 '24 17:01 dstokesf5