F5Networks / f5-appsvcs-extension

F5 BIG-IP Application Services 3 Extension
Apache License 2.0
164 stars 53 forks source link

Fast template when rendered gives error should NOT have additional properties #783

Open scshitole opened 10 months ago

scshitole commented 10 months ago

Environment

Summary

When I render the FAST template it gives error should not have an additional properties this happens with 3.48.0 f5-appsvcs, this template works fine with f5-appsvcs 3.47.0 rpm, looks like something got broken in 3.48 release

Steps To Reproduce

Steps to reproduce the behavior:

  1. Zip the yaml upload the Zip file template and then render the template

    title: 15. Epic WelcomeWeb_VS_HTTPS
    description: Welcome Epic WelcomeWeb_VS_HTTPS Virtual Server
    parameters:
    env: NonPROD
    tenant_name: EPIC_WelcomeWeb_VS
    virtualAddressWelcomeWeb: 22.0.0.201
    server_addresses:
    - 22.1.1.20
    - 22.1.1.21
    service_port: 443
    certificate: default.crt
    privatekey: default.key
    application: Webapp
    definitions: 
    env: 
    title: Provide Prod/nonProd/training
    type: string
    tenant_name:
    title: Tenant Name
    type: string
    description: partition on bigip
    virtualAddressWelcomeWeb:
    title: Virtual Address for WelcomeWeb_VS_HTTPS
    description: IP addresses of virtual addresses WelcomeWeb_VS_HTTPS
    server_addresses:
    title: Server Addresses
    service_port:
    title: Server application port
    certificate:
    title: Enter certificate file name which you have uploaded
    privatekey:
    title: Enter the private key file name here
    application:
    title: Provide the application  name for  monitor WelcomeWeb_HTTPS send string 
    template: | 
    {
    "class": "ADC",
    "schemaVersion": "3.21.0",
    "id": "urn:uuid:6fddcf2d-cf22-48f8-99c0-e8b2ce348f1b",
    "label": "Declaration for InterConnect App",
    "remark": "This is for InterConnect Apps",
    "{{tenant_name}}_{{env}}": {
        "class": "Tenant",
        "Shared": {
            "class": "Application",
            "template": "shared",
            "WelcomeWeb_Pool_HTTPS{{env}}": {
                "loadBalancingMode": "least-connections-member",
                "minimumMonitors": "all",
                "members": [
                    {
                        "addressDiscovery": "static",
                        "servicePort": {{service_port}},
                        "serverAddresses": {{server_addresses::array}},
                        "shareNodes": true
                    }
                ],
                "monitors": [
                    {
                        "use": "WelcomeWeb_Health_HTTPS"
                    },
                    {
                        "use": "Epic_HealthRDS_HTTPS"
                    }
                ],
                "class": "Pool"
            },
    
            "Epic_SameSiteNone_Persistence": {
                "class": "iRule",
                "iRule": {
                    "base64": "d2hlbiBIVFRQX1JFU1BPTlNFX1JFTEVBU0UgewpzZXQgREVCVUcgMQojIEV4aXQgaWYgdmlydHVhbCBzZXJ2ZXIgZG9lcyBub3QgaGF2ZSBhIGNvb2tpZSBwZXJzaXN0IHByb2ZpbGUgYXR0YWNoZWQKaWYgeyBub3QgW1BST0ZJTEU6OmV4aXN0cyBwZXJzaXN0IGNvb2tpZV0gfXsKaWYgeyAkREVCVUcgfXsgbG9nIGxvY2FsMC4gIk5vIGNvb2tpZSBwZXJzaXN0IHByb2ZpbGUuIEV4aXRpbmcuIiB9CnJldHVybgp9CiMgR2V0IG5hbWUgb2YgY29va2llIGZyb20gcGVyc2lzdCBwcm9maWxlCnNldCBwZXJzaXN0X2Nvb2tpZSBbUFJPRklMRTo6cGVyc2lzdCBtb2RlIGNvb2tpZSBjb29raWVfbmFtZV0KfQ=="
                }
            },
            "WelcomeWeb_VS_HTTPS{{env}}": {
                "layer4": "tcp",
                "pool": "WelcomeWeb_Pool_HTTPS{{env}}",
                "translateServerAddress": true,
                "translateServerPort": true,
                "class": "Service_HTTPS",
                "virtualAddresses": [
                     "{{virtualAddressWelcomeWeb}}"
                ],
                "profileMultiplex": {
                    "use": "Epic_OneConnect"
                },
                "profileTCP": {
                    "use": "Epic_TCP"
                },
                "profileHTTP": {
                    "use": "Epic_WebSocket"
                },
                "virtualPort": 443,
                "clientTLS": "WelcomeWeb_clientSSL",
                "serverTLS": "Epic_serverSSL",
                "snat": "auto"
            },
    
           "WelcomeWeb_Health_HTTPS": {
            "adaptive": false,
            "dscp": 0,
            "receive": "Status\":0",
            "send": "GET /{{application}}/serverhealth/getoverallstatus HTTP/1.0\r\n\r\n",
            "class": "Monitor",
            "monitorType": "https",
            "transparent": false,
            "reverse": false,
            "timeout": 91,
            "interval": 30
            },
    
            "Epic_HealthRDS_HTTPS": {
                "adaptive": false,
                "interval": 5,
                "dscp": 0,
                "receive": "Status\":0",
                "receiveDown": "Status\":1",
                "send": "GET /maintenance/status.json HTTP/1.0\\r\\n\\r\\n",
                "timeUntilUp": 0,
                "timeout": 16,
                "class": "Monitor",
                "monitorType": "https",
                "destination": "*.443",
                "upInterval": 0,
                "transparent": false,
                "reverse": false
            },
    
            "Epic_Cookie": {
                "class": "Persist",
                "persistenceMethod": "cookie"
            },
            "Epic_SourceAddress": {
                "class": "Persist",
                "persistenceMethod": "source-address"
            },
            "certificate_default": {
                "class": "Certificate",
                "certificate": {
                    "bigip": "/Common/{{certificate}}"
                },
                "privateKey": {
                    "bigip": "/Common/{{privatekey}}"
                }
            },
            "WelcomeWeb_clientSSL": {
                "clientCertificate": "certificate_default",
                "class": "TLS_Client"
            },
            "Epic_FastL4": {
                "class": "L4_Profile"
            },
            "Epic_FTP": {
                "class": "FTP_Profile"
            },
            "Epic_OneConnect": {
                "sourceMask": "255.255.255.255",
                "class": "Multiplex_Profile"
            },
            "Epic_TCP": {
                "class": "TCP_Profile"
            },
            "Epic_serverSSL": {
                "class": "TLS_Server",
                "certificates": [
                    {
                        "certificate": "certificate_default"
                    }
                ],
                "cacheTimeout": 1234
            },
            "Epic_WebSocket": {
                "class": "HTTP_Profile",
                "rewriteRedirects": "matching",
                "webSocketsEnabled": true
            }
        }
    }
    }
  2. Observe the following error response: image

