GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Support re-reading the HAproxy configuration file when handling `/services/haproxy/configuration/` endpoints. · Issue #394 · haproxytech/dataplaneapi

Support re-reading the HAproxy configuration file when handling /services/haproxy/configuration/ endpoints. #394

New issue
Copy link
New issue
Copy link
Open
Open
Support re-reading the HAproxy configuration file when handling /services/haproxy/configuration/ endpoints.#394
Copy link

Description

@jmdelafe
jmdelafe
opened on Oct 29, 2025
Issue body actions

Endpoints like /services/haproxy/configuration/frontends/{parent_name}/binds return cached information that's obtained at initialization and never updated (unless disable_inotify is set to false). This means the information could be out-of-date unless Data Plane API is reloaded every time HAproxy configuration file is changed.

Is it possible to add a parameter to enforce re-reading the file when making calls to the affected endpoints?

Worth noticing that /services/haproxy/configuration/raw endpoint is not affected as it always reads the latest on-disk version of the configuration file when handling it.

This can be easily tested by:
0- disable_inotify must be set to true.
1- Perform a GET /services/haproxy/configuration/frontends/{parent_name}/binds. Store the result.
2- Perform a GET /services/haproxy/configuration/raw. Store the result.
3- Manually modify (add/remove) binds in the haproxy.cfg file for {parent_name} frontend.
4- Repeat step (1) and (2). Notice how the result for (1) was the same as before (not reflecting the latest change). (2) do actually show the most recent configuration.

Activity

  1. mjuraga commented on Oct 29, 2025

    @mjuraga
    mjuraga
    on Oct 29, 2025
    Collaborator
    More actions

    That is exactly the reason inotify mechanism is enabled. So it rereads the files on any change.

  2. jmdelafe commented on Oct 29, 2025

    @jmdelafe
    jmdelafe
    on Oct 29, 2025
    Author
    More actions

    @mjuraga, I understand. But it also enable config checks and re-writes following pre-defined rules in the parser. For e.g: to reduce white-spaces or incorrectly remove valid sections. I'm running a pretty long and complex HAproxy configuration and I rather have it not touch it until I have a version that is properly aligned with those rules (and the above bug is fixed). That's the reason why I had to disable the option.

    Maybe I'm framing this in the wrong direction and, instead of re-reading during handling, a new flag can be added that enables read-only operations (no re-writes).

  3. jmdelafe commented on Oct 29, 2025

    @jmdelafe
    jmdelafe
    on Oct 29, 2025
    Author
    More actions

    For context, I'll workaround the issue by reloading the Data Plane API every time I modify the HAproxy configuration. The re-write is not happening when reading the file at initialization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.