Gardience Documentation gardience.com →
Docs / Using Gardience

Held work

Gardience holds a change instead of failing it when the target node cannot take it yet. Held work waits in a queue and runs later.

Work is held for one of two reasons:

Read-only checks are never held.

See held work

Open Automation > Change control and go to Held and queued work. The table lists the 30 most recent items:

ColumnMeaning
Queued (UTC)When the work was held.
WorkWhat it does, with the Salt function and the target nodes.
Whyoffline or change window.
Requested byThe person (or schedule author) the work runs for.
StatusWhere the item is now. See the status list below.

Each held item is recorded in the audit log as queue.held.

Automatic release

Gardience checks the queue every 30 seconds, and straight away when a node's agent reconnects. An item is released when all of these are true:

  1. At least one of its target nodes is online.
  2. No change window is closed for the online target nodes.
  3. The person who requested it is still allowed to run that Salt function on those nodes.

When an item is released:

If the requester has lost the right to run it, the item is not run. Its status becomes "refused (requester lacks permission)", the audit log records queue.refused, and Gardience posts a notification.

Items are released oldest first. Work held for the same node runs one item after another, in the order it was held, so a reboot never lands in the middle of the patch held before it. Up to 10 items for different nodes are released at the same time.

Override: run now

Admins can release an item before its window opens.

  1. Choose Run now (override) on the item.
  2. Enter the reason it must run now. A reason is required.

An override skips the change window check. It still needs at least one target node online, and it still checks the requester's rights. The audit log records queue.override under the admin's name, with the reason.

Cancel

To cancel an item, choose Cancel. The person who requested it and admins can cancel. The status becomes "cancelled by" and the name of the person who cancelled it.

Statuses

StatusMeaning
queuedWaiting to be released.
releasingBeing released right now.
releasedSent to the online target nodes.
refused (requester lacks permission)Not run because the requester's role no longer allows it.
cancelled by nameCancelled.
interrupted: Gardience restarted while releasing thisGardience stopped in the middle of a release. See below.
restored: release by hand after checking it has not already runRestored from a backup. See below.

Interrupted items

If Gardience restarts while it is releasing an item, it does not send the item again on its own, because Salt may already have started the job. The item is marked "interrupted" and a warning appears on the console. Check the job history in Patching > Jobs or the audit log. If the job did not run, request the work again.

Items restored after a backup

When you restore Gardience from a backup with gardience restore, the queue goes back to what it was when the backup was taken. Some of those items may already have run on the server the backup came from. Running them again could, for example, reboot a node twice.

So, when Gardience starts after a restore:

To handle each restored item:

  1. Check the job history and the audit log for the same change on the nodes listed under Work.
  2. If it already ran, choose Cancel.
  3. If it did not run and is still needed, an admin chooses Run now (override) and gives a reason. The item goes back in the queue and is released at once, skipping the change window check. If no target node is online, the console says so and the item waits as a normal queued item until a node reconnects.

Limits

Gardience by Bouziden Management LLC.