backend/director admin states

Dridi Boukelmoune dridi at varni.sh
Thu May 3 08:49:23 UTC 2018


> Illustrated example: varnishadm backend.list output
>
> Backend name                  Admin     Probe      Last change
> boot.b1                       probe     0/8 bad    Wed, 02 May 2018 13:22:10 GMT
> boot.b2                       probe     8/8 good   Wed, 02 May 2018 13:22:10 GMT
> boot.b3                       healthy   1/8 bad    Wed, 02 May 2018 13:22:10 GMT
> boot.b4                       healthy   -          Wed, 02 May 2018 13:22:10 GMT
> boot.b5                       sick      7/8 good   Wed, 02 May 2018 13:22:10 GMT
> boot.b6                       sick      -          Wed, 02 May 2018 13:22:10 GMT
> boot.b7                       disabled  7/8 good   Wed, 02 May 2018 13:22:10 GMT
> boot.b8                       deleted   -          Wed, 02 May 2018 13:22:10 GMT
> boot.d1                       dependent -          Wed, 02 May 2018 13:22:10 GMT
> boot.d2                       probe     3/4 good   Wed, 02 May 2018 13:22:10 GMT

We should make this output a bit more functional if we're going to
break the output.

Columns:

- name
- type (std, roundrobin, fallback, ...)
- health (auto healthy or sick as in backend.set_health, and deleted/dead)
- probe (vcl name of the probe for std backends, arbitrary string for directors)
- state (depends on the director, for example "bad" or "good")
- comment (eg. 0/8 for native probes)
- last change

And as usual "-" when there's no value.

Example:

> Name        Type        Health    Probe    State    Comment    Last change
> boot.www1    std        auto    none    good    -    Wed, 02 May 2018 13:22:10 GMT
> boot.www2    std        sick    none    bad    -    Wed, 02 May 2018 13:22:10 GMT
> boot.www    fallback    auto    cluster    good    -    Wed, 02 May 2018 13:22:10 GMT

The idea is to avoid blanks inside columns (except "last change/updated")
to make it more friendly to a ny column oriented toollike /bin/sh's `read` or
awk's fields.

Directors can then contribute to backend.list -p by pretty-printing what
can explain their current state (eg. list of backends for our built-in
directors).

Dridi


More information about the varnish-dev mailing list