From c85e5643db96375240129e6e8c3effca27bf0e5f Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Thu, 5 Sep 2024 13:14:45 -0400 Subject: [PATCH 1/2] es version shift --- salt/common/tools/sbin/so-image-common | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/salt/common/tools/sbin/so-image-common b/salt/common/tools/sbin/so-image-common index b99beac247..0d4783ca63 100755 --- a/salt/common/tools/sbin/so-image-common +++ b/salt/common/tools/sbin/so-image-common @@ -143,9 +143,12 @@ update_docker_containers() { $PROGRESS_CALLBACK $i fi - # use version defined in elasticsearch defaults.yaml if an es container if [[ " ${IMAGES_USING_ES_VERSION[*]} " =~ [[:space:]]${i}[[:space:]] ]]; then + # use version defined in elasticsearch defaults.yaml if an es container local UPDATE_DIR='/tmp/sogh/securityonion' + if [ ! -d "$UPDATE_DIR" ]; then + UPDATE_DIR=/securityonion + fi local v1=0 local v2=0 if [[ -f "$UPDATE_DIR/salt/elasticsearch/defaults.yaml" ]]; then @@ -156,8 +159,8 @@ update_docker_containers() { fi local highest_es_version=$(compare_es_versions "$v1" "$v2") local image=$i:$highest_es_version$IMAGE_TAG_SUFFIX - # use the so version for the version else + # use the so version for the version local image=$i:$VERSION$IMAGE_TAG_SUFFIX fi # Pull down the trusted docker image From 5625771ffb85ca5a22827e321126341baa355138 Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Thu, 5 Sep 2024 13:16:28 -0400 Subject: [PATCH 2/2] es version shift --- salt/common/tools/sbin/so-image-common | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/common/tools/sbin/so-image-common b/salt/common/tools/sbin/so-image-common index 0d4783ca63..2bf2d773df 100755 --- a/salt/common/tools/sbin/so-image-common +++ b/salt/common/tools/sbin/so-image-common @@ -144,7 +144,7 @@ update_docker_containers() { fi if [[ " ${IMAGES_USING_ES_VERSION[*]} " =~ [[:space:]]${i}[[:space:]] ]]; then - # use version defined in elasticsearch defaults.yaml if an es container + # this is an es container so use version defined in elasticsearch defaults.yaml local UPDATE_DIR='/tmp/sogh/securityonion' if [ ! -d "$UPDATE_DIR" ]; then UPDATE_DIR=/securityonion @@ -160,7 +160,7 @@ update_docker_containers() { local highest_es_version=$(compare_es_versions "$v1" "$v2") local image=$i:$highest_es_version$IMAGE_TAG_SUFFIX else - # use the so version for the version + # this is not an es container so use the so version for the version local image=$i:$VERSION$IMAGE_TAG_SUFFIX fi # Pull down the trusted docker image