From edb00c2058b301ce77fb4cd5d85488279d758b37 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Tue, 10 Nov 2020 17:09:38 -0500 Subject: [PATCH] remove redundant common from top, create so-status conf files on manager before registry state https://github.com/Security-Onion-Solutions/securityonion/issues/1681 --- salt/registry/init.sls | 4 ++-- salt/top.sls | 14 -------------- setup/so-setup | 5 +++++ 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/salt/registry/init.sls b/salt/registry/init.sls index c456aa0c4..5782c2033 100644 --- a/salt/registry/init.sls +++ b/salt/registry/init.sls @@ -57,10 +57,10 @@ so-dockerregistry: - /etc/pki/registry.crt:/etc/pki/registry.crt:ro - /etc/pki/registry.key:/etc/pki/registry.key:ro -append_so-dockerregistry_so-status.conf: +append_so-registry_so-status.conf: file.append: - name: /opt/so/conf/so-status/so-status.conf - - text: so-dockerregistry + - text: so-registry {% else %} diff --git a/salt/top.sls b/salt/top.sls index 5976e3eaa..0c7bde183 100644 --- a/salt/top.sls +++ b/salt/top.sls @@ -42,7 +42,6 @@ base: - salt.master - ca - ssl - - common - registry - telegraf - firewall @@ -60,7 +59,6 @@ base: - match: compound - ca - ssl - - common - telegraf - firewall - nginx @@ -86,7 +84,6 @@ base: - salt.master - ca - ssl - - common - registry - manager - nginx @@ -145,7 +142,6 @@ base: - salt.master - ca - ssl - - common - registry - nginx - telegraf @@ -194,7 +190,6 @@ base: - salt.master - ca - ssl - - common - registry - manager - nginx @@ -252,7 +247,6 @@ base: '*_node and I@node:node_type:parser and G@saltversion:{{saltversion}}': - match: compound - - common - firewall - logstash {%- if FLEETMANAGER or FLEETNODE %} @@ -263,7 +257,6 @@ base: '*_node and I@node:node_type:hot and G@saltversion:{{saltversion}}': - match: compound - - common - firewall - logstash - curator @@ -275,7 +268,6 @@ base: '*_node and I@node:node_type:warm and G@saltversion:{{saltversion}}': - match: compound - - common - firewall - elasticsearch {%- if FLEETMANAGER or FLEETNODE %} @@ -288,7 +280,6 @@ base: - match: compound - ca - ssl - - common - nginx - telegraf - firewall @@ -307,7 +298,6 @@ base: '*_managersensor and G@saltversion:{{saltversion}}': - match: compound - - common - nginx - telegraf - influxdb @@ -326,7 +316,6 @@ base: - salt.master - ca - ssl - - common - registry - nginx - telegraf @@ -375,7 +364,6 @@ base: - match: compound - ca - ssl - - common - nginx - telegraf - firewall @@ -406,7 +394,6 @@ base: - match: compound - ca - ssl - - common - nginx - telegraf - firewall @@ -422,7 +409,6 @@ base: - salt.master - ca - ssl - - common - registry - manager - nginx diff --git a/setup/so-setup b/setup/so-setup index 70502251e..a39411a8f 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -590,6 +590,11 @@ fi set_progress_str 25 'Configuring firewall' set_initial_firewall_policy >> $setup_log 2>&1 + # create these so the registry state can add so-registry to /opt/so/conf/so-status/so-status.conf + mkdir -p /opt/so/conf/so-status/ + touch /opt/so/conf/so-status/so-status.conf + touch /opt/so/conf/so-status/so-status.disabled.conf + if [[ "$setup_type" == 'iso' ]]; then set_progress_str 26 'Copying containers from iso' else