This runbook covers the day-to-day maintenance operations you will perform most frequently on the WikiOasis infrastructure: scheduling monitoring downtime, removing servers from the HAProxy load-balancer pool, applying configuration changes through Salt, and validating that minions and their pillar data are healthy. All operations use either native Salt commands or the custom execution modules (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/wikioasis/salt/llms.txt
Use this file to discover all available pages before exploring further.
haproxy and host) built into this repository.
Scheduling downtime in Icinga2
Before performing any disruptive work on a server — deployments, restarts, configuration changes — schedule a downtime period in Icinga2 to suppress alerts. Thehost.downtime Salt module communicates with the Icinga2 REST API directly, covering the host object and all of its service checks in a single call.
The duration argument accepts a plain integer (seconds) or a string with a unit suffix: s (seconds), m (minutes), h (hours), d (days).
monitoring:icinga_api_host, monitoring:icinga_api_user, monitoring:icinga_api_password, and monitoring:icinga_api_port from pillar. These must be present in the private pillar before the module can connect.
The hostname argument must match the Icinga2 host object name exactly, not the minion ID. In the WikiOasis setup the convention is
<minion-id>.ovvin.wonet.Depooling and repooling servers
Thehaproxy Salt module manages HAProxy’s runtime state via the stats socket at /run/haproxy/admin.sock. All operations take effect immediately — no HAProxy reload or restart is required.
Depooling a server
Remove a server from a backend before performing maintenance to ensure it receives no new traffic:Repooling a server
Return a server to the pool after maintenance is complete:Checking pool status
Inspect the current state of all backend servers across all proxy nodes:backend, server, status, and weight fields. A healthy server shows status: UP.
Combined maintenance workflow
The recommended sequence for any maintenance that requires traffic isolation is: schedule downtime, depool, do the work, repool, and verify.Applying configuration changes
Single state
Apply one specific state to one or more minions:Highstate (all states)
Apply every state assigned to a minion viasalt/top.sls:
Dry run (test mode)
Preview what changes Salt would make without applying them. Always use this before running a highstate on a production server you are unsure about:Verbose debug output
Add-l debug to see the full Salt execution log, including rendered Jinja templates and exact file paths:
Checking minion connectivity
Usetest.ping to verify that one or all minions are reachable before starting any bulk operation:
True means the minion is up and the master can communicate with it. No response (or a timeout) means the minion is down, the salt-minion service is stopped, or there is a network issue.
Verifying pillar data
Pillar data drives nearly every decision Salt makes. Verifying pillar output before applying states is essential — especially after editingpillar/top.sls or adding a new host-specific pillar file.
pillar.get returns an empty dict or None for a key you expect to be populated, check:
- The correct glob is in
pillar/top.sls. - The per-host
.slsfile exists in the right directory. - The private pillar is present on the master and contains the expected keys.
Managing HAProxy routes
HAProxy hostname-to-backend routing is stored in/etc/haproxy/routes.map. The haproxy module lets you inspect and modify these routes at runtime without touching any config files or reloading HAProxy.
List all active routes
Add or update a route dynamically
Remove a route
Quick reference
| Task | Command |
|---|---|
| Schedule 2h downtime | salt '<minion>' host.downtime '<hostname>.ovvin.wonet' '2h' '<reason>' |
| Depool from backend | salt 'proxy*' haproxy.depool <backend> <server> |
| Repool to backend | salt 'proxy*' haproxy.repool <backend> <server> |
| Check pool status | salt 'proxy*' haproxy.status |
| Apply a state | salt '<target>' state.apply <state> |
| Apply all states | salt '<target>' state.highstate |
| Dry-run a state | salt '<target>' state.apply <state> test=True |
| Ping all minions | salt '*' test.ping |
| View all pillar data | salt '<minion>' pillar.items |
| View pillar subtree | salt '<minion>' pillar.get <key> |
| List live routes | salt 'proxy*' haproxy.route_list |
| Add a route (live) | salt 'proxy*' haproxy.route_set <hostname> <backend> |
Adding a Server
Full runbook for provisioning a new minion, accepting its key, and applying role states.
Database Backup
Reference for the MariaDB backup system, schedule, scripts, and NRPE health checks.