f5-appsvcs-extension
f5-appsvcs-extension copied to clipboard
Unable to reference existing virtual addresses that exist in Common in route domains
Environment
- Application Services Version: 3.36.0
- BIG-IP Version: 16.1.2.2
Summary
Found this one when I was trying to get around https://github.com/F5Networks/f5-appsvcs-extension/issues/605 Unable to reference virtual addresses that exist in Common in route domains.
Steps To Reproduce
Steps to reproduce the behavior:
- Create Virtual Addresses:
create ltm virtual-address wildcard_v4_rtd0 address 0.0.0.0 auto-delete false
create ltm virtual-address wildcard_v4_rtd2 address 0.0.0.0%2 auto-delete false
- Post the following Declaration:
{
"$schema": "https://raw.githubusercontent.com/F5Networks/f5-appsvcs-extension/master/schema/latest/as3-schema.json",
"class": "AS3",
"action": "deploy",
"persist": true,
"id": "Shared",
"declaration": {
"class": "ADC",
"schemaVersion": "3.0.0",
"Common": {
"class": "Tenant",
"Shared": {
"class": "Application",
"template": "shared",
"enable": true,
"wildcard_v4_rtd0_vs": {
"class": "Service_L4",
"layer4": "any",
"virtualPort": 0,
"snat": "none",
"translateServerAddress": false,
"translateServerPort": false,
"virtualAddresses": [
[
{
"bigip": "/Common/wildcard_v4_rtd0"
},
"0.0.0.0/0"
]
],
"profileL4": {
"bigip": "/Common/fastL4"
},
"allowVlans": [
{
"bigip": "/Common/VLAN1"
}
],
"shareAddresses": true,
"redirect80": false,
"persistenceMethods": []
},
"wildcard_v4_rtd2_vs": {
"class": "Service_L4",
"layer4": "any",
"virtualPort": 0,
"snat": "none",
"translateServerAddress": false,
"translateServerPort": false,
"virtualAddresses": [
[
{
"bigip": "/Common/wildcard_v4_rtd2"
},
"0.0.0.0%2/0"
]
],
"profileL4": {
"bigip": "/Common/fastL4"
},
"allowVlans": [
{
"bigip": "/Common/VLAN2"
}
],
"shareAddresses": true,
"redirect80": false,
"persistenceMethods": []
}
}
}
}
}
- Observe the following error response:
"results": [
{
"code": 422,
"message": "declaration failed",
"response": "0107028b:3: The source (0.0.0.0%2) and destination (0.0.0.0) addresses for virtual server (/Common/Shared/wildcard_v4_rtd2_vs) must be in the same route domain.",
"host": "localhost",
"tenant": "Common",
"runTime": 1469
},
{
"code": 422,
"message": "declaration failed",
"response": "0107028b:3: The source (0.0.0.0%2) and destination (0.0.0.0) addresses for virtual server (/Common/Shared/wildcard_v4_rtd2_vs) must be in the same route domain.",
"host": "localhost",
"tenant": "Common",
"runTime": 1217
}
],
- Take a look at the tmsh command that is generated, my guess is based on the "virtual_server_wildmask 0.0.0.0" below, the %2 is getting trimmed off.
create { virtual_server { virtual_server_name "/Common/Shared/wildcard_v4_rtd2_vs" virtual_server_contribute_to_va_status 1 virtual_server_auto_lasth
op 0 virtual_server_conn_limit 0 virtual_server_description "Shared" virtual_server_va_name "/Common/wildcard_v4_rtd2" virtual_server_port any virtual_server_ip_pr
oto 0 virtual_server_lasthop_pool_name "" virtual_server_wildmask 0.0.0.0 virtual_server_sf_flags 0 virtual_server_nat64 0 virtual_server_rate_limit 0 virtual_serv
er_action_on_service_down 0 virtual_server_src_addr 0.0.0.0%2 virtual_server_source_address_translation_type 0 virtual_server_srcport 0 virtual_server_translate_ad
dr 0 virtual_server_translate_port 0 virtual_server_listed_enabled_vlans 1 } } [Status=Command OK]
Expected Behavior
You should be able to reference virtual addresses in Common that reside in route domains.
Actual Behavior
The Declaration fails.
Thank you for your feedback. I believe you can work around this issue by defining the virtual addresses in the declaration and referencing them with use-pointers instead of bigip-pointers:
{
"class": "AS3",
"action": "deploy",
"persist": false,
"id": "Shared",
"declaration": {
"class": "ADC",
"schemaVersion": "3.0.0",
"Common": {
"class": "Tenant",
"Shared": {
"class": "Application",
"template": "shared",
"enable": true,
"wildcard_v4_rtd0": {
"class": "Service_Address",
"virtualAddress": "0.0.0.0"
},
"wildcard_v4_rtd2": {
"class": "Service_Address",
"virtualAddress": "0.0.0.0%2"
},
"wildcard_v4_rtd0_vs": {
"class": "Service_L4",
"layer4": "any",
"virtualPort": 0,
"snat": "none",
"translateServerAddress": false,
"translateServerPort": false,
"virtualAddresses": [
[
{
"use": "/Common/Shared/wildcard_v4_rtd0"
},
"0.0.0.0/0"
]
],
"profileL4": {
"bigip": "/Common/fastL4"
},
"allowVlans": [
{
"bigip": "/Common/VLAN1"
}
],
"shareAddresses": true,
"redirect80": false,
"persistenceMethods": []
},
"wildcard_v4_rtd2_vs": {
"class": "Service_L4",
"layer4": "any",
"virtualPort": 0,
"snat": "none",
"translateServerAddress": false,
"translateServerPort": false,
"virtualAddresses": [
[
{
"use": "/Common/Shared/wildcard_v4_rtd2"
},
"0.0.0.0%2/0"
]
],
"profileL4": {
"bigip": "/Common/fastL4"
},
"allowVlans": [
{
"bigip": "/Common/VLAN2"
}
],
"shareAddresses": true,
"redirect80": false,
"persistenceMethods": []
}
}
}
}
}
I have added this to our internal product backlog as AUTOTOOL-3305.
This has been resolved in the 3.40.0 release of AS3.