f5-appsvcs-extension
f5-appsvcs-extension copied to clipboard
Tenant fails to be created when shareAddresses is used even with AS3 Version 3.50.2
Environment
- Application Services Version: 3.50.2
- BIG-IP Version: 16.1
Summary
use case is to have one app per tenant. It must be possible to use the same IP in different tenants but with other services / Ports. Also we would like to have one AS3 Declaration per tenant/ app.
So since AS3 Version 3.20.0 it should be possible via the "shareAddresses" option as described here: https://clouddocs.f5.com/products/extensions/f5-appsvcs-extension/latest/declarations/miscellaneous.html#sharing-ip-addresses-between-virtual-servers Should be also working based on https://github.com/F5Networks/f5-appsvcs-extension/issues/279
Steps To Reproduce
Steps to reproduce the behavior:
- Submit the following two declaration one after another. The first run is successfull, the second one complaines as mentioned below
{
"class": "AS3",
"action": "deploy",
"persist": true,
"declaration": {
"class": "ADC",
"schemaVersion": "3.50.2",
"label": "team1-app1-svc1",
"id": "Test-HTTP-Service-1",
"remark": "Test Jinja2 Template to create Service 'Test-HTTP-Service-1'",
"team1-app1-svc1": {
"class": "Tenant",
"team1-app1-svc1.corp.domain.com_path": {
"class": "Application",
"template": "generic",
"team1-app1-svc1.corp.domain.com_tcp_vs": {
"class": "Service_TCP",
"virtualAddresses": [
"172.18.2.99%0"
],
"virtualPort" : 80,
"shareAddresses": true,
"pool": "team1-app1-svc1.corp.domain.com_pool",
"maxConnections": 0
},
"team1-app1-svc1.corp.domain.com_pool": {
"class": "Pool",
"monitors": [
"tcp"
],
"members": [{
"servicePort": 81,
"addressDiscovery": "fqdn",
"autoPopulate": true,
"hostname": "linux-infra-1.corp.domain.com",
"queryInterval": 0,
"shareNodes": true,
"fqdnPrefix": "node-"
}]
}
}
}
},
"updateMode": "selective"
}
{
"class": "AS3",
"action": "deploy",
"persist": true,
"declaration": {
"class": "ADC",
"schemaVersion": "3.50.2",
"label": "team1-app1-svc2",
"id": "Test-HTTP-Service-1",
"remark": "Test Jinja2 Template to create Service 'Test-HTTP-Service-1'",
"team1-app1-svc2": {
"class": "Tenant",
"team1-app1-svc2.corp.domain.com_path": {
"class": "Application",
"template": "generic",
"team1-app1-svc2.corp.domain.com_tcp_vs": {
"class": "Service_TCP",
"virtualAddresses": [
"172.18.2.99%0"
],
"virtualPort" : 81,
"shareAddresses": true,
"pool": "team1-app1-svc2.corp.domain.com_pool",
"maxConnections": 0
},
"team1-app1-svc2.corp.domain.com_pool": {
"class": "Pool",
"monitors": [
"tcp"
],
"members": [{
"servicePort": 81,
"addressDiscovery": "fqdn",
"autoPopulate": true,
"hostname": "linux-infra-1.corp.domain.com",
"queryInterval": 0,
"shareNodes": true,
"fqdnPrefix": "node-"
}]
}
}
}
},
"updateMode": "selective"
}
- Observe the following error response:
{
"results": [
{
"code": 422,
"message": "declaration failed",
"response": "01020066:3: The requested Virtual Address (/Common/172.18.2.99) already exists in partition Common.",
"host": "localhost",
"tenant": "team1-app1-svc2",
"runTime": 900,
"declarationId": "Test-HTTP-Service-1"
}
],
"declaration": {
"class": "ADC",
"schemaVersion": "3.50.2",
"label": "team1-app1-svc2",
"id": "Test-HTTP-Service-2",
"remark": "Test Jinja2 Template to create Service 'Test-HTTP-Service-2'",
"updateMode": "selective",
"controls": {
"archiveTimestamp": "2024-05-23T13:27:51.365Z"
}
},
"code": 422
}
Expected Behavior
Expected behavior would be, that the AS3 declaration get imported successful with option "sharedAddresses: true"
Actual Behavior
only one declaration with an Virtual Server IP is possible. When a second declaration use the same virtual IP with another port, the error is: 01020066:3: The requested Virtual Address (/Common/172.18.2.99) already exists in partition Common.