Skip to content
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

deb rpm: remove manual feature of zero-downtime-restart from uninstall phase #758

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,6 @@ esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

. /etc/default/<%= service_name %>
if [ "$FLUENT_PACKAGE_SERVICE_RESTART" = "manual" ]; then
# Do not stop service because removing package will be executed
# for major downgrade (e.g. uninstall v6 then reinstall v5)
# In such a case, missing plugins for v5 cause trouble in
# restarting service.
# so instead of restarting service here, demand users to install
# such plugins in advance then delegate users to restart service
# manually later.
:
else
#DEBHELPER#
fi
#DEBHELPER#

exit 0
13 changes: 1 addition & 12 deletions fluent-package/yum/fluent-package.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -197,18 +197,7 @@ if [ $1 -eq 2 ]; then
fi

%preun
. %{_sysconfdir}/sysconfig/@SERVICE_NAME@
echo "preun FLUENT_PACKAGE_SERVICE_RESTART: $FLUENT_PACKAGE_SERVICE_RESTART"
if [ $1 -eq 0 ]; then
if [ "$FLUENT_PACKAGE_SERVICE_RESTART" = "manual" ]; then
# When rollback to previous version, there is a case that user want to
# restart manually to reduce downtime.
:
else
# disable service here
%systemd_preun @SERVICE_NAME@.service
fi
fi
%systemd_preun @SERVICE_NAME@.service

%post
. %{_sysconfdir}/sysconfig/@SERVICE_NAME@
Expand Down
Loading