Expected Behavior

A clear and concise description of what you expected to happen. image

Actual Behavior

A clear and concise description of what actually happens. Please include any applicable error output.

dstokesf5 commented 8 months ago

Thank you for your feedback. Can you please provide an example of the rendered AS3 declaration and the complete error output?

RobCupples commented 8 months ago

Were you using an internal build of AS3 3.48 that had not been released yet? I remember there was a temporary issue where monitors in a declaration would report this error.

scshitole commented 8 months ago

no I was using the regular released build

On Tue, Jan 9, 2024 at 2:53 AM Rob Cupples @.***> wrote:

Were you using an internal build of AS3 3.48 that had not been released yet? I remember there was a temporary issue where monitors in a declaration would report this error.

— Reply to this email directly, view it on GitHub https://github.com/F5Networks/f5-appsvcs-extension/issues/783#issuecomment-1881842848, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJXLSD76KERHDW4327NCXLYNRPUVAVCNFSM6AAAAABAB34LMOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBRHA2DEOBUHA . You are receiving this because you authored the thread.Message ID: @.***>

sunitharonan commented 7 months ago

Please try AS3 3.48, if it still doesn't fix, please reach out to us at automation_toolchain_pm@f5.com

scshitole commented 7 months ago

I tried AS 3.48 and template 1.25 it gives error image

scshitole commented 7 months ago

here is the output from debug view after submitting the template

title: 15. Epic WelcomeWeb_VS_HTTPS
description: Welcome Epic WelcomeWeb_VS_HTTPS Virtual Server
parameters:
  env: NonPROD
  tenant_name: EPIC_WelcomeWeb_VS
  virtualAddressWelcomeWeb: 22.0.0.201
  server_addresses:
    - 22.1.1.20
    - 22.1.1.21
  service_port: 443
  certificate: default.crt
  privatekey: default.key
  application: Webapp
definitions: 
  env: 
    title: Provide Prod/nonProd/training
    type: string
  tenant_name:
    title: Tenant Name
    type: string
    description: partition on bigip
  virtualAddressWelcomeWeb:
    title: Virtual Address for WelcomeWeb_VS_HTTPS
    description: IP addresses of virtual addresses WelcomeWeb_VS_HTTPS
  server_addresses:
    title: Server Addresses
  service_port:
    title: Server application port
  certificate:
    title: Enter certificate file name which you have uploaded
  privatekey:
    title: Enter the private key file name here
  application:
    title: Provide the application  name for  monitor WelcomeWeb_HTTPS send string 
