Commit Graph

398 Commits

Author SHA1 Message Date
Josh Patterson 8c17ae0f66 move so-salt-minion-wait 2026-06-01 14:48:54 -04:00
Josh Patterson f54939b444 Replace inotify pillar watch with postgres audit_settings beacon
The active-push feature detected pillar/settings changes via an inotify
beacon on the manager watching /opt/so/saltstack/local/pillar. Replace
that pillar watch with a custom salt beacon (pillar_db) that polls the
SOC so_soc.audit_settings table on a monotonic id watermark, so changes
made through SOC drive immediate pushes from the database instead of the
files. The suricata/strelka rule inotify watches (and pyinotify) are kept
unchanged, since rule-file edits are not recorded in audit_settings.

- salt/_beacons/pillar_db.py: new beacon. Polls audit_settings via
  `docker exec so-postgres psql` (unix-socket trust auth), tracks the last
  processed id in /opt/so/state/pillar_db_watch.id, seeds to MAX(id) on
  first run (no history replay), and emits one event per new row.
- salt/reactor/push_pillar.sls: consume setting_id/node_id from the beacon
  event instead of a file path. App = first dotted segment of setting_id,
  looked up in pillar_push_map.yaml. Empty node_id -> grid-wide actions as
  is; populated node_id -> the app's state(s) retargeted to that one node.
- salt/manager/files/beacons_pushstate.conf.jinja: drop the pillar inotify
  block, add the pillar_db beacon (interval = push.drain_interval); keep
  the suricata/strelka inotify watches.
