Hi Baptiste,
it is IMHO not really clear that brackets are for anonymous ACLs only.
Wouldn't it make sense to support it for use_backend as well?
It just makes things easier in my opinion.
Mit freundlichen Grüßen,
Christian Ruppert
Christian Ruppert
Systemadministrator
Babiel GmbH
Erkrather Str. 224 a
D-40233 Düsseldorf
Tel: 0211-179349 0
Fax: 0211-179349 29
E-Mail: c.rupp...@babiel.com
Internet: http://www.babiel.com
Geschäftsführer: Georg Babiel, Dr. Rainer Babiel, Harald Babiel Amtsgericht
Düsseldorf HRB 38633
~~ DISCLAIMER ~~~
The information transmitted in this electronic mail message may contain
confidential and or privileged materials. Any review, retransmission,
dissemination or other use of or taking of any action in reliance upon, this
information by persons or entities other than the intended recipient is
prohibited. If you receive such e-mails in error, please contact the sender and
delete the material from any computer.
-Ursprüngliche Nachricht-
Von: Baptiste [mailto:bed...@gmail.com]
Gesendet: Donnerstag, 21. März 2013 20:00
An: Christian Ruppert
Cc: haproxy@formilux.org
Betreff: Re: use_backend: brackets/grouping not accepted in condition
Hi Christian,
Brackets are for anonymous ACLs only.
You seem to use named ACLs with brackets so it can't work.
Either you do as you said:
use_backend backend_test if request_domain1 allowed_ip_foo or
request_domain1 allowed_ip_bar
Or with 2 use_backend:
use_backend backend_test if request_domain1 allowed_ip_foo
use_backend backend_test if request_domain1 allowed_ip_bar
Baptiste
On Thu, Mar 21, 2013 at 6:25 PM, Christian Ruppert c.rupp...@babiel.com
wrote:
Hi Guys,
I just tried to simplify some rules and I noticed that brackets {} doesn't
work
with use_backend while it works fine with default_backend.
That doesn't work:
use_backend backend_test if request_domain1 { allowed_ip_foo or
allowed_ip_bar }
That works:
use_backend backend_test if request_domain1 allowed_ip_foo or
request_domain1 allowed_ip_bar
That works as well:
default_backend backend_main if request_domain2 { allowed_ip_foo or
allowed_ip_bar }
I could also use multiple use_backend's but using brackets would make it a
lot easier and better readable IMHO.
https://code.google.com/p/haproxy-docs/wiki/UsingACLs
That also sounds like the brackets should work almost everywhere.
Some actions are only performed upon a valid condition. A condition is a
combination of ACLs with operators. 3 operators are supported :
- AND (implicit)
- OR (explicit with the or keyword or the || operator)
- Negation with the exclamation mark (!)
A condition is formed as a disjunctive form:
[!]acl1 [!]acl2 ... [!]acln { or [!]acl1 [!]acl2 ... [!]acln } ...
Such conditions are generally used after an if or unless statement,
indicating when the condition will trigger the action.
I would really like to see that fixed. Or is that on purpose?
Mit freundlichen Grüßen,
Christian Ruppert
Christian Ruppert
Systemadministrator
Babiel GmbH
Erkrather Str. 224 a
D-40233 Düsseldorf
Tel: 0211-179349 0
Fax: 0211-179349 29
E-Mail: c.rupp...@babiel.com
Internet: http://www.babiel.com
Geschäftsführer: Georg Babiel, Dr. Rainer Babiel, Harald Babiel Amtsgericht
Düsseldorf HRB 38633
~~ DISCLAIMER ~~~
The information transmitted in this electronic mail message may contain
confidential and or privileged materials. Any review, retransmission,
dissemination or other use of or taking of any action in reliance upon, this
information by persons or entities other than the intended recipient is
prohibited. If you receive such e-mails in error, please contact the sender
and
delete the material from any computer.