Skip to content

mod_proxy_balancer: ignore b_nwrkr_flags from the balancer-manager - #1105

Open
ylavic wants to merge 1 commit into
apache:trunkfrom
ylavic:trunk-balancer-nwrkr-flags
Open

ylavic wants to merge 1 commit into
apache:trunkfrom
ylavic:trunk-balancer-nwrkr-flags

Conversation

@ylavic

@ylavic ylavic commented Nov 27, 2026

Copy link
Copy Markdown
Member

A run-time worker addition can carry status flags in the b_nwrkr_flags
parameter, added for mod_proxy_beacon, which creates its members marked
'B' through mod_proxy_balancer's balancer_manage() optional function. The
balancer-manager's handler fills the same parameters from the request and
goes through the same processing, so a balancer-manager request could
create a worker with any status flag (e.g. 'O', skipping the shared
initialization, or 'B', making mod_proxy_beacon take the worker as its
own).

Changes:

  • The balancer-manager drops b_nwrkr_flags from its requests: a worker
    added there is created disabled, with no other status flag, as its form
    always did.
  • balancer_manage()'s callers can still create a worker marked 'B'
    (mod_proxy_beacon), but an add asking for any other flag is refused,
    with an error log.
  • test_12_balancer.py checks that balancer-manager adds with
    b_nwrkr_flags create the worker disabled only.

A worker added through the balancer-manager is now created disabled with
no other status flag: b_nwrkr_flags is dropped from its requests.
balancer_manage()'s callers can still create a worker marked 'B'
(mod_proxy_beacon), but an add asking for any other flag is refused.

* modules/proxy/mod_proxy_balancer.c
  (balancer_handler): Drop b_nwrkr_flags from the request's parameters.
  (balancer_process_balancer_worker): Refuse an add with a status flag
  other than PROXY_WORKER_BEACON_FLAG.

* test/modules/proxy/test_12_balancer.py: Check that a worker added with
  b_nwrkr_flags through the balancer-manager is created without them.
@ylavic

ylavic commented Nov 27, 2026

Copy link
Copy Markdown
Member Author

@jimjag I think this is needed?

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

Successfully merging this pull request may close these issues.

1 participant