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:
178
178
- " update-to-next-version-service-status.sh disabled active"
179
179
- " update-to-next-version-service-status.sh disabled inactive"
180
180
- " 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"
184
187
- " update-without-data-lost.sh v5 v6"
185
188
- " update-without-data-lost.sh v6 v5"
186
189
include :
Original file line number Diff line number Diff line change @@ -5,11 +5,16 @@ set -exu
5
5
. $( dirname $0 ) /../commonvar.sh
6
6
7
7
service_restart=$1
8
+ status_before_update=$2 # active / inactive
8
9
9
10
# Install the current
10
11
sudo apt install -V -y \
11
12
/host/${distribution} /pool/${code_name} /${channel} /* /* /fluent-package_* _${architecture} .deb
12
13
14
+ if [ " $status_before_update " = inactive ]; then
15
+ sudo systemctl stop fluentd
16
+ fi
17
+
13
18
# Set FLUENT_PACKAGE_SERVICE_RESTART
14
19
sed -i " s/=auto/=$service_restart /" /etc/default/fluentd
15
20
@@ -35,7 +40,7 @@ if dpkg-query --show --showformat='${Version}' needrestart ; then
35
40
fi
36
41
37
42
# 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
39
44
# plugin gem should be installed automatically
40
45
/opt/fluent/bin/fluent-gem list | grep fluent-plugin-concat
41
46
# 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() {
40
40
41
41
. " /etc/default/<%= service_name %>"
42
42
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
44
44
return
45
45
fi
46
46
Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ if [ $1 -eq 1 ]; then
219
219
else
220
220
. %{_sysconfdir}/sysconfig/@SERVICE_NAME@
221
221
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
223
223
# Present that FROM-side wants auto installing plugins and restarting.
224
224
# Note: Wants to collect plugin-list here, but we need to do it in %pre (see comments in %pre).
225
225
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
27
27
sudo $DNF install -y $package
28
28
29
29
# 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
31
31
# plugin gem should be installed automatically
32
32
/opt/fluent/bin/fluent-gem list | grep fluent-plugin-concat
33
33
# Non fluent-plugin- prefix gem should not be installed automatically
You can’t perform that action at this time.
0 commit comments