-
Notifications
You must be signed in to change notification settings - Fork 2
self update
Pre-Alpha. This page describes behavior that may change.
Ze can automatically download, verify, and install firmware updates on non-gokrazy deployments. The update cycle: check a version manifest, download the binary, verify its SHA-256, atomically replace the running binary via rename (keeping a .prev backup), and optionally restart.
Ze includes a standalone update server for build infrastructure:
ze update-serve --listen :8080| Path | Purpose |
|---|---|
GET /version.json |
Enhanced manifest (version, sha256, size, paused). |
GET /<goos>/<goarch> |
Binary download. |
GET /<goos>/<goarch>/sha256 |
Hex SHA-256 digest (text/plain). |
The server computes SHA-256 at startup. If the binary changes on disk (rebuild), restart the server.
Two mechanisms, ORed together:
-
File: create a file named
update-pausedin the binary's directory. Remove to unpause. -
Signal: send
SIGUSR1to toggle the in-memory pause state.
When paused, the manifest returns "paused": true. Clients with auto-apply stop downloading. Manual commands bypass pause.
Any HTTP server returning the manifest JSON works. Required fields:
{
"version": "26.05.20",
"sha256": "a1b2c3d4...64hex",
"size": 52428800,
"paused": false
}Optional fields: minimum-version (sequential upgrade enforcement), download-url (override download location, must be HTTPS).
system {
update-check {
url https://update.example.com/version.json;
}
}
Daily check, report via show system update and show warnings. No download.
system {
update-check {
url https://update.example.com/version.json;
interval 3600;
auto-apply true;
spread 1800;
maintenance-window {
start 02:00;
end 06:00;
}
restart {
time 03:00;
}
}
}
Check hourly. On new version: wait a random delay up to 30 minutes (spread), download and verify at any time, replace binary only between 02:00 and 06:00, restart at 03:00.
system {
update-check {
url https://update.example.com/version.json;
interval 300;
auto-apply true;
spread 0;
restart {
immediate;
}
}
}
Check every 5 minutes. Download immediately, stage, restart within 5 seconds.
show system update # Current status
show system update history # Last 20 update events
update system firmware check # Trigger immediate version check
update system firmware download # Download now (bypass spread, window)
update system firmware apply # Full cycle: download+verify+stage+restart
update system firmware restart # Restart into staged version
update system firmware rollback # Restore previous versionManual commands bypass spread and maintenance window.
After a successful update, the previous binary is preserved as <binary>.prev. To roll back:
update system firmware rollbackThis renames .prev to the target binary and restarts. After rollback, .prev no longer exists.
Each device computes a deterministic delay from its identity (machine-id or hostname) and the target version string. Default: 3600 seconds (1 hour). A fleet of 100 devices distributes downloads over approximately 1 hour.
The maintenance window gates only binary replacement (the rename step). Download and verification proceed at any time. Windows crossing midnight are valid: start 22:00 / end 06:00.
If the server sets minimum-version, devices running an older version are blocked from updating. They must update to the intermediate version first.
| Symptom | Cause |
|---|---|
| "not configured" | No url in update-check config. |
| "auto-apply requires server to provide sha256" | Server manifest missing sha256 field. |
| "waiting for spread" | Spread delay not elapsed. Use update system firmware download to bypass. |
| "waiting for maintenance window" | Outside configured window. Use update system firmware apply to bypass. |
| "paused by server" | Server manifest has paused: true. |
| "checksum mismatch" | Binary changed on server. Restart ze update-serve. |
-
System for the
update-checkconfiguration block. - Upgrade and Restart for the manual upgrade workflow.
- Health Checks for update-related warnings.
Adapted from main/docs/guide/self-update.md.
Unreviewed draft. This wiki was authored in bulk and has not been reviewed. File corrections on the issue tracker.
- Overview
- YANG Model
- Editor Workflow
- Archive and Rollback
- System
- Interfaces
- VRRP
- BFD
- FIB
- OSPF
- IS-IS
- MPLS / LDP / RSVP-TE
- RSVP-TE
- SRv6
- Static Routes
- Policy Routing
- Firewall
- Traffic Control
- Class of Service
- L2TP/PPP
- PPPoE
- VPP Data Plane
- RPKI
- IPsec VPN
- TACACS+ AAA
- RADIUS AAA
- AS112 DNS
- Authorization
- Fleet
- BGP
- Starting and Stopping
- Show Commands
- Monitoring
- Flow Export
- DDoS Mitigation
- Anomaly Detection
- Health Checks
- Audit Trail
- Production Diagnostics
- Logging
- Operational Reports
- Healthcheck
- Self-Update
- Zero-Touch Provisioning
- MRT Analysis
- Upgrade and Restart
- Storage
- Policy
- Core
- Resilience
- Validation
- Capabilities
- Address Families
- Protocol
- Subsystems
- Infrastructure
- Route Server at an IXP
- Transit Edge with RPKI
- Public Looking Glass
- ExaBGP Migration Walkthrough
- FlowSpec Injection
- Chaos-Tested Peering
- AS Path Topology