Skip to content

Temporary rules and maintenance windows

A host rule or a policy rule can have a lifetime: when it ends, the workers remove the rule and deploy the affected hosts automatically. A vendor access or an emergency opening is never forgotten.

In the rule editor (host rules in managed-chain and full mode, and policy rules), set Lifetime:

  • Permanent (default);
  • For 1 hour, 4 hours, 1 day, 3 days or 1 week;
  • Until… a date and time (local time of your browser).

The expiry must be in the future and within a year. The rule table shows a badge such as expires in 3 h; hovering it shows when the rule will be removed and deployed.

Templates do not have lifetimes. Editing a rule without touching its lifetime keeps it.

  1. Within about 30 seconds after the expiry, a background job deletes the expired rules and records rule.expired (or policy.rule_expired) in the audit log.
  2. Each affected host that was in sync before the removal (deployed by FireHawk, backend detected, no other undeployed changes) is deployed automatically: a safe deploy with a 120-second window, as the user system, with a normal deploy.apply audit entry. Expiry deploys ignore maintenance windows.
  3. Hosts that also had other undeployed changes are not deployed automatically, since that would push unrelated changes too. They show undeployed changes, and the event rule.expired_pending is raised (a warning notification, on by default).

Restoring a version or applying a template gives permanent rules: the lifetime is not part of versions, templates, exports or diffs.

A maintenance window is a weekly time slot in which deploys may run, for example weekdays 22:00 to 02:00. Rollouts and a host’s Schedule… can wait for a window.

Managing windows needs the maintenance.manage permission; every signed-in user can see them.

  1. Open Maintenance and click New window.

  2. Fill in:

    Field Notes
    Name For example Weekend nights.
    Description Optional.
    Starts at Start time, 24-hour HH:MM.
    Duration 15 minutes to 7 days. A window can run past midnight.
    Time zone An IANA zone such as Europe/Paris; daylight saving time is handled.
    Days The weekdays on which the window opens.
    Applies to All hosts, or Host groups.
    Enabled A disabled window never opens.
  3. Click Create window.

The list shows each window’s schedule, open now with its end, and the Next opening.

When a rollout is scheduled In a maintenance window:

  • a batch only starts while the window is open;
  • a batch running when the window closes finishes; the next batch waits for the next opening;
  • if the window is disabled, the rollout pauses until the window is enabled again or you resume it.

A window used by an active rollout cannot be deleted.

Inside a window the tab shows maintenance window open and until when. Expiry deploys of temporary rules ignore windows.