Skip to content

Commit 4fed1fe

Browse files
Watson1978daipom
authored andcommitted
deb rpm: remove manual feature of zero-downtime-restart from uninstall phase (#758)
We were going to support two methods of downgrading with zero downtime. 1. Running v6.x => Install v5.x package by overwriting 2. Running v6.x => Replace `FLUENT_PACKAGE_SERVICE_RESTART` value to `manual` => uninstall v6.x => Install v5.x The second method is to keep the Fluentd process running after uninstalling it. We decided to remove `2.` method because it may cause confusion for users. Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
1 parent abb317e commit 4fed1fe

File tree

2 files changed

+2
-25
lines changed

2 files changed

+2
-25
lines changed

fluent-package/templates/package-scripts/fluent-package/deb/prerm

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,6 @@ esac
3333
# dh_installdeb will replace this with shell code automatically
3434
# generated by other debhelper scripts.
3535

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

5038
exit 0

fluent-package/yum/fluent-package.spec.in

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -197,18 +197,7 @@ if [ $1 -eq 2 ]; then
197197
fi
198198

199199
%preun
200-
. %{_sysconfdir}/sysconfig/@SERVICE_NAME@
201-
echo "preun FLUENT_PACKAGE_SERVICE_RESTART: $FLUENT_PACKAGE_SERVICE_RESTART"
202-
if [ $1 -eq 0 ]; then
203-
if [ "$FLUENT_PACKAGE_SERVICE_RESTART" = "manual" ]; then
204-
# When rollback to previous version, there is a case that user want to
205-
# restart manually to reduce downtime.
206-
:
207-
else
208-
# disable service here
209-
%systemd_preun @SERVICE_NAME@.service
210-
fi
211-
fi
200+
%systemd_preun @SERVICE_NAME@.service
212201

213202
%post
214203
. %{_sysconfdir}/sysconfig/@SERVICE_NAME@

0 commit comments

Comments
 (0)