haproxytech / dataplaneapi

HAProxy Data Plane API
https://www.haproxy.com/documentation/dataplaneapi/
Apache License 2.0
329 stars 76 forks source link

parent_name coming through as null when trying to add a new log_targets #312

Closed k-kingsley closed 1 year ago

k-kingsley commented 1 year ago

When i try to add a new log_target to an existing log_forward I am getting the following error:

{
    "code": 400,
    "message": "11: log_forward  does not exist"
}

My payload looks like this

{
  "address": "log-server-1.mycompany:10514",
  "index": 0,
  "facility": "local0"
}

and my query looks like this /v2/services/haproxy/configuration/log_targets?parent_type=log_forward&parent_name=dev_10514_log&transaction_id=<transaction_id>

if i change parent_type to frontend (which i know doesnt exist) than I get back the following error where the parent_name I defined is shown:

{
    "code": 400,
    "message": "11: frontend dev_10514_log does not exist"
}

This bug prevents the user from being able to add log targets to a log forwarder.

mjuraga commented 1 year ago

Hi @k-kingsley, thanks for the bug report. We fixed this and new releases v2.6.5, v2.7.8 and v2.8.4 will be including these fixes.