Temporary rules and maintenance windows
Temporary rules
Section titled “Temporary rules”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.
Give a rule a lifetime
Section titled “Give a rule a lifetime”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.
What happens at expiry
Section titled “What happens at expiry”- Within about 30 seconds after the expiry, a background job deletes the expired rules and records
rule.expired(orpolicy.rule_expired) in the audit log. - 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 normaldeploy.applyaudit entry. Expiry deploys ignore maintenance windows. - 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_pendingis 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.
Maintenance windows
Section titled “Maintenance windows”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.
Create a window
Section titled “Create a window”-
Open Maintenance and click New window.
-
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. -
Click Create window.
The list shows each window’s schedule, open now with its end, and the Next opening.
How rollouts use windows
Section titled “How rollouts use windows”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.
Manual deploys
Section titled “Manual deploys”Inside a window the tab shows maintenance window open and until when. Expiry deploys of temporary rules ignore windows.
