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

Task response ambiguous when submitting multiple applications

Open simonkowallik opened this issue 2 years ago • 8 comments

Environment

  • FAST RPM Version: 1.24.0
  • BIG-IP Version: 16.1.3.3

Summary

A clear and concise description of what the bug is. Include information about the reproducibility and the severity/impact of the issue.

Steps To Reproduce

List the steps to reproduce the behavior:

  1. Create two applications

POST https://{{host}}/mgmt/shared/fast/applications

[
    {
        "name": "examples/simple_http",
        "parameters": {
            "tenant_name": "tenant1",
            "application_name": "appA",
            "virtual_port": 80,
            "virtual_address": "192.168.0.1",
            "server_port": 80,
            "server_addresses": [
                "192.168.1.1"
            ]
        }
    },
    {
        "name": "examples/simple_http",
        "parameters": {
            "tenant_name": "tenant1",
            "application_name": "appB",
            "virtual_port": 80,
            "virtual_address": "192.168.0.2",
            "server_port": 80,
            "server_addresses": [
                "192.168.1.2"
            ]
        }
    }
]
  1. Try creating 3 additional applications (two will have a conflict with the existing two applications created in Step 1)
[
    {
        "name": "examples/simple_http",
        "parameters": {
            "tenant_name": "tenant1",
            "application_name": "appC",
            "virtual_port": 80,
            "virtual_address": "192.168.0.1",
            "server_port": 80,
            "server_addresses": [
                "192.168.1.1"
            ]
        }
    },
    {
        "name": "examples/simple_http",
        "parameters": {
            "tenant_name": "tenant1",
            "application_name": "appD",
            "virtual_port": 80,
            "virtual_address": "192.168.0.99",
            "server_port": 80,
            "server_addresses": [
                "192.168.1.2"
            ]
        }
    },
    {
        "name": "examples/simple_http",
        "parameters": {
            "tenant_name": "tenant1",
            "application_name": "appE",
            "virtual_port": 80,
            "virtual_address": "192.168.0.2",
            "server_port": 80,
            "server_addresses": [
                "192.168.1.2"
            ]
        }
    }
]

Response:

{
    "code": 202,
    "requestId": 73,
    "message": [
        {
            "id": "7650566e-a079-498d-9403-95105d2a8da2",
            "name": "examples/simple_http",
            "parameters": {
                "tenant_name": "tenant1",
                "application_name": "appC",
                "virtual_port": 80,
                "virtual_address": "192.168.0.1",
                "server_port": 80,
                "server_addresses": [
                    "192.168.1.1"
                ]
            }
        },
        {
            "id": "7650566e-a079-498d-9403-95105d2a8da2",
            "name": "examples/simple_http",
            "parameters": {
                "tenant_name": "tenant1",
                "application_name": "appD",
                "virtual_port": 80,
                "virtual_address": "192.168.0.99",
                "server_port": 80,
                "server_addresses": [
                    "192.168.1.2"
                ]
            }
        },
        {
            "id": "7650566e-a079-498d-9403-95105d2a8da2",
            "name": "examples/simple_http",
            "parameters": {
                "tenant_name": "tenant1",
                "application_name": "appE",
                "virtual_port": 80,
                "virtual_address": "192.168.0.2",
                "server_port": 80,
                "server_addresses": [
                    "192.168.1.2"
                ]
            }
        }
    ],
    "_links": {
        "self": "/mgmt/shared/fast/applications",
        "task": "/mgmt/shared/fast/tasks/7650566e-a079-498d-9403-95105d2a8da2"
    }
}
  1. Fetch Task status
{
    "id": "7650566e-a079-498d-9403-95105d2a8da2",
    "code": 422,
    "message": "declaration failed\n01070333:3: Virtual Server /tenant1/appC/serviceMain illegally shares destination address, source address, service port, ip-protocol, and vlan with Virtual Server /tenant1/appA/serviceMain.",
    "name": "",
    "parameters": {},
    "tenant": "tenant1",
    "application": "appE",
    "operation": "create",
    "timestamp": "2023-03-23T15:24:18.455Z",
    "host": "localhost",
    "_links": {
        "self": "/mgmt/shared/fast/tasks/7650566e-a079-498d-9403-95105d2a8da2"
    }
}

While the general result is clear, it is unclear what happend to appD and appE.

Expected Behavior

Clear information about the status of all submitted applications.

Actual Behavior

simonkowallik avatar Mar 23 '23 20:03 simonkowallik

Both appC and appE have the same virtual addresses and same virtual ports as both appA and AppB do respectively. Changing either the ip or port to something unique will deploy successfully.

shyawnkarim avatar Apr 10 '23 21:04 shyawnkarim

@shyawnkarim this error was intentional to demonstrate the actual problem. The API response provides a single task id, when fetching the status of this task id a single status is returned while multiple applications where submitted. In case of the above error it isn't clear whether the other two declarations where successful.

simonkowallik avatar Apr 12 '23 16:04 simonkowallik

Thanks for the additional clarity. I understand your issue now and it is being tracked internally with ID, EC-193.

shyawnkarim avatar Apr 26 '23 20:04 shyawnkarim

Aren't all applications are submitted within a single declaration? If so, I believe that nothing gets deployed because of the error. Isn't that what is happening here?

joelkeener avatar Apr 29 '23 01:04 joelkeener

The batch option is going to stitch all of your applications together into one declaration, completing the bulk update/create more quickly.

If one fails, they all fail.

joelkeener avatar May 02 '23 20:05 joelkeener

@joelkeener Thanks for the clarification. This is not clear from the documentation nor from the API response. If the behaviour is expected then an update to the documentation would be a great solution. This helps an implementor, which might not be familiar with the internal details of AS3 and FAST, to understand and work with the response.

simonkowallik avatar May 03 '23 07:05 simonkowallik

Good point; thank you for providing your valuable feedback, helping us improve our product.

joelkeener avatar May 04 '23 16:05 joelkeener

Our documentation will be updated to explain this; it is being tracked internally with ID EC-202

joelkeener avatar May 04 '23 16:05 joelkeener