mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 17:52:46 +01:00
Merge pull request #4202 from Security-Onion-Solutions/issue/3264
Issue/3264
This commit is contained in:
@@ -15,6 +15,9 @@ python3_influxdb:
|
|||||||
{{PYTHONINSTALLER}}.installed:
|
{{PYTHONINSTALLER}}.installed:
|
||||||
- name: {{ PYTHON3INFLUX }}
|
- name: {{ PYTHON3INFLUX }}
|
||||||
|
|
||||||
|
# We circumvent the file.patch state putting ERROR in the log by using the unless and file.touch below
|
||||||
|
# https://github.com/saltstack/salt/pull/47010 and https://github.com/saltstack/salt/issues/52329
|
||||||
|
|
||||||
#https://github.com/saltstack/salt/issues/59766
|
#https://github.com/saltstack/salt/issues/59766
|
||||||
influxdb_continuous_query.present_patch:
|
influxdb_continuous_query.present_patch:
|
||||||
file.patch:
|
file.patch:
|
||||||
@@ -23,6 +26,13 @@ influxdb_continuous_query.present_patch:
|
|||||||
- require:
|
- require:
|
||||||
- {{PYTHONINSTALLER}}: python3_influxdb
|
- {{PYTHONINSTALLER}}: python3_influxdb
|
||||||
- pkg: patch_package
|
- pkg: patch_package
|
||||||
|
- unless: ls /opt/so/state/influxdb_continuous_query.py.patched
|
||||||
|
|
||||||
|
influxdb_continuous_query.py.patched:
|
||||||
|
file.touch:
|
||||||
|
- name: /opt/so/state/influxdb_continuous_query.py.patched
|
||||||
|
- onchanges:
|
||||||
|
- file: influxdb_continuous_query.present_patch
|
||||||
|
|
||||||
#https://github.com/saltstack/salt/issues/59761
|
#https://github.com/saltstack/salt/issues/59761
|
||||||
influxdb_retention_policy.present_patch:
|
influxdb_retention_policy.present_patch:
|
||||||
@@ -32,6 +42,13 @@ influxdb_retention_policy.present_patch:
|
|||||||
- require:
|
- require:
|
||||||
- {{PYTHONINSTALLER}}: python3_influxdb
|
- {{PYTHONINSTALLER}}: python3_influxdb
|
||||||
- pkg: patch_package
|
- pkg: patch_package
|
||||||
|
- unless: ls /opt/so/state/influxdb_retention_policy.py.patched
|
||||||
|
|
||||||
|
influxdb_retention_policy.py.patched:
|
||||||
|
file.touch:
|
||||||
|
- name: /opt/so/state/influxdb_retention_policy.py.patched
|
||||||
|
- onchanges:
|
||||||
|
- file: influxdb_retention_policy.present_patch
|
||||||
|
|
||||||
# We should be able to set reload_modules: True in this state in order to tell salt to reload its python modules due to us possibly installing
|
# We should be able to set reload_modules: True in this state in order to tell salt to reload its python modules due to us possibly installing
|
||||||
# and possibly modifying modules in this state. This is bugged according to https://github.com/saltstack/salt/issues/24925
|
# and possibly modifying modules in this state. This is bugged according to https://github.com/saltstack/salt/issues/24925
|
||||||
@@ -41,4 +58,13 @@ influxdbmod.py_shard_duration_patch:
|
|||||||
- source: salt://salt/files/influxdbmod.py.patch
|
- source: salt://salt/files/influxdbmod.py.patch
|
||||||
- require:
|
- require:
|
||||||
- {{PYTHONINSTALLER}}: python3_influxdb
|
- {{PYTHONINSTALLER}}: python3_influxdb
|
||||||
- pkg: patch_package
|
- pkg: patch_package
|
||||||
|
- unless: ls /opt/so/state/influxdbmod.py.patched
|
||||||
|
|
||||||
|
influxdbmod.py.patched:
|
||||||
|
file.touch:
|
||||||
|
- name: /opt/so/state/influxdbmod.py.patched
|
||||||
|
- onchanges:
|
||||||
|
- file: influxdbmod.py_shard_duration_patch
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -926,7 +926,7 @@ if [[ $success != 0 ]]; then SO_ERROR=1; fi
|
|||||||
|
|
||||||
# Check entire setup log for errors or unexpected salt states and ensure cron jobs are not reporting errors to root's mailbox
|
# Check entire setup log for errors or unexpected salt states and ensure cron jobs are not reporting errors to root's mailbox
|
||||||
# Ignore "Status .* was not found" due to output from salt http.query or http.wait_for_successful_query states used with retry
|
# Ignore "Status .* was not found" due to output from salt http.query or http.wait_for_successful_query states used with retry
|
||||||
if grep -q -E "ERROR|Result: False" $setup_log | grep -qvE "Status .* was not found" || [[ -s /var/spool/mail/root && "$setup_type" == "iso" ]]; then
|
if grep -E "ERROR|Result: False" $setup_log | grep -qvE "Status .* was not found" || [[ -s /var/spool/mail/root && "$setup_type" == "iso" ]]; then
|
||||||
SO_ERROR=1
|
SO_ERROR=1
|
||||||
|
|
||||||
grep --color=never "ERROR" "$setup_log" | grep -qvE "Status .* was not found" > "$error_log"
|
grep --color=never "ERROR" "$setup_log" | grep -qvE "Status .* was not found" > "$error_log"
|
||||||
|
|||||||
Reference in New Issue
Block a user