On 1/25/11 10:48 PM, Willy Tarreau wrote:
Hi Joel,

On Tue, Jan 25, 2011 at 01:29:11PM -0800, Joel Krauska wrote:
I'm not sure if people have asked for this, but I would love a custom
field/column in the Stats Report web page.

Specifically, I would like to be able to see my backend server
version. This is a custom text string which I could provide a
health-check-like URL to populate.

Then the HAProxy stats page could be a one-stop page to watch during
rolling upgrades of backends.

Probably for easy customization, an external call to third party
script would be ideal.

Has anyone considered this before?  Is there any way to hack existing
features to do this?

You should take a look at "stats show-desc". You can already use it to
report a section-specific string. You can then have your upgrade script
fill it from a config template. For instance :

backend foo
        stats show-desc @@foo.version@@

Then replace @@foo.version@@ with whatever you like.

Assuming you're in a secure enough environment to consider such things,
you should also take a look at "stats show-legends" which reports much
more information (eg: mode, IPs, cookie names, etc...). This is different
from what you asked for but will surely help troubleshoot issues if you
already feel concerned with the config version.

Cheers,
Willy


Willy,

I think you've described a per-backend description.
I enabled stats show-desc, but that's a per backend feature, right?

I'm looking for a per-server (subset of backend) field.

Use case:

backend pool foo has four servers: a,b,c,d

initial state, all four servers are running code rev 22.

I initiate a rolling upgrade, which includes a graceful shut, upgrade of code and graceful start of each server.

The new code rev is 23.

As I upgrade the code on each server from version 22 to version 23... It would be nice if HAProxy was able to poll a given URL to identify the unique version of each server to monitor the progress of the upgrade and confirm quickly/visually that all members of the same backend are in sync at the end of an upgrade....

mid upgrade
a - version 23
b - version 23
c - down (currently be upgraded)
d - version 22


It's sort of like a special case of a healthcheck, but for a given URI and displaying the output, not just if the check succeeded.


Something you'd consider adding?


In the meantime I've got my own little per server version table page that has this info, but it's very similar to the haproxy page....
(pools and member servers)

Cheers,

Joel



Reply via email to