Skip to content

Commit

Permalink
fix transport preservation and add watermark preservation
Browse files Browse the repository at this point in the history
  • Loading branch information
weslambert committed Jan 8, 2018
1 parent f82f8cc commit ed79765
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions usr/sbin/so-elastic-configure-stack
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,15 @@ else
# If config exists, back it up, write the new config file, and then transfer transport settings
cp -av $ES_YAML $ES_YAML_BAK
cp -av $SRC/$ES_YAML $ES_YAML
# Preserve transport settings if present
for i in $(grep transport $ES_YAML_BAK); do
echo $i >> $ES_YAML
done

# Preserve custom settings, if present
# Transport settings
# https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-transport.html
grep transport $ES_YAML_BAK | while read -r line ; do echo "$line" >> $ES_YAML; done

# Low/High watermark settings
# https://www.elastic.co/guide/en/elasticsearch/reference/current/disk-allocator.html#disk-allocator
grep watermark $ES_YAML_BAK | while read -r line ; do echo "$line" >> $ES_YAML; done
fi

# Set cluster name
Expand Down

0 comments on commit ed79765

Please sign in to comment.