File tree Expand file tree Collapse file tree 4 files changed +71
-12
lines changed Expand file tree Collapse file tree 4 files changed +71
-12
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,8 @@ jobs:
177
177
- " update-to-next-version-service-status.sh disabled inactive"
178
178
- " update-to-next-version-with-auto-and-manual.sh"
179
179
- " update-to-next-major-version.sh"
180
- - " update-without-data-lost.sh"
180
+ - " update-without-data-lost.sh v5 v6"
181
+ - " update-without-data-lost.sh v6 v5"
181
182
include :
182
183
- label : Debian bullseye amd64
183
184
rake-job : debian-bullseye
Original file line number Diff line number Diff line change @@ -152,7 +152,8 @@ jobs:
152
152
- " update-to-next-version-service-status.sh disabled inactive"
153
153
- " update-to-next-version-with-auto-and-manual.sh"
154
154
- " update-to-next-major-version.sh"
155
- - " update-without-data-lost.sh"
155
+ - " update-without-data-lost.sh v5 v6"
156
+ - " update-without-data-lost.sh v6 v5"
156
157
include :
157
158
- label : AmazonLinux 2 x86_64
158
159
rake-job : amazonlinux-2
@@ -223,7 +224,8 @@ jobs:
223
224
- " update-to-next-version-service-status.sh disabled inactive"
224
225
- " update-to-next-version-with-auto-and-manual.sh"
225
226
- " update-to-next-major-version.sh"
226
- - " update-without-data-lost.sh"
227
+ - " update-without-data-lost.sh v5 v6"
228
+ - " update-without-data-lost.sh v6 v5"
227
229
include :
228
230
- label : RockyLinux 8 x86_64
229
231
rake-job : rockylinux-8
Original file line number Diff line number Diff line change @@ -4,11 +4,39 @@ set -exu
4
4
5
5
. $( dirname $0 ) /../commonvar.sh
6
6
7
+ v5_package=" /host/${distribution} /pool/${code_name} /${channel} /*/*/fluent-package_*_${architecture} .deb"
8
+ v6_package=" /host/v6-test/${distribution} /pool/${code_name} /${channel} /*/*/fluent-package_*_${architecture} .deb"
9
+
10
+ case " $1 " in
11
+ v5)
12
+ package=$v5_package
13
+ ;;
14
+ v6)
15
+ package=$v6_package
16
+ ;;
17
+ * )
18
+ echo " Invalid argument: $1 "
19
+ exit 1
20
+ ;;
21
+ esac
22
+
23
+ case " $2 " in
24
+ v5)
25
+ next_package=$v5_package
26
+ ;;
27
+ v6)
28
+ next_package=$v6_package
29
+ ;;
30
+ * )
31
+ echo " Invalid argument: $2 "
32
+ exit 1
33
+ ;;
34
+ esac
35
+
7
36
sudo apt install -V -y rsyslog
8
37
9
38
# Install the current
10
- sudo apt install -V -y \
11
- /host/${distribution} /pool/${code_name} /${channel} /* /* /fluent-package_* _${architecture} .deb
39
+ sudo apt install -V -y $package
12
40
13
41
# Set up configuration
14
42
cat < $( dirname $0 ) /../../test-tools/rsyslog.conf >> /etc/rsyslog.conf
@@ -30,9 +58,8 @@ sleep 1
30
58
31
59
sleep 1
32
60
33
- # Update to the next major version
34
- sudo apt install -V -y \
35
- /host/v6-test/${distribution} /pool/${code_name} /${channel} /* /* /fluent-package_* _${architecture} .deb
61
+ # Update to the next version
62
+ sudo apt install -V -y --allow-downgrades $next_package
36
63
test $main_pid -eq $( systemctl show --value --property=MainPID fluentd)
37
64
38
65
# Main process should be replaced by USR2 signal
Original file line number Diff line number Diff line change @@ -4,10 +4,40 @@ set -exu
4
4
5
5
. $( dirname $0 ) /commonvar.sh
6
6
7
+ v5_package=" /host/${distribution} /${DISTRIBUTION_VERSION} /x86_64/Packages/fluent-package-*.rpm"
8
+ v6_package=" /host/v6-test/${distribution} /${DISTRIBUTION_VERSION} /x86_64/Packages/fluent-package-*.rpm"
9
+
10
+ case " $1 " in
11
+ v5)
12
+ package=$v5_package
13
+ ;;
14
+ v6)
15
+ package=$v6_package
16
+ ;;
17
+ * )
18
+ echo " Invalid argument: $1 "
19
+ exit 1
20
+ ;;
21
+ esac
22
+
23
+ command=" install"
24
+ case " $2 " in
25
+ v5)
26
+ next_package=$v5_package
27
+ command=" downgrade" # Avoid error in AmazonLinux2
28
+ ;;
29
+ v6)
30
+ next_package=$v6_package
31
+ ;;
32
+ * )
33
+ echo " Invalid argument: $2 "
34
+ exit 1
35
+ ;;
36
+ esac
37
+
7
38
sudo $DNF install -y rsyslog
8
39
9
40
# Install the current
10
- package=" /host/${distribution} /${DISTRIBUTION_VERSION} /x86_64/Packages/fluent-package-[0-9]*.rpm"
11
41
sudo $DNF install -y $package
12
42
13
43
# Set up configuration
@@ -30,9 +60,8 @@ sleep 1
30
60
31
61
sleep 1
32
62
33
- # Update to the next major version
34
- next_package=" /host/v6-test/${distribution} /${DISTRIBUTION_VERSION} /x86_64/Packages/fluent-package-*.rpm"
35
- sudo $DNF install -y $next_package
63
+ # Update to the next version
64
+ sudo $DNF $command -y $next_package
36
65
test $main_pid -eq $( eval $( systemctl show fluentd --property=MainPID) && echo $MainPID )
37
66
38
67
# Main process should be replaced by USR2 signal
You can’t perform that action at this time.
0 commit comments