Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last application cannot be deleted with per-application correctly #858

Open
Tobse95 opened this issue Jul 21, 2024 · 1 comment
Open

Last application cannot be deleted with per-application correctly #858

Tobse95 opened this issue Jul 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Tobse95
Copy link

Tobse95 commented Jul 21, 2024

Environment

  • Application Services Version: 3.51.0 Build 5
  • BIG-IP Version: 17.1.1 Build 0.0.6 Final

Summary

Deleting the last application of a tenant not work when there is a vlan or something else in the tenant.

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

Steps To Reproduce

Steps to reproduce the behavior:

  1. Create a partition with the name "bug-last-application"
  2. Create a vlan in this partition (f.e. vlan_555)
  3. Submit the following declaration to: POST https:/xxx/mgmt/shared/appsvcs/declare/bug-last-application/applications
{
    "app_192.168.189.64_26":{
       "class":"Application",
       "label":"192.168.189.64/26",
       "remark":"as3 application for 192.168.189.64/26",
       "sf-int_192.168.189.64_26":{
          "class":"Service_Forwarding",
          "forwardingType":"ip",
          "label":"192.168.189.64/26",
          "policyFirewallEnforced":{
             "use":"x_firewall-policy_192.168.189.64_26"
          },
          "remark":"service-forwarding int for 192.168.189.64/26",
          "snat":"none",
          "translateServerAddress":false,
          "translateServerPort":false,
          "virtualAddresses":[
             "192.168.189.64/26"
          ],
          "virtualPort":0
       },
       "x_firewall-policy_192.168.189.64_26":{
          "class":"Firewall_Policy",
          "label":"192.168.189.64/26",
          "remark":"firewall policy for 192.168.189.64/26",
          "rules":[
             {
                "use":"x_firewall-rule-list_192.168.189.64_26_product-related"
             },
             {
                "use":"x_firewall-rule-list_192.168.189.64_26_architecture-related"
             },
             {
                "use":"x_firewall-rule-list_192.168.189.64_26_customer-related"
             }
          ]
       },
       "x_firewall-rule-list_192.168.189.64_26_architecture-related":{
          "class":"Firewall_Rule_List",
          "label":"192.168.189.64/26",
          "remark":"architecture related firewall-rule-list for 192.168.189.64/26",
          "rules":[
             
          ]
       },
       "x_firewall-rule-list_192.168.189.64_26_customer-related":{
          "class":"Firewall_Rule_List",
          "label":"192.168.189.64/26",
          "remark":"customer related firewall-rule-list for 192.168.189.64/26",
          "rules":[
             
          ]
       },
       "x_firewall-rule-list_192.168.189.64_26_product-related":{
          "class":"Firewall_Rule_List",
          "label":"192.168.189.64/26",
          "remark":"product related firewall-rule-list for 192.168.189.64/26",
          "rules":[
             
          ]
       }
    },
    "controls":{
       "class":"Controls",
       "logLevel":"debug",
       "trace":true
    },
    "id":"per-app-declaration",
    "schemaVersion":"3.51.0"
 }
  1. Delete the application with DELETE https://xxx/mgmt/shared/appsvcs/declare/bug-last-application/applications/app_192.168.189.64_26
{
    "results": [
        {
            "code": 422,
            "message": "declaration failed",
            "response": "0107082a:3: All objects must be removed from a partition (bug-last-application) before the partition may be removed, type ID (467)",
            "host": "localhost",
            "tenant": "bug-last-application",
            "runTime": 5799,
            "declarationId": "1721553302466"
        }
    ],
    "declaration": {
        "bug-last-application": {
            "class": "Tenant",
            "app_192.168.189.64_26": {
                "class": "Application",
                "label": "192.168.189.64/26",
                "remark": "as3 application for 192.168.189.64/26",
                "sf-int_192.168.189.64_26": {
                    "class": "Service_Forwarding",
                    "forwardingType": "ip",
                    "label": "192.168.189.64/26",
                    "policyFirewallEnforced": {
                        "use": "x_firewall-policy_192.168.189.64_26"
                    },
                    "remark": "service-forwarding int for 192.168.189.64/26",
                    "snat": "none",
                    "translateServerAddress": false,
                    "translateServerPort": false,
                    "virtualAddresses": [
                        "192.168.189.64/26"
                    ],
                    "virtualPort": 0
                },
                "x_firewall-policy_192.168.189.64_26": {
                    "class": "Firewall_Policy",
                    "label": "192.168.189.64/26",
                    "remark": "firewall policy for 192.168.189.64/26",
                    "rules": [
                        {
                            "use": "x_firewall-rule-list_192.168.189.64_26_product-related"
                        },
                        {
                            "use": "x_firewall-rule-list_192.168.189.64_26_architecture-related"
                        },
                        {
                            "use": "x_firewall-rule-list_192.168.189.64_26_customer-related"
                        }
                    ]
                },
                "x_firewall-rule-list_192.168.189.64_26_architecture-related": {
                    "class": "Firewall_Rule_List",
                    "label": "192.168.189.64/26",
                    "remark": "architecture related firewall-rule-list for 192.168.189.64/26",
                    "rules": []
                },
                "x_firewall-rule-list_192.168.189.64_26_customer-related": {
                    "class": "Firewall_Rule_List",
                    "label": "192.168.189.64/26",
                    "remark": "customer related firewall-rule-list for 192.168.189.64/26",
                    "rules": []
                },
                "x_firewall-rule-list_192.168.189.64_26_product-related": {
                    "class": "Firewall_Rule_List",
                    "label": "192.168.189.64/26",
                    "remark": "product related firewall-rule-list for 192.168.189.64/26",
                    "rules": []
                }
            },
            "controls": {
                "class": "Controls",
                "logLevel": "debug",
                "trace": true
            }
        },
        "class": "ADC",
        "schemaVersion": "3.51.0",
        "id": "1721553302466",
        "updateMode": "selective",
        "controls": {
            "archiveTimestamp": "2024-07-21T09:15:09.318Z"
        }
    },
    "code": 422
}
  1. The application is deleted in the config/gui but not in as3.

  2. Retrieve the application with https://xxx/mgmt/shared/appsvcs/declare/bug-last-application/applications/app_192.168.189.64_26

  3. You will see that the configuration is still there in as3

Actual Behavior

If you deploy the same virtual address after the delete in another tenant (f.e. other-tenant) and then configure it again in the tenant "bug-last-application", there is an error due to " sharing same virtual address"

The application endpoint fails with 422 and the response All objects must be removed from a partition (bug-last-application) before the partition may be removed, type ID (467)
{
"code": 422,
"message": "declaration failed",
"response": "0107082a:3: All objects must be removed from a partition (bug-last-application) before the partition may be removed, type ID (467)",
"host": "localhost",
"tenant": "bug-last-application",
"runTime": 5799,
"declarationId": "1721553302466"
}

In addition, the Terraform resource "bigip_as3_deploy" does not throw an error even though the application was not deleted correctly.

Expected Behavior

The application should be deleted correctly (ALSO in AS3) even if there are other objects (vlan, etc) in this partition. The tenant should remain unaffected by this.

@Tobse95 Tobse95 added bug Something isn't working untriaged Issue needs to be reviewed for validity labels Jul 21, 2024
@mdditt2000 mdditt2000 removed the untriaged Issue needs to be reviewed for validity label Sep 27, 2024
@mdditt2000
Copy link

Jira Task AUTOTOOL-4590

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants