dvirlabs ac4278a451
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
fix: Simplify drift-check to avoid fsnotify watcher exhaustion
CRITICAL FIX:

Problem: Previous version used multiple stat operations and loops which created
too many file descriptors and fsnotify watchers, causing 'too many open files' errors.

Solution: Use only:
- slurp: Direct file content reading (no watchers)
- find: Single operation to list directory files (no loops)

New logic is clean and simple:
1. Read Git rsyslog.conf + server rsyslog.conf (slurp)
2. Compare content directly (byte comparison)
3. List Git rsyslog.d files + server rsyslog.d files (find)
4. Compare file names (no permission checks, no loops)
5. Output DRIFTED_FILES and SYNC_STATUS markers

This eliminates file descriptor exhaustion while maintaining correct drift detection.
After deploy, when content matches, playbook exits 0 (SYNCED).
2026-04-23 13:28:16 +03:00
..
2026-04-17 18:43:19 +03:00
2026-04-17 17:30:55 +03:00