template: | 
  {
    "class": "ADC",
    "schemaVersion": "3.21.0",
    "id": "urn:uuid:6fddcf2d-cf22-48f8-99c0-e8b2ce348f1b",
    "label": "Declaration for InterConnect App",
    "remark": "This is for InterConnect Apps",
    "{{tenant_name}}_{{env}}": {
        "class": "Tenant",
        "Shared": {
            "class": "Application",
            "template": "shared",
            "WelcomeWeb_Pool_HTTPS{{env}}": {
                "loadBalancingMode": "least-connections-member",
                "minimumMonitors": "all",
                "members": [
                    {
                        "addressDiscovery": "static",
                        "servicePort": {{service_port}},
                        "serverAddresses": {{server_addresses::array}},
                        "shareNodes": true
                    }
                ],
                "monitors": [
                    {
                        "use": "WelcomeWeb_Health_HTTPS"
                    },
                    {
                        "use": "Epic_HealthRDS_HTTPS"
                    }
                ],
                "class": "Pool"
            },

            "Epic_SameSiteNone_Persistence": {
                "class": "iRule",
                "iRule": {
                    "base64": "d2hlbiBIVFRQX1JFU1BPTlNFX1JFTEVBU0UgewpzZXQgREVCVUcgMQojIEV4aXQgaWYgdmlydHVhbCBzZXJ2ZXIgZG9lcyBub3QgaGF2ZSBhIGNvb2tpZSBwZXJzaXN0IHByb2ZpbGUgYXR0YWNoZWQKaWYgeyBub3QgW1BST0ZJTEU6OmV4aXN0cyBwZXJzaXN0IGNvb2tpZV0gfXsKaWYgeyAkREVCVUcgfXsgbG9nIGxvY2FsMC4gIk5vIGNvb2tpZSBwZXJzaXN0IHByb2ZpbGUuIEV4aXRpbmcuIiB9CnJldHVybgp9CiMgR2V0IG5hbWUgb2YgY29va2llIGZyb20gcGVyc2lzdCBwcm9maWxlCnNldCBwZXJzaXN0X2Nvb2tpZSBbUFJPRklMRTo6cGVyc2lzdCBtb2RlIGNvb2tpZSBjb29raWVfbmFtZV0KfQ=="
                }
            },
            "WelcomeWeb_VS_HTTPS{{env}}": {
                "layer4": "tcp",
                "pool": "WelcomeWeb_Pool_HTTPS{{env}}",
                "translateServerAddress": true,
                "translateServerPort": true,
                "class": "Service_HTTPS",
                "redirect80": false,
                "virtualAddresses": [
                     "{{virtualAddressWelcomeWeb}}"
                ],
                "profileMultiplex": {
                    "use": "Epic_OneConnect"
                },
                "profileTCP": {
                    "use": "Epic_TCP"
                },
                "profileHTTP": {
                    "use": "Epic_WebSocket"
                },
                "virtualPort": 443,
                "clientTLS": "WelcomeWeb_clientSSL",
                "serverTLS": "Epic_serverSSL",
                "snat": "auto"
            },

           "WelcomeWeb_Health_HTTPS": {
            "adaptive": false,
            "dscp": 0,
            "receive": "Status\":0",
            "send": "GET /{{application}}/serverhealth/getoverallstatus HTTP/1.0\r\n\r\n",
            "class": "Monitor",
            "monitorType": "https",
            "transparent": false,
            "reverse": false,
            "timeout": 91,
            "interval": 30
            },

            "Epic_HealthRDS_HTTPS": {
                "adaptive": false,
                "interval": 5,
                "dscp": 0,
                "receive": "Status\":0",
                "receiveDown": "Status\":1",
                "send": "GET /maintenance/status.json HTTP/1.0\\r\\n\\r\\n",
                "timeUntilUp": 0,
                "timeout": 16,
                "class": "Monitor",
                "monitorType": "https",
                "destination": "*.443",
                "upInterval": 0,
                "transparent": false,
                "reverse": false
            },

            "Epic_Cookie": {
                "class": "Persist",
                "persistenceMethod": "cookie"
            },
            "Epic_SourceAddress": {
                "class": "Persist",
                "persistenceMethod": "source-address"
            },
            "certificate_default": {
                "class": "Certificate",
                "certificate": {
                    "bigip": "/Common/{{certificate}}"
                },
                "privateKey": {
                    "bigip": "/Common/{{privatekey}}"
                }
            },
            "WelcomeWeb_clientSSL": {
                "clientCertificate": "certificate_default",
                "class": "TLS_Client"
            },
            "Epic_FastL4": {
                "class": "L4_Profile"
            },
            "Epic_FTP": {
                "class": "FTP_Profile"
            },
            "Epic_OneConnect": {
                "sourceMask": "255.255.255.255",
                "class": "Multiplex_Profile"
            },
            "Epic_TCP": {
                "class": "TCP_Profile"
            },
            "Epic_serverSSL": {
                "class": "TLS_Server",
                "certificates": [
                    {
                        "certificate": "certificate_default"
                    }
                ],
                "cacheTimeout": 1234
            },
            "Epic_WebSocket": {
                "class": "HTTP_Profile",
                "rewriteRedirects": "matching",
                "webSocketsEnabled": true
            }
        }
    }
  }