github avandeputte/haproxy-manager v2.0.0-beta.2

pre-release31 minutes ago

Beta. Only nodes with Also offer beta versions ticked (Settings → Updates) are offered this. It replaces 2.0.0-beta.1, whose notes are folded in below.

2.0: address lists, rules that say "any of these, and all of those", a rule wizard, error pages

Three requests from the same week (#19, #20), and the reason this is a 2.0 rather than a 1.101: a rule's shape changed. Upgrade every node of a cluster before editing rules or services on the new one; a node still on 1.100 reads only the old shape, and a rule written in the new one would apply to it without its conditions.

Address lists (#19)

Advanced › HAProxy › Address Lists: a named set of networks. A service's Allowed networks, the networks that skip its sign-in, and a condition of type source_list can name a list beside the networks they hold. Edit the list and every service that names it follows at the next Apply. The visitor whose home address changes every few weeks is changed in one place.

Typed networks and named lists count together. A list of more than forty networks is declared over several lines, since HAProxy reads at most 64 words from one.

Rules: any of these, and all of those (#19)

A rule tests two lists: Any of these (one must match) and All of these (every one must, with one of the first). HAProxy has no parentheses, so "tv or films, from the LAN" is written out as if host-tv lan || host-films lan. A rule saved before 2.0 still renders as it did; the editor opens it in the new shape.

The wizard no longer throws away a condition added to a service's rule by hand: editing the service keeps it, and it now holds for every name the service answers to. Before, it was dropped on the next edit, and on a service with several names it was OR-ed with them, which is what made a LAN test route every LAN request to the first such service.

A condition's value can hold several patterns separated by spaces, and matches any of them. It always could; the form now says so.

The rule wizard

Advanced › HAProxy › Rules › Rule wizard builds a rule in one dialog, read as a sentence: On these Public Services, When these conditions hold — typed in place, sorted into any-of and all-of, an existing one picked instead when you like — Then do this. The wizard makes the conditions, attaches the rule to the listeners and places it by how specific it is; a rule made on the Rules page used to do nothing until it was also ticked on the listener. Preview asks HAProxy: the result is checked with haproxy -c and the dialog shows the verdict and the generated lines; a rule HAProxy would not load is refused on Save with HAProxy's own words. Wizard on a rule's row opens it the same way.

Error pages (#20)

Advanced › HAProxy › Error Pages: what visitors see when HAProxy itself answers with an error. A page serves one or more status codes, with {error_code} and {error_message} filled in per code; Load from file reads a local .html into the editor. A page is part of the shared configuration, so it reaches every node like everything else, and each node writes it to /etc/haproxy/error-pages/ before validating or applying. A page is used for every service, or only by the pools that pick it — in the publish wizard's new Error pages section or on the Backend Pools page; a paused service answers with its 503 page too.

HAProxy can only replace the responses it generates itself (400 to 504, not a server's own 404), and the whole response must fit its 16 kB buffer, so a page with an image embedded in it is refused at the form: link the image, or inline an SVG.

Fixed since beta.1

A node upgraded from 1.100 came up saying unapplied changes with nothing to apply: 2.0 adds two empty collections to the configuration, which changed the hash the flag compares. The applied marker is now carried over when the stored file lacks nothing but defaults. Nodes already on beta.1 that pressed Apply are fine; the rest clear on upgrade.

After upgrading

Nothing to do on a single node. In a cluster, upgrade every node before editing rules or services, as above.

Image: ghcr.io/avandeputte/haproxy-manager:2.0.0-beta.2

Don't miss a new haproxy-manager release

NewReleases is sending notifications on new releases.