mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 15:17:30 -04:00
Restart ES after keystore upgrade in postinst (#84224)
Closes #82433. If the environment variable `RESTART_ON_UPGRADE` is true, then ensure that we delay restarting Elasticseach until after the keystore is upgraded, or else we can run into permissions problems.
This commit is contained in:
parent
6c6721e0ac
commit
fb5b44c522
3 changed files with 40 additions and 9 deletions
|
@ -122,15 +122,6 @@ if [ "x$IS_UPGRADE" != "xtrue" ]; then
|
|||
echo " sudo systemctl start elasticsearch.service"
|
||||
fi
|
||||
set -e
|
||||
|
||||
elif [ "$RESTART_ON_UPGRADE" = "true" ]; then
|
||||
|
||||
echo -n "Restarting elasticsearch service..."
|
||||
if command -v systemctl >/dev/null; then
|
||||
systemctl daemon-reload
|
||||
systemctl restart elasticsearch.service || true
|
||||
fi
|
||||
echo " OK"
|
||||
fi
|
||||
|
||||
# the equivalent code for rpm is in posttrans
|
||||
|
@ -149,4 +140,14 @@ if [ "$PACKAGE" = "deb" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ "$RESTART_ON_UPGRADE" = "true" ]; then
|
||||
|
||||
echo -n "Restarting elasticsearch service..."
|
||||
if command -v systemctl >/dev/null; then
|
||||
systemctl daemon-reload
|
||||
systemctl restart elasticsearch.service || true
|
||||
fi
|
||||
echo " OK"
|
||||
fi
|
||||
|
||||
@scripts.footer@
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue