-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preserve previous state of wazuh-indexer.service
on upgrade
#487
Comments
Inspired in the solution applied in the Wazuh-manager and Wazuh-agent packages, the implementation consists in saving a temp file as reference to the previous status of the service at the pre-install stage (
Also the Pre-remove is updated to avoid running the service stop when the package is being upgraded case "$1" in
upgrade|deconfigure)
;;
remove)
echo "Running Wazuh Indexer Pre-Removal Script"
# Stop existing service
...
;;
failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 0
;;
esac |
Upgrading a running Wazuh-indexer using the package with the solution implemented results on the package running.
|
Description
We are aiming for a consistent behavior of our packages during the lifecycle. Unlike the
wazuh-agent
andwazuh-manager
services, our service does not preserve the previous state of the service when performing an upgrade. The service must be enabled and restarted manually afterward.The
wazuh-indexer
post installation scripts must be updated to preserve the previous service status, as other Wazuh central components packages do.Expected behavior
wazuh-indexer.service
stoppedwazuh-indexer.service
stoppedwazuh-indexer.service
runningwazuh-indexer.service
runningThe text was updated successfully, but these errors were encountered: