Hi list, This series adds support for renaming a running HAProxy server via the runtime API and a new option server-rename per-backend opt-in directive. This addresses the long-standing request in GitHub issue #952 [1] for a runtime server rename command.
Use case: when servers are named after their IP:port or target reference (e.g., by an ingress controller), a live endpoint replacement means the server's name becomes stale. Instead of a full reload, the controller can now issue: set server <backend>/<oldname> name <newname> to atomically rename the server in the cebtree while it is in maintenance mode. A work-in-progress consumer of this feature can be seen here [2]. The feature requires the backend to opt in with option server-rename (or the global server-rename tunable) to prevent accidental renames in setups that depend on stable server names. The reconciliation of server-state files after a rename is left to the operator, consistent with the approach discussed in the issue. All concerns raised in issue #952 should be addressed: cebtree re-indexing under thread_isolate(), name validation, maintenance-mode requirement, per-backend opt-in via option server-rename (plus a global server-rename tunable), and EVENT_HDL_SUB_SERVER_NAME notification on success. Three cases are explicitly rejected with an error: - use-server references — the config text would silently diverge from the running state. - track references — the next reload would fail to resolve the old name, a hard correctness issue. - Peer-synced stick tables — peers use server names as identifiers; a local rename would cause silent divergence between peers. Patch 1: core implementation (srv_update_server_name, CLI command, global tunable, option server-rename) Patch 2: reg-test Patch 3: documentation Best regards, Alexander [1] https://github.com/haproxy/haproxy/issues/952 [2] https://github.com/jcmoraisjr/haproxy-ingress/pull/1481
0001-MINOR-server-add-option-server-rename-and-set-server.patch
Description: 0001-MINOR-server-add-option-server-rename-and-set-server.patch
0002-REGTESTS-server-add-test-for-set-server-name-CLI-com.patch
Description: 0002-REGTESTS-server-add-test-for-set-server-name-CLI-com.patch
0003-DOC-server-document-option-server-rename-global-serv.patch
Description: 0003-DOC-server-document-option-server-rename-global-serv.patch

