f5devcentral / f5-automation-config-converter

Convert BIG-IP configs to AS3 and DO declarations
https://clouddocs.f5.com/products/extensions/f5-automation-config-converter/latest/
Apache License 2.0
35 stars 13 forks source link

Virtual addresses duplicated in a virtual server #35

Closed azahajkiewicz closed 3 years ago

azahajkiewicz commented 3 years ago

Environment

Summary

Declaration created by ACC is invalid: virtual server contains duplicated items.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Convert following config:

    This is a client UCS archive which cannot be disclosed. Please reach out to @A.Zahajkiewicz@f5.com
  2. Observe the following error message:

Invalid declaration created by Charon:

            "virt_test": {
                "layer4": "udp",
                "translateServerAddress": false,
                "translateServerPort": false,
                "class": "Service_Forwarding",
                "profileL4": {
                    "use": "/Common/Shared/fasL4_timeout"
                },
                "forwardingType": "ip",
                "virtualAddresses": [
                    [
                        "0.0.0.0/0",
                        "10.10.0.0/16"
                    ],
                    [
                        "0.0.0.0/0",
                        "10.10.0.0/16"
                    ]
                ],
                "virtualPort": 53,
                "allowVlans": [
                    {
                        "bigip": "/Common/test_vlan"
                    }
                ]
            },

Error:

{
    "code": 422,
    "errors": [
        "/tenant_1/application_1/virt_test/virtualAddresses: should NOT have duplicate items (items ## 0 and 1 are identical)"
    ],
    "declarationFullId": "",
    "message": "declaration is invalid"
}

Expected Behavior

There should be no virtual address duplication in the AS3 declaration.

            "virt_test": {
                "layer4": "udp",
                "translateServerAddress": false,
                "translateServerPort": false,
                "class": "Service_Forwarding",
                "profileL4": {
                    "use": "/Common/Shared/fasL4_timeout"
                },
                "forwardingType": "ip",
                "virtualAddresses": [
                    [
                        "0.0.0.0/0",
                        "10.10.0.0/16"
                    ],
                    [
                        "0.0.0.0/0",    # needs to be removed
                        "10.10.0.0/16"  # needs to be removed
                    ]
                ],
                "virtualPort": 53,
                "allowVlans": [
                    {
                        "bigip": "/Common/test_vlan"
                    }
                ]
            },
mdditt2000 commented 3 years ago

Create Jira CHARON-319 for this issue. @azahajkiewicz please could you upload the ltm config to the Jira

p-semenov-f5 commented 3 years ago

I need get config file for try to reproduce that problem.

You can untar ucs file and provide only part of .conf file with virtual server and virtual addresses.

mdditt2000 commented 3 years ago

@p-semenov-f5 check Jira CHARON-319 for the UCS

mdditt2000 commented 3 years ago

Merge branch 'dedup_virtual_add' into 'develop' thanks @p-semenov-f5. Closing issue