- salt/salt/files/reactor_pushstate.conf: map salt/beacon/*/pillar_db/
  audit_settings to push_pillar.sls; remove the pillar inotify reactor
  lines; keep suricata/strelka.

The intent -> so-push-drainer -> orch.push_batch pipeline is unchanged.
Verified end-to-end on a standalone: a grid-wide telegraf.output change
re-applied telegraf fleetwide (container replaced), and a per-host
ntp.config.servers change applied ntp to only that node.
2026-05-29 14:55:13 -04:00
Josh Patterson 66c0a662fc convert wait to script 2026-05-08 09:26:42 -04:00
Josh Patterson 778cc055ea wait for salt-minion service to be ready before finishing state run 2026-05-07 17:01:20 -04:00
Josh Patterson 9541024eb7 fix broken things 2026-04-30 15:35:24 -04:00
Josh Patterson f7d2994f8b filter temp files 2026-04-30 09:16:22 -04:00
Josh Patterson 8f0757606d include salt..minion 2026-04-29 16:42:19 -04:00
Josh Patterson 0a8f2e01a0 install pyinotify 2026-04-29 16:41:56 -04:00
Josh Patterson 034711d148 Merge remote-tracking branch 'origin/3/dev' into saltthangs 2026-04-28 10:47:29 -04:00
Josh Patterson ee437265fc monitor raid for vms 2026-04-20 12:00:02 -04:00
Mike Reeves a0cf0489d6 reduce highstate frequency with active push for rules and pillars
- schedule highstate every 2 hours (was 15 minutes); interval lives in
  global:push:highstate_interval_hours so the SOC admin UI can tune it and
  so-salt-minion-check derives its threshold as (interval + 1) * 3600
- add inotify beacon on the manager + master reactor + orch.push_batch that
  writes per-app intent files, with a so-push-drainer schedule on the manager
  that debounces, dedupes, and dispatches a single orchestration
- pillar_push_map.yaml allowlists the apps whose pillar changes trigger an
  immediate targeted state.apply (targets verified against salt/top.sls);
  edits under pillar/minions/ trigger a state.highstate on that one minion
- host-batch every push orchestration (batch: 25%, batch_wait: 15) so rule
  changes don't thundering-herd large fleets
- new global:push:enabled kill-switch tears down the beacon, reactor config,
  and drainer schedule on the next highstate for operators who want to keep
  highstate-only behavior
- set restart_policy: unless-stopped on 23 container states so docker
  recovers crashes without waiting for the next highstate; leave registry
  (always), strelka/backend (on-failure), kratos, and hydra alone with
  inline comments explaining why
2026-04-10 15:43:16 -04:00
Mike Reeves afc14ec29d Remove non-Oracle Linux 9 support from salt states
Simplifies salt states, map files, and modules to only support
Oracle Linux 9, removing all Debian/Ubuntu/CentOS/Rocky/AlmaLinux/RHEL
conditional branches.
2026-03-16 16:58:39 -04:00
Josh Patterson 94f454c311 cleanup file.absent 2026-03-16 15:57:15 -04:00
Josh Patterson 89b18341c5 add URL_BASE to vm hosts file 2026-03-11 12:29:13 -04:00
Josh Patterson 90137f7093 remove 10T limit for virtual disk 2026-03-11 12:29:10 -04:00
Jason Ertel 2c4d833a5b update 2.4 references to 3 2026-03-05 11:05:19 -05:00
Josh Patterson 9b525612a8 upgrade salt 3006.19 2026-02-17 09:33:05 -05:00
Josh Patterson fb364aec5d upgrade salt 3006.19 2026-02-17 09:27:52 -05:00
Josh Patterson ed014b431e upgrade salt 3006.19 2026-02-15 09:16:36 -05:00
Josh Patterson 82ca64d66f upgrade salt 3006.19 1 day for testing 2026-02-13 20:49:25 -05:00
Josh Patterson 7e0fb73fec upgrade salt 3006.19 2026-02-13 17:58:57 -05:00
Josh Patterson c28bcfa85e upgrade salt 3006.19 2026-02-13 16:24:19 -05:00
Josh Patterson 2b05583035 update salt 3006.19 2026-02-13 14:49:53 -05:00
Josh Patterson c6168c1487 bootstrap-salt update 2026-02-05 10:20:54 -05:00
Josh Patterson 9960db200c Merge remote-tracking branch 'origin/2.4/dev' into bravo 2025-12-11 17:30:43 -05:00
Josh Patterson b9ff1704b0 the great ssl refactor 2025-12-11 17:30:06 -05:00
DefensiveDepth 4bb0a7c9d9 Merge remote-tracking branch 'origin/2.4/dev' into idstools-refactor 2025-11-25 13:52:21 -05:00
Josh Patterson 5b6a7035af need python_shell for pipes 2025-11-19 10:22:58 -05:00
Josh Patterson 3427df2a54 update bootstrap-salt to latest 2025-11-12 18:07:14 -05:00
Josh Patterson 235dfd78f1 Revert "salt-minion service KillMode to control-group"
This reverts commit 7c8b9b4374.
2025-11-12 14:20:28 -05:00
Josh Patterson 7c8b9b4374 salt-minion service KillMode to control-group 2025-11-12 12:30:29 -05:00
DefensiveDepth 2f6fb717c1 Merge remote-tracking branch 'origin/2.4/dev' into idstools-refactor 2025-11-06 10:38:37 -05:00
Josh Patterson fa154f1a8f update salt cloud config if configured 2025-11-03 14:12:19 -05:00
Josh Patterson 9027e4e065 update salt-cloud profile after new code copied 2025-10-30 14:48:48 -04:00
Josh Patterson 30970acfaf var for SALTVERSION in cloud config 2025-10-29 16:05:12 -04:00
Josh Patterson 10ae53f108 upgrade salt 3006.16 2025-10-29 10:23:44 -04:00
Josh Patterson 793e98f75c update annotation after failed vm removal from VMs file 2025-10-14 10:37:16 -04:00
Josh Patterson fe3caf66a1 update failure description 2025-10-10 17:21:09 -04:00
Josh Patterson 09d699432a ui notification of nsm volume creation failure and cleanup of vm inventory in soc grid config for hypervisor 2025-10-10 17:07:02 -04:00
Josh Patterson 4ab4264f77 merge 2025-10-07 12:26:58 -04:00
Josh Patterson 60cccb21b4 create volume 2025-10-07 12:20:42 -04:00
Josh Patterson 7deef44ff6 check defaults or pillar file 2025-10-02 11:55:50 -04:00
Josh Patterson 86eca53d4b support for byodmodel 2025-10-01 14:57:25 -04:00
Josh Patterson 1fb558cc77 managerhype br0 setup 2025-09-25 16:06:25 -04:00
Josh Patterson c836dd2acd set interface for network.ip_addrs for hypervisors 2025-09-24 16:50:29 -04:00
Josh Patterson 14ddbd32ad salt-minion service file changes for hypervisor and managerhype 2025-09-22 16:38:40 -04:00
Josh Patterson 4599b95ae7 separate salt-minion service file 2025-09-22 16:37:16 -04:00
DefensiveDepth ded520c2c1 Merge remote-tracking branch 'origin/2.4/dev' into idstools-refactor 2025-09-17 10:42:43 -04:00
DefensiveDepth a77157391c remove idstools 2025-09-17 10:42:05 -04:00
Josh Patterson e10d00d114 support for managerhype 2025-08-26 14:54:37 -04:00