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

Adding the same IP to runtime ACL file returns 500 instead of expected 409 #333

Open
ignoreswing opened this issue May 22, 2024 · 0 comments

Comments

@ignoreswing
Copy link

Steps to Reproduce

  1. [POST] /services/haproxy/runtime/acl_file_entries

    • Add a new IP (192.168.50.2) to the runtime ACL file.
    • Initially, it responds with HTTP status code 201:
      curl --location 'https://192.168.30.169:5566/v2/services/haproxy/runtime/acl_file_entries?acl_id=4' \
      --header 'Content-Type: application/json' \
      --header 'Authorization: Basic aGFwcm94eTpQQHNzdzByZA==' \
      --data '{
        "value": "192.168.50.2"
      }'
      
  2. Send the above API request again.

    • It returns a 500 error with the following message:
      {
          "code": 500,
          "message": "cannot add ACL files entry for 4: already exists"
      }
      

Expected Behavior

According to the documentation, in this case, where the specified resource already exists, it should respond with status code 409.

Actual Behavior

It returns a 500 error.

Your Environment

  • HAProxy version 2.8.9
  • HAProxy Data Plane API v2.9.3 build 59f34ea
  • Ubuntu 22.04.1 LTS
@ignoreswing ignoreswing changed the title Adding the same IP to runtime ACL File returns 500 instead of Expected 409 Adding the same IP to runtime ACL File returns 500 instead of expected 409 May 22, 2024
@ignoreswing ignoreswing changed the title Adding the same IP to runtime ACL File returns 500 instead of expected 409 Adding the same IP to runtime ACL file returns 500 instead of expected 409 May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant