File tree Expand file tree Collapse file tree 5 files changed +15
-7
lines changed
templates/package-scripts/fluent-package/deb Expand file tree Collapse file tree 5 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -178,9 +178,12 @@ jobs:
178178 - " update-to-next-version-service-status.sh disabled active"
179179 - " update-to-next-version-service-status.sh disabled inactive"
180180 - " update-to-next-version-with-auto-and-manual.sh"
181- - " update-to-next-major-version.sh auto"
182- - " update-to-next-major-version.sh manual"
183- - " update-to-next-major-version.sh etc"
181+ - " update-to-next-major-version.sh auto active"
182+ - " update-to-next-major-version.sh auto inactive"
183+ - " update-to-next-major-version.sh manual active"
184+ - " update-to-next-major-version.sh manual inactive"
185+ - " update-to-next-major-version.sh etc active"
186+ - " update-to-next-major-version.sh etc inactive"
184187 - " update-without-data-lost.sh v5 v6"
185188 - " update-without-data-lost.sh v6 v5"
186189 include :
Original file line number Diff line number Diff line change @@ -5,11 +5,16 @@ set -exu
55. $( dirname $0 ) /../commonvar.sh
66
77service_restart=$1
8+ status_before_update=$2 # active / inactive
89
910# Install the current
1011sudo apt install -V -y \
1112 /host/${distribution} /pool/${code_name} /${channel} /* /* /fluent-package_* _${architecture} .deb
1213
14+ if [ " $status_before_update " = inactive ]; then
15+ sudo systemctl stop fluentd
16+ fi
17+
1318# Set FLUENT_PACKAGE_SERVICE_RESTART
1419sed -i " s/=auto/=$service_restart /" /etc/default/fluentd
1520
@@ -35,7 +40,7 @@ if dpkg-query --show --showformat='${Version}' needrestart ; then
3540fi
3641
3742# Test: Check whether plugin/gem were installed during upgrading
38- if [ " $service_restart " = auto ]; then
43+ if [ " $service_restart " != manual ] && [ " $status_before_update " = active ]; then
3944 # plugin gem should be installed automatically
4045 /opt/fluent/bin/fluent-gem list | grep fluent-plugin-concat
4146 # Non fluent-plugin- prefix gem should not be installed automatically
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ leave_info_for_auto_restart_if_need() {
4040
4141 . " /etc/default/<%= service_name %>"
4242 echo " FLUENT_PACKAGE_SERVICE_RESTART: $FLUENT_PACKAGE_SERVICE_RESTART "
43- if [ " $FLUENT_PACKAGE_SERVICE_RESTART " != auto ]; then
43+ if [ " $FLUENT_PACKAGE_SERVICE_RESTART " = manual ]; then
4444 return
4545 fi
4646
Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ if [ $1 -eq 1 ]; then
219219 else
220220 . %{_sysconfdir}/sysconfig/@SERVICE_NAME@
221221 echo "FLUENT_PACKAGE_SERVICE_RESTART: $FLUENT_PACKAGE_SERVICE_RESTART"
222- if [ "$FLUENT_PACKAGE_SERVICE_RESTART" = auto ]; then
222+ if [ "$FLUENT_PACKAGE_SERVICE_RESTART" != manual ]; then
223223 # Present that FROM-side wants auto installing plugins and restarting.
224224 # Note: Wants to collect plugin-list here, but we need to do it in %pre (see comments in %pre).
225225 touch %{install_plugins}
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ package="/host/v6-test/${distribution}/${DISTRIBUTION_VERSION}/x86_64/Packages/f
2727sudo $DNF install -y $package
2828
2929# Test: Check whether plugin/gem were installed during upgrading
30- if [ " $service_restart " = auto ] && [ " $status_before_update " = active ]; then
30+ if [ " $service_restart " != manual ] && [ " $status_before_update " = active ]; then
3131 # plugin gem should be installed automatically
3232 /opt/fluent/bin/fluent-gem list | grep fluent-plugin-concat
3333 # Non fluent-plugin- prefix gem should not be installed automatically
You can’t perform that action at this time.
0 commit comments