validate site config on the load balancers

This block is part of the nginx group and was last modified in core v15.0.0.

validate site config on the load balancers v15.0.0

Run nginx -t for this site config on every load balancer, in the context of its full live config. Writes nothing to any live directory.

In pins 3 + flow
  • flow
    flow
  • Site required
    value

    The site name, for example example.com : becomes .conf on the fleet.

  • Site config required
    value

    The nginx site config, exactly as it would be pushed.

  • Load balancers required
    array

    Each {name, host, port, user, key_path, known_hosts_path}. Paths only : never key material.

Out pins 8 + flow
  • flow
    flow
  • Success
    condition

    True when every node could be asked. Whether they passed is on the passed pin.

  • Site
    value

    The site that was validated.

  • Passed everywhere
    condition

    True only when nginx -t passed on every node. This is the gate the push needs.

  • Results
    array

    Per node: name, host, ok, output, exit_code, checksum, site.

  • Checksum
    value

    sha256 of the exact bytes checked. The push matches on this.

  • Passed count
    number

    How many nodes accepted the config.

  • Node count
    number

    How many nodes were asked.

  • Error
    value

    Why the check could not run at all.

Validates an nginx site config on EVERY load balancer in the nodes list and reports per node. The far side overlays the staged file on a shadow of its full live tree and runs the real nginx -t, so the answer covers certificates, includes and interactions with the other live sites : not a syntax check in a vacuum. Nothing reaches a live directory. This is a separate fan-out ahead of any write: 'does this validate everywhere' is answered in full before 'shall we replace anything' is asked. passed comes back true only when every node passed. results carries {name, host, ok, output, exit_code, checksum, site} per node, and checksum is a sha256 of the exact bytes checked: nginxsite_push demands a passing result with a MATCHING checksum for every node it is about to write to, so a flow cannot check, edit and then push a different file. Each node is {name, host, port, user, key_path, known_hosts_path}; user defaults to lbpush. Key MATERIAL must never appear on the pin : only paths : and the block refuses a node object carrying private_key, key, password, passphrase or secret.

nginx -t
validate nginx config
check site config

A typical wiring for validate site config on the load balancers: a function trigger starts the flow; value feeds the site pin; value feeds the config pin; with values feeds the nodes pin; the flow out pin feeds debug.

Studio canvas example for the validate site config on the load balancers block: typical wiring for validate site config on the load balancers.

Version history

Introduced in v15.0.0.


Back to nginx Return to the main group to view all sub-groups Back to Load balancers Return to the group to view all blocks within this group