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 14 forks source link

Telemetry/requestSettings/requestPool/use: contains path to non-existent object telemetry #65

Closed rjouhann closed 3 years ago

rjouhann commented 3 years ago

Environment

Summary

When I try to convert the following telemtry profile to AS3 using ACC and deploy that AS3 declaration to a BIG-IP, I am getting the following error message:

Results: [{'code': 422, 'errors': ['/demo_t1/application_1/telemetry/requestSettings/requestPool/use: contains path to non-existent object telemetry'], 'declarationFullId': '', 'message': 'declaration is invalid'}]

After manually removing request-log-error-pool none from the source big-ip.conf, things work fine.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Convert following config:

    ltm profile request-log /demo_t1/application_1/telemetry {
    app-service none
    defaults-from /Common/request-log
    description none
    log-request-logging-errors no
    log-response-by-default yes
    log-response-logging-errors disabled
    proxy-close-on-error no
    proxy-respond-on-logging-error no
    proxy-response none
    request-log-error-pool none
    request-log-error-protocol mds-udp
    request-log-error-template none
    request-log-pool /Common/telemetry
    request-log-protocol mds-tcp
    request-log-template event_source=\\\"request_logging\\\",hostname=\\\"$BIGIP_HOSTNAME\\\",client_ip=\\\"$CLIENT_IP\\\",server_ip=\\\"$SERVER_IP\\\",http_method=\\\"$HTTP_METHOD\\\",http_uri=\\\"$HTTP_URI\\\",virtual_name=\\\"$VIRTUAL_NAME\\\",event_timestamp=\\\"$DATE_HTTP\\\"
    request-logging disabled
    response-log-error-pool none
    response-log-error-protocol mds-udp
    response-log-error-template none
    response-log-pool none
    response-log-protocol mds-udp
    response-log-template none
    response-logging disabled
    }
  2. ACC convert this telemetry profile as:

    
    "telemetry": {
            "parentProfile": {
                "bigip": "/Common/request-log"
            },
            "class": "Traffic_Log_Profile",
            "requestSettings": {
                "requestErrorLoggingEnabled": false,
                "proxyCloseOnErrorEnabled": false,
                "proxyRespondOnLoggingErrorEnabled": false,
                "requestEnabled": false,
                "requestErrorProtocol": "mds-udp",
                "requestPool": {
                    "use": "/Common/Shared/telemetry"
                },
                "requestProtocol": "mds-tcp",
                "requestTemplate": "event_source=\\\\\\\"request_logging\\\\\\\",hostname=\\\\\\\"$BIGIP_HOSTNAME\\\\\\\",client_ip=\\\\\\\"$CLIENT_IP\\\\\\\",server_ip=\\\\\\\"$SERVER_IP\\\\\\\",http_method=\\\\\\\"$HTTP_METHOD\\\\\\\",http_uri=\\\\\\\"$HTTP_URI\\\\\\\",virtual_name=\\\\\\\"$VIRTUAL_NAME\\\\\\\",event_timestamp=\\\\\\\"$DATE_HTTP\\\\\\\""
            },
            "responseSettings": {
                "byDefaultEnabled": true,
                "responseEnabled": false,
                "responseErrorLoggingEnabled": false,
                "responseErrorProtocol": "mds-udp",
                "responseProtocol": "mds-udp"
            }
        },

3. Observe the following error message when deploying the declaration to BIG-IP
```out
Results: [{'code': 422, 'errors': ['/demo_t1/application_1/telemetry/requestSettings/requestPool/use: contains path to non-existent object telemetry'], 'declarationFullId': '', 'message': 'declaration is invalid'}]

Expected Behavior

ACC should not produce a AS3 declaration with "use": "/Common/Shared/telemetry".

Actual Behavior

ACC produces an AS3 declaration that cannot be deployed on the BIG-IP.

mdditt2000 commented 3 years ago

@rjouhann The ACC team has determined that the outputting to /Common/Shared was the intended behavior. Its up the migration tool or person whom is doing the migration to make the modification prior to declaring the JSON back to BIG-IP or they will get a 422

p-semenov-f5 commented 3 years ago

I think you should put here config for pool /Common/telemetry to get right AS3. It is not default object and path will be converted to /Common/Shared for such cases

rjouhann commented 3 years ago

Thanks @mdditt2000 @p-semenov-f5 my bad, for some reason, I thought the /Common/telemetry was a default profile. I will go ahead and close this bug.

mdditt2000 commented 3 years ago

@rjouhann we just release v1.16 RC2 which has a fix for CHARON-467: (GitHub Issue 55): Improve handling when Common is empty. I will forward you